Skip to content

Commit 808e442

Browse files
committed
add CI action to check that generated files are correctly checked in
1 parent ee61083 commit 808e442

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/main.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,28 @@ jobs:
255255
env:
256256
TARGET: ${{ matrix.target.tuple }}
257257

258+
# Check that the generated files agree with the checked-in versions.
259+
check-stdarch-gen:
260+
needs: [style]
261+
name: Build std_detect
262+
runs-on: ubuntu-latest
263+
steps:
264+
- uses: actions/checkout@v4
265+
- name: Install Rust
266+
run: rustup update nightly && rustup default nightly
267+
- name: Check arm spec
268+
run: |
269+
cargo run --bin=stdarch-gen-arm --release -- crates/stdarch-gen-arm/spec
270+
git diff --exit-code
271+
- name: Check lsx.spec
272+
run: |
273+
cargo run --bin=stdarch-gen-loongarch -- crates/stdarch-gen-loongarch/lsx.spec
274+
git diff --exit-code
275+
- name: Check lasx.spec
276+
run: |
277+
cargo run --bin=stdarch-gen-loongarch -- crates/stdarch-gen-loongarch/lasx.spec
278+
git diff --exit-code
279+
258280
build-std-detect:
259281
needs: [style]
260282
name: Build std_detect
@@ -271,6 +293,7 @@ jobs:
271293
- verify
272294
- test
273295
- build-std-detect
296+
- check-stdarch-gen
274297
runs-on: ubuntu-latest
275298
# We need to ensure this job does *not* get skipped if its dependencies fail,
276299
# because a skipped job is considered a success by GitHub. So we have to

0 commit comments

Comments
 (0)