add CI action to check that generated files are correctly checked in

This commit is contained in:
Folkert de Vries 2025-07-16 16:50:34 +02:00
parent 0d9d209417
commit 194aa89fdd
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -255,6 +255,28 @@ jobs:
env:
TARGET: ${{ matrix.target.tuple }}
# Check that the generated files agree with the checked-in versions.
check-stdarch-gen:
needs: [style]
name: Check stdarch-gen-{arm, loongarch} output
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly && rustup default nightly && rustup component add rustfmt
- name: Check arm spec
run: |
cargo run --bin=stdarch-gen-arm --release -- crates/stdarch-gen-arm/spec
git diff --exit-code
- name: Check lsx.spec
run: |
cargo run --bin=stdarch-gen-loongarch --release -- crates/stdarch-gen-loongarch/lsx.spec
git diff --exit-code
- name: Check lasx.spec
run: |
cargo run --bin=stdarch-gen-loongarch --release -- crates/stdarch-gen-loongarch/lasx.spec
git diff --exit-code
build-std-detect:
needs: [style]
name: Build std_detect
@ -271,6 +293,7 @@ jobs:
- verify
- test
- build-std-detect
- check-stdarch-gen
runs-on: ubuntu-latest
# We need to ensure this job does *not* get skipped if its dependencies fail,
# because a skipped job is considered a success by GitHub. So we have to