From 6ac6d0c3406057b5ec19a521cf3839cbcd92478e Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 14 Nov 2023 03:53:28 -0800 Subject: [PATCH] tests,misc: Add "build/ALL/gem5.fast" Clang compilation to CI (#432) While we do run compiler tests weekly, 9/10 the issue is a strict check in clang we did not check before incorporating code into the codebase. Therefore, running a clang compilation as part of our CI would help us catch errors quicker. --- .github/workflows/ci-tests.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index 08ec318660..49928faf20 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -89,6 +89,22 @@ jobs: build-matrix: ${{ steps.build-matrix.outputs.build-matrix }} test-dirs-matrix: ${{ steps.dir-matrix.outputs.test-dirs-matrix }} + clang-fast-compilation: + # gem5 binaries built in `quick-gem5-builds` always use GCC. + # Clang is more strict than GCC. This job checks that gem5 compiles + # with Clang. It compiles build/ALL/gem5.fast to maximize the change + # for compilation error to be exposed. + runs-on: [self-hosted, linux, x64] + if: github.event.pull_request.draft == false + container: ghcr.io/gem5/clang-version-16:latest + needs: [pre-commit, check-for-change-id] + timeout-minutes: 90 + steps: + - uses: actions/checkout@v3 + - name: Clang Compilation + working-directory: ${{ github.workspace }} + run: scons build/ALL/gem5.fast -j $(nproc) + testlib-quick-gem5-builds: runs-on: [self-hosted, linux, x64] if: github.event.pull_request.draft == false