Check release build profile in CI
authorElias Rohrer <ero@tnull.de>
Fri, 10 Jun 2022 08:45:57 +0000 (10:45 +0200)
committerElias Rohrer <ero@tnull.de>
Fri, 10 Jun 2022 13:22:31 +0000 (15:22 +0200)
So far, CI did not check the code in the `release` build profile, which
could result in some things not getting caught. To fix this, we now
implement a new CI job that runs checks in the `release` profile.

Switch to stable toolchain.

.github/workflows/build.yml

index 59a11b4e4a11efc7788b51fe04ad664ca15da7f9..68cf376235f7edcb1e812da6027da9e608e97ed2 100644 (file)
@@ -275,6 +275,27 @@ jobs:
       - name: For each commit, run cargo check (including in fuzz)
         run: ci/check-each-commit.sh upstream/main
 
+  check_release:
+    runs-on: ubuntu-latest
+    env:
+      TOOLCHAIN: stable
+    steps:
+      - name: Checkout source code
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+      - name: Install Rust ${{ env.TOOLCHAIN }} toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: ${{ env.TOOLCHAIN }}
+          override: true
+          profile: minimal
+      - name: Run cargo check for release build.
+        run: |
+          cargo check --release
+          cargo check --no-default-features --features=no-std --release
+          cargo doc --release
+
   fuzz:
     runs-on: ubuntu-latest
     env: