Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add back macOS x64 tests #2846

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/netsim_runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '' }}
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,27 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [ubuntu-latest, macOS-arm-latest]
name: [ubuntu-latest, macOS-arm-latest, macOS-x64-latest]
rust: [ '${{ inputs.rust-version }}' ]
features: [all, none, default]
include:
- name: ubuntu-latest
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
Expand All @@ -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
Expand Down Expand Up @@ -98,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
Expand Down
Loading