Skip to content

Commit fa46ec7

Browse files
committed
chore(ci): add back macOS x64 tests
1 parent d915bfd commit fa46ec7

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/tests.yaml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,27 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
name: [ubuntu-latest, macOS-arm-latest]
37+
name: [ubuntu-latest, macOS-arm-latest, macOS-x64-latest]
3838
rust: ["${{ inputs.rust-version }}"]
3939
features: [all, none, default]
4040
include:
4141
- name: ubuntu-latest
4242
os: ubuntu-latest
4343
release-os: linux
4444
release-arch: amd64
45+
cargo_targets: "x86_64-unknown-linux-musl"
4546
runner: [self-hosted, linux, X64]
4647
- name: macOS-arm-latest
4748
os: macOS-latest
4849
release-os: darwin
4950
release-arch: aarch64
51+
cargo_targets: "aarch64-apple-darwin"
52+
runner: [self-hosted, macOS, ARM64]
53+
- name: macOS-x64-latest
54+
os: macOS-latest
55+
release-os: darwin
56+
release-arch: x86_64
57+
cargo_targets: "x86_64-apple-darwin"
5058
runner: [self-hosted, macOS, ARM64]
5159
env:
5260
# Using self-hosted runners so use local cache for sccache and
@@ -58,11 +66,16 @@ jobs:
5866
with:
5967
ref: ${{ inputs.git-ref }}
6068

69+
- name: Ensure musl support
70+
if: ${{ contains(matrix.cargo_targets, '-musl') }}
71+
run: sudo apt-get install musl-tools -y
72+
6173
- name: Install ${{ matrix.rust }} rust
6274
uses: dtolnay/rust-toolchain@master
6375
with:
6476
toolchain: ${{ matrix.rust }}
65-
77+
targets: ${{ matrix.cargo_targets }}
78+
6679
- name: Install cargo-nextest
6780
uses: taiki-e/install-action@v2
6881
with:
@@ -94,24 +107,26 @@ jobs:
94107
do
95108
echo "Checking $i $FEATURES"
96109
targets="--lib --bins"
97-
echo cargo check -p $i $FEATURES $targets
98-
cargo check -p $i $FEATURES $targets
110+
# echo cargo check -p $i $FEATURES $targets
111+
# cargo check -p $i $FEATURES $targets
112+
echo "cargo check -p $i $FEATURES $targets --target ${{ matrix.cargo_targets }}"
113+
cargo check -p $i $FEATURES $targets --target ${{ matrix.cargo_targets }}
99114
done
100115
env:
101116
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
102117

103118
- name: build tests
104119
run: |
105-
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --no-run
120+
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --no-run --target ${{ matrix.cargo_targets }}
106121
107122
- name: list ignored tests
108123
run: |
109-
cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ignored-only
124+
cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ignored-only --target ${{ matrix.cargo_targets }}
110125
111126
- name: run tests
112127
run: |
113128
mkdir -p output
114-
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --profile ci --run-ignored ${{ inputs.flaky && 'all' || 'default' }} ${{ inputs.flaky && '--verbose' || '' }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json
129+
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --profile ci --run-ignored ${{ inputs.flaky && 'all' || 'default' }} ${{ inputs.flaky && '--verbose' || '' }} --target ${{ matrix.cargo_targets }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json
115130
env:
116131
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
117132
NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1

0 commit comments

Comments
 (0)