From 194aa89fdd2e627b7842e2f0b7a0db3263613e40 Mon Sep 17 00:00:00 2001 From: Folkert de Vries Date: Wed, 16 Jul 2025 16:50:34 +0200 Subject: [PATCH] add CI action to check that generated files are correctly checked in --- library/stdarch/.github/workflows/main.yml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/library/stdarch/.github/workflows/main.yml b/library/stdarch/.github/workflows/main.yml index 8c6dee16fb61..59aad0b5d014 100644 --- a/library/stdarch/.github/workflows/main.yml +++ b/library/stdarch/.github/workflows/main.yml @@ -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