From 3fb5b017b3d520c50ebb7d2e50ccf55e7ee92547 Mon Sep 17 00:00:00 2001 From: adoo Date: Fri, 8 May 2020 23:50:12 +0800 Subject: [PATCH] ci: add ubuntu-latest test on ci, OSX code corverage block on https://github.com/rust-lang/rust/issues/63047, so add ubuntu support advance --- .github/workflows/grcov.yml | 4 ++-- .github/workflows/main.yml | 11 +++++++---- configs/grcov.config.yml | 10 ++++++++++ 3 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 configs/grcov.config.yml diff --git a/.github/workflows/grcov.yml b/.github/workflows/grcov.yml index a2e988c2a..dc0278a22 100644 --- a/.github/workflows/grcov.yml +++ b/.github/workflows/grcov.yml @@ -8,7 +8,7 @@ name: Code coverage with grcov jobs: grcov: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -29,7 +29,7 @@ jobs: args: --all env: CARGO_INCREMENTAL: 0 - RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" + RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off" - name: Gather coverage data id: coverage diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e674c3e0d..9365f19bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ name: base check jobs: check: name: Check - runs-on: macos-latest + runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v1 @@ -26,7 +26,10 @@ jobs: test: name: Test Suite - runs-on: macos-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] steps: - name: Checkout sources uses: actions/checkout@v1 @@ -45,7 +48,7 @@ jobs: rustfmt: name: rust code format style check - runs-on: macos-latest + runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v1 @@ -65,7 +68,7 @@ jobs: args: --all -- --check clippy_check: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions-rs/toolchain@v1 diff --git a/configs/grcov.config.yml b/configs/grcov.config.yml new file mode 100644 index 000000000..2a258223a --- /dev/null +++ b/configs/grcov.config.yml @@ -0,0 +1,10 @@ +branch: true +ignore-not-existing: true +llvm: true +output-type: lcov +output-file: ./lcov.info +ignore: + - "/*" + - "../*" + - "**/main_thread_tests/**" + - "**/examples/**" \ No newline at end of file