diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-12 09:26:08 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-09-08 10:34:04 +0200 |
commit | f879a64a027e3eb45631b6d4a1f31a26017482ca (patch) | |
tree | 67859e513040cef03148fef894c654ba68807251 | |
parent | 968b8ead235a0eb10226e784cfd6bd2cf90bc890 (diff) |
Do not depend on fmt/clippy in long-running jobs
The build and test jobs take a really long time (approx 17 minutes for
the arm32 test job). We cannot afford to wait on cargo-fmt and
cargo-clippy with those, so remove the dependencies here to get a faster
overall time.
Instead, only depend on the "changes" job, so we only run if there are
rust/workflow changes.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | .github/workflows/pull-request-checks.yml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/pull-request-checks.yml index 5c083605..5e616841 100644 --- a/.github/workflows/pull-request-checks.yml +++ b/.github/workflows/pull-request-checks.yml @@ -214,7 +214,8 @@ jobs: runs-on: Ubuntu-20.04 env: RUSTFLAGS: -D warnings - needs: [cargo-fmt, cargo-clippy] + needs: changes + if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.workflows == 'true' }} steps: - name: Checkout @@ -255,7 +256,8 @@ jobs: runs-on: Ubuntu-20.04 env: RUSTFLAGS: -D warnings - needs: [cargo-fmt, cargo-clippy] + needs: changes + if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.workflows == 'true' }} steps: - name: Checkout @@ -288,7 +290,8 @@ jobs: runs-on: Ubuntu-20.04 env: RUSTFLAGS: -D warnings - needs: [cargo-fmt, cargo-clippy] + needs: changes + if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.workflows == 'true' }} steps: - name: checkout @@ -316,7 +319,8 @@ jobs: runs-on: Ubuntu-20.04 env: RUSTFLAGS: -D warnings - needs: [cargo-fmt, cargo-clippy] + needs: changes + if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.workflows == 'true' }} steps: - name: checkout |