From 59f77da7f3d3df4b74cf58c0faaed6c873959a47 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Mon, 28 Oct 2024 11:10:22 +0100 Subject: [PATCH 1/3] chore(ci): add back macOS x64 tests --- .github/workflows/tests.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a545b8fc8b..e0f66b06d7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - name: [ubuntu-latest, macOS-arm-latest] + name: [ubuntu-latest, macOS-arm-latest, maxOS-x64-latest] rust: [ '${{ inputs.rust-version }}' ] features: [all, none, default] include: @@ -42,11 +42,19 @@ jobs: os: ubuntu-latest release-os: linux release-arch: amd64 + cargo_targets: "x86_64-unknown-linux-musl" runner: [self-hosted, linux, X64] - name: macOS-arm-latest os: macOS-latest release-os: darwin release-arch: aarch64 + cargo_targets: "aarch64-apple-darwin" + runner: [self-hosted, macOS, ARM64] + - name: macOS-x64-latest + os: macOS-latest + release-os: darwin + release-arch: x86_64 + cargo_targets: "x86_64-apple-darwin" runner: [self-hosted, macOS, ARM64] env: # Using self-hosted runners so use local cache for sccache and @@ -58,10 +66,15 @@ jobs: with: ref: ${{ inputs.git-ref }} + - name: Ensure musl support + if: ${{ contains(matrix.cargo_targets, '-musl') }} + run: sudo apt-get install musl-tools -y + - name: Install ${{ matrix.rust }} rust uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} + targets: ${{ matrix.cargo_targets }} - name: Install cargo-nextest uses: taiki-e/install-action@v2 From 9f7e711774292bac2783be66971ec14725dfa185 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Mon, 28 Oct 2024 11:58:37 +0100 Subject: [PATCH 2/3] fixup --- .github/workflows/netsim_runner.yaml | 6 ++++-- .github/workflows/tests.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/netsim_runner.yaml b/.github/workflows/netsim_runner.yaml index 38e885b35d..ae7b20d08c 100644 --- a/.github/workflows/netsim_runner.yaml +++ b/.github/workflows/netsim_runner.yaml @@ -198,8 +198,10 @@ jobs: overwrite: true - name: Fail Job if Tests Failed - if: ${{ failure() && steps.run_tests.outcome == 'failure' }} - run: exit 1 + if: ${{ steps.run_tests.outcome == 'failure' }} + run: | + echo "Tests failed logs are available at: ${{steps.upload-report.outputs.artifact-url}}" + exit 1 - name: Find Docs Comment if: ${{ inputs.pr_number != '' }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e0f66b06d7..d1dabe3330 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - name: [ubuntu-latest, macOS-arm-latest, maxOS-x64-latest] + name: [ubuntu-latest, macOS-arm-latest, macOS-x64-latest] rust: [ '${{ inputs.rust-version }}' ] features: [all, none, default] include: From 0e0894d8e2901e21d894af8dcc7cfd63ea0341c3 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Mon, 28 Oct 2024 12:13:27 +0100 Subject: [PATCH 3/3] ensure targets are used --- .github/workflows/tests.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d1dabe3330..1eef52173f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -111,24 +111,24 @@ jobs: else targets="--lib --bins" fi - echo cargo check -p $i $FEATURES $targets - cargo check -p $i $FEATURES $targets + echo cargo check -p $i $FEATURES $targets --target ${{ matrix.cargo_targets }} + cargo check -p $i $FEATURES $targets --target ${{ matrix.cargo_targets }} done env: RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}} - name: build tests run: | - cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --no-run + cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --no-run --target ${{ matrix.cargo_targets }} - name: list ignored tests run: | - cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ignored-only + cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ignored-only --target ${{ matrix.cargo_targets }} - name: run tests run: | mkdir -p output - cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --profile ci --run-ignored ${{ inputs.flaky && 'all' || 'default' }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json + cargo nextest run --workspace ${{ env.FEATURES }} --target ${{ matrix.cargo_targets }} --lib --bins --tests --profile ci --run-ignored ${{ inputs.flaky && 'all' || 'default' }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json env: RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}} NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1