about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFolkert de Vries <folkert@folkertdev.nl>2025-07-16 16:50:34 +0200
committerFolkert de Vries <folkert@folkertdev.nl>2025-07-18 11:13:59 +0200
commit194aa89fdd2e627b7842e2f0b7a0db3263613e40 (patch)
tree7b978f489db84fc809840b680aa13003ceffaf5e
parent0d9d2094178fcaa1cae5b71d18198859bdaa40bf (diff)
downloadrust-194aa89fdd2e627b7842e2f0b7a0db3263613e40.tar.gz
rust-194aa89fdd2e627b7842e2f0b7a0db3263613e40.zip
add CI action to check that generated files are correctly checked in
-rw-r--r--library/stdarch/.github/workflows/main.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/library/stdarch/.github/workflows/main.yml b/library/stdarch/.github/workflows/main.yml
index 8c6dee16fb6..59aad0b5d01 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