Skip to content

Commit

Permalink
ci: fix docker platforms, skip duplicate testing for x86_64-unknown-l…
Browse files Browse the repository at this point in the history
…inux-gnu
  • Loading branch information
CharlieC3 committed Jul 26, 2023
1 parent c1f2d57 commit 0d33bef
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/ci-clarinet-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,11 @@ jobs:
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: RUSTC_BOOTSTRAP=1 cargo install grcov

- name: Build
- name: Build & Unit Test
env:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "${{ env.COMPONENT }}-%p-%m.profraw"
run: cargo build --package=clarinet-cli --locked

- name: Unit Tests
env:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "${{ env.COMPONENT }}-%p-%m.profraw"
run: cargo test --package=clarinet-cli
run: cargo build && cargo test

- name: Generate coverage
run: grcov . --binary-path target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info
Expand All @@ -143,6 +137,7 @@ jobs:
verbose: true

matrix_prep:
name: Prepare Dist and Docker Matrices
runs-on: ubuntu-latest
outputs:
dist_matrix: ${{ steps.set-matrix.outputs.dist_matrix }}
Expand Down Expand Up @@ -231,6 +226,7 @@ jobs:

- name: Code sign bin (Windows)
if: startsWith(github.ref, 'refs/heads/main') && matrix.os == 'windows-latest'
shell: pwsh
run: |
$certificate_file_name = "${env:TEMP}\certificate.pfx"
Expand All @@ -255,6 +251,7 @@ jobs:

- name: Code sign installer (Windows)
if: startsWith(github.ref, 'refs/heads/main') && matrix.os == 'windows-latest'
shell: pwsh
run: |
$certificate_file_name = "${env:TEMP}\certificate.pfx"
Expand Down Expand Up @@ -299,7 +296,8 @@ jobs:

- name: Unit Tests - Cargo
# can't easily run mac-arm64 tests in GH without native runners for that arch
if: matrix.target != 'aarch64-apple-darwin'
# and we already ran tests on x86_64-unknown-linux-gnu in the Code Coverage job, so skip
if: matrix.target != 'aarch64-apple-darwin' && matrix.os != 'x86_64-unknown-linux-gnu'
run: cargo test --release --locked --target ${{ matrix.target }}

- name: Functional Tests (Linux)
Expand Down Expand Up @@ -359,6 +357,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: ${{ matrix.platform }}
file: dockerfiles/components/clarinet.dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
Expand Down

0 comments on commit 0d33bef

Please sign in to comment.