From 7f3718c9e24997f8219ca8b5f5587d403d56aa97 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 15 Nov 2023 10:32:50 -0700 Subject: [PATCH] change to ubuntu 22 --- .github/workflows/clang-format-compliance.yml | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/clang-format-compliance.yml b/.github/workflows/clang-format-compliance.yml index 1a802037a8..e38e511c86 100644 --- a/.github/workflows/clang-format-compliance.yml +++ b/.github/workflows/clang-format-compliance.yml @@ -7,7 +7,7 @@ on: jobs: clang_format_check: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: # - run: sudo apt-get -yqq update && sudo apt-get -yqq install --no-install-recommends gnupg2 software-properties-common wget # - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - @@ -25,17 +25,29 @@ jobs: run: echo "$PWD/spack/bin" >> "$GITHUB_PATH" - name: Setup Spack Binary Cache - run: spack mirror add --oci-username ${{ github.actor }} --oci-password ${{ secrets.OCI_TOKEN }} sundials_spack_cache oci://ghcr.io/LLNL/sundials_spack_cache + run: | + spack mirror add v0.21.0 https://binaries.spack.io/v0.21.0 + spack mirror add --oci-username ${{ github.actor }} --oci-password ${{ secrets.OCI_TOKEN }} sundials_spack_cache oci://ghcr.io/LLNL/sundials_spack_cache + spack buildcache keys --install --trust - name: Spack install llvm@17.0.4 - run: spack install llvm@17.0.4 && spack buildache push sundials_spack_cache llvm + run: spack install llvm@17.0.4 && spack load llvm + - name: Push to buildcache + if: ${{ !cancelled() }} + run: spack buildache push sundials_spack_cache llvm + - name: Check out repository code uses: actions/checkout@v4 - name: Run checker on code - run: find ${{ github.workspace }} -name fmod -prune -iname *.h -o -iname *.hpp -o -iname *.c -o -iname *.cpp -o -iname *.cuh -o -iname *.cu | xargs clang-format -i - + run: | + clang-formtat --version + find ${{ github.workspace }} \ + -name fmod -prune -iname *.h -o -iname *.hpp \ + -o -iname *.c -o -iname *.cpp -o -iname *.cuh -o -iname *.cu \ + | xargs clang-format -i + - name: Run git diff to see if anything changed run: git diff --name-only --exit-code