ci: gate CI workflow on source being changed

This commit is contained in:
Andrew Poelstra 2024-03-01 16:04:31 +00:00
parent 9aca8a18c7
commit 09f7fc3cff
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 14 additions and 1 deletions

View File

@ -30,6 +30,7 @@ jobs:
Stable: Stable:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test - stable toolchain name: Test - stable toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -51,6 +52,7 @@ jobs:
Beta: Beta:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test - beta toolchain name: Test - beta toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -71,6 +73,7 @@ jobs:
Nightly: Nightly:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test - nightly toolchain name: Test - nightly toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -95,6 +98,7 @@ jobs:
MSRV: MSRV:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test - 1.56.1 toolchain name: Test - 1.56.1 toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -116,6 +120,8 @@ jobs:
run: ./contrib/run_task.sh ${{ matrix.crate }} ${{ matrix.task }} run: ./contrib/run_task.sh ${{ matrix.crate }} ${{ matrix.task }}
Arch32bit: Arch32bit:
needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test 32-bit version name: Test 32-bit version
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -133,8 +139,9 @@ jobs:
run: cargo test --target i686-unknown-linux-gnu run: cargo test --target i686-unknown-linux-gnu
Cross: Cross:
needs: Prepare
if: ${{ !github.event.act }} && needs.Prepare.outputs.pr_changed_source == 'true'
name: Cross test name: Cross test
if: ${{ !github.event.act }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Crate - name: Checkout Crate
@ -150,6 +157,7 @@ jobs:
Embedded: Embedded:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
RUSTFLAGS: "-C link-arg=-Tlink.x" RUSTFLAGS: "-C link-arg=-Tlink.x"
@ -175,6 +183,7 @@ jobs:
ASAN: ASAN:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Address sanitizer # hashes crate only. name: Address sanitizer # hashes crate only.
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -197,6 +206,7 @@ jobs:
WASM: WASM:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: WebAssembly Build # hashes crate only. name: WebAssembly Build # hashes crate only.
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -215,6 +225,7 @@ jobs:
Schemars: Schemars:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Schemars name: Schemars
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -232,6 +243,8 @@ jobs:
run: ./contrib/run_task.sh ${{ matrix.crate }} ${{ matrix.task }} run: ./contrib/run_task.sh ${{ matrix.crate }} ${{ matrix.task }}
Kani: Kani:
needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: 'Checkout your code.' - name: 'Checkout your code.'