ponio CI - [midnight] #518
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
name: ponio CI - [midnight] | |
on: | |
schedule: | |
- cron: "0 0 * * *" # runs daily at 00:00 | |
jobs: | |
check_new_commit: | |
runs-on: ubuntu-latest | |
outputs: | |
nb_commits: ${{ steps.new_commits.outputs.nb_commits }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: new_commits | |
run: echo "nb_commits=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT | |
clang-tidy-check: | |
needs: check_new_commit | |
if: github.repository == 'hpc-maths/ponio' && needs.check_new_commit.outputs.nb_commits > 0 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/ccache | |
key: clang-tidy | |
- uses: prefix-dev/[email protected] | |
with: | |
pixi-version: v0.26.1 | |
cache: true | |
- name: Install Python | |
run: pixi add python | |
- name: Install clang-tidy | |
shell: pixi run bash {0} | |
run: | | |
pixi add clang-tools cxx-compiler clang clangxx | |
pip install compdb | |
- name: Configure | |
shell: pixi run bash {0} | |
run: | | |
pixi run build_debug | |
compdb -p build list > compile_commands.json | |
- name: Run clang-tidy on ponio | |
shell: pixi run bash {0} | |
run: | | |
run-clang-tidy | |
# long time tests | |
long-test: | |
needs: check_new_commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: prefix-dev/[email protected] | |
with: | |
pixi-version: v0.26.1 | |
cache: true | |
- name: Install compiler and Python | |
run: pixi add cxx-compiler python | |
- name: Install samurai | |
run: pixi add samurai | |
- name: Build | |
run: pixi run build_long_test | |
- name: Run tests | |
run: pixi run long_test |