Skip to content

Commit 712a380

Browse files
committed
chore: remove redundant macos dependency step, fixup test matrix conditions
1 parent 6b28149 commit 712a380

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

.github/workflows/test.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16+
test: [true]
17+
cross: [false]
1618
target:
1719
- os: ubuntu-latest
1820
target: x86_64-unknown-linux-gnu
@@ -42,30 +44,24 @@ jobs:
4244

4345
- name: Install cross
4446
if: matrix.target.cross
45-
run: |
46-
cargo install cross --git https://github.com/cross-rs/cross
47-
48-
- name: Install macOS dependencies
49-
if: matrix.target.os == 'macos-latest'
50-
run: |
51-
brew install pkg-config openssl@3
47+
run: cargo install cross --git https://github.com/cross-rs/cross
5248

5349
- name: Build project (native)
54-
if: ${{ !matrix.target.cross }} # default to false if not set
50+
if: ${{ !matrix.target.cross }}
5551
run: cargo build --target ${{ matrix.target.target }} --features ${{ matrix.feature }}
5652

5753
- name: Build project (cross-compilation)
5854
if: matrix.target.cross
5955
run: cross build --release --target=${{ matrix.target.target }} --features ${{ matrix.feature }},vendored-openssl
6056

6157
- name: Install nextest
62-
if: ${{ !matrix.target.cross }} # default to false if not set
58+
if: ${{ matrix.target.test != false }}
6359
uses: taiki-e/install-action@nextest
6460

6561
- name: Run tests (native)
66-
if: (matrix.target.cross != true) && (matrix.target.test != false)
62+
if: ${{ matrix.target.test != false && !matrix.target.cross }}
6763
run: cargo nextest run --verbose --features ${{ matrix.feature }} --target ${{ matrix.target.target }}
6864

6965
- name: Run tests (cross-compiled)
70-
if: matrix.target.cross && (matrix.target.test != false)
71-
run: cargo nextest run --verbose --features ${{ matrix.feature }} --target ${{ matrix.target.target }}
66+
if: ${{ matrix.target.test != false && matrix.target.cross }}
67+
run: cross test --verbose --features ${{ matrix.feature }} --target ${{ matrix.target.target }}

0 commit comments

Comments
 (0)