Skip to content

Commit

Permalink
ci: Exclude instead of if, since if doesn't work with matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian committed Sep 9, 2024
1 parent f3fe406 commit 2ed4234
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,31 @@ jobs:
name: Cargo Test | ${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
if: "${{ matrix.target != 'x86_64-apple-darwin' || (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') }}"
strategy:
fail-fast: false
matrix:
main: "${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}"
include:
- {
name: "Linux",
target: x86_64-unknown-linux-musl,
os: 8core_ubuntu_latest_runner,
}
- { name: "macOS", target: x86_64-apple-darwin, os: macos-13 }
- {
name: "macOS",
target: x86_64-apple-darwin,
os: macos-13,
}
- { name: "macOS-arm", target: aarch64-apple-darwin, os: macos-14 }
- {
name: "Windows",
target: x86_64-pc-windows-msvc,
os: 16core_windows_latest_runner,
}
exclude:
- target: "x86_64-apple-darwin"
main: false

steps:
- uses: actions/checkout@v4
- uses: taiki-e/setup-cross-toolchain-action@v1
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ jobs:
# Install a couple of projects that we know use pixi
test-downstream:
name: ${{ matrix.arch.name }} - ${{ matrix.repository }}
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
runs-on: ${{ matrix.arch.os }}
strategy:
fail-fast: false
Expand Down

0 comments on commit 2ed4234

Please sign in to comment.