-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected] | ||
run: spack install [email protected] && spack buildache push sundials_spack_cache llvm | ||
run: spack install [email protected] && 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 | ||
|
||
|