Skip to content

Commit ffbb301

Browse files
authored
Revert "Only run cargo check when rust code is changed (#7572)"
This reverts commit ad66d9a.
1 parent a49ce5b commit ffbb301

1 file changed

Lines changed: 1 addition & 41 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -32,42 +32,6 @@ env:
3232
CARGO_TERM_COLOR: always
3333

3434
jobs:
35-
determine_changes:
36-
name: Determine changes
37-
runs-on: ubuntu-latest
38-
outputs:
39-
# Flag that is raised when any rust code is changed.
40-
rust_code: ${{ steps.check_rust_code.outputs.changed }}
41-
steps:
42-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43-
with:
44-
fetch-depth: 0
45-
persist-credentials: false
46-
47-
- name: Determine merge base
48-
id: merge_base
49-
run: |
50-
sha=$(git merge-base HEAD "origin/${BASE_REF}")
51-
echo "sha=${sha}" >> "$GITHUB_OUTPUT"
52-
env:
53-
BASE_REF: ${{ github.event.pull_request.base.ref || 'main' }}
54-
55-
- name: Check if there was any code related change
56-
id: check_rust_code
57-
run: |
58-
if git diff --quiet "${MERGE_BASE}...HEAD" -- \
59-
':!Lib/**' \
60-
':!scripts/**' \
61-
':!extra_tests/**' \
62-
':.github/workflows/ci.yaml' \
63-
; then
64-
echo "changed=false" >> "$GITHUB_OUTPUT"
65-
else
66-
echo "changed=true" >> "$GITHUB_OUTPUT"
67-
fi
68-
env:
69-
MERGE_BASE: ${{ steps.merge_base.outputs.sha }}
70-
7135
rust_tests:
7236
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
7337
env:
@@ -145,13 +109,9 @@ jobs:
145109
if: runner.os == 'Linux'
146110

147111
cargo_check:
112+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
148113
name: cargo check
149114
runs-on: ${{ matrix.os }}
150-
needs:
151-
- determine_changes
152-
if: |
153-
!contains(github.event.pull_request.labels.*.name, 'skip:ci') &&
154-
needs.determine_changes.outputs.rust_code == 'true'
155115
strategy:
156116
matrix:
157117
include:

0 commit comments

Comments
 (0)