CI: Separate test "state" from the feature flags activated by it

This commit is contained in:
Jack Grigg 2024-03-10 17:42:50 +00:00
parent 0d4a730e9e
commit 93048c6c46
1 changed files with 32 additions and 14 deletions

View File

@ -8,27 +8,45 @@ on:
jobs:
test:
name: >
Test on ${{ matrix.os }}${{
matrix.extra_flags != 'NOT_A_PUZZLE' && format(' with --features {0}', matrix.extra_flags) || ''
}}
Test${{
matrix.state != 'NOT_A_PUZZLE' && format(' {0}', matrix.state) || ''
}} on ${{ matrix.target }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.extra_flags != 'NOT_A_PUZZLE' }}
continue-on-error: ${{ matrix.state != 'NOT_A_PUZZLE' }}
strategy:
matrix:
os: [ubuntu-latest-8cores, windows-latest-8cores, macOS-latest]
extra_flags:
target:
- Linux
- macOS
- Windows
state:
- NOT_A_PUZZLE
- orchard
- unstable-nu6
- zfuture
- Orchard
- NU6
- ZFuture
include:
- extra_flags: orchard
- target: Linux
os: ubuntu-latest-8cores
- target: macOS
os: macOS-latest
- target: Windows
os: windows-latest-8cores
- state: Orchard
extra_flags: orchard
rustflags: '--cfg zcash_unstable="orchard"'
exclude:
- os: macOS-latest
- state: NU6
extra_flags: unstable-nu6
- os: macOS-latest
- state: ZFuture
extra_flags: zfuture
exclude:
- target: macOS
state: NU6
- target: macOS
state: ZFuture
env:
RUSTFLAGS: ${{ matrix.rustflags }}
RUSTDOCFLAGS: ${{ matrix.rustflags }}
@ -38,7 +56,7 @@ jobs:
- id: prepare
uses: ./.github/actions/prepare
with:
extra-features: ${{ matrix.extra_flags != 'NOT_A_PUZZLE' && matrix.extra_flags || '' }}
extra-features: ${{ matrix.state != 'NOT_A_PUZZLE' && matrix.extra_flags || '' }}
- uses: actions/cache@v4
with:
path: |