ponio CI - [midnight] #213
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: | |
workflow_dispatch: # allows manual triggering | |
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 new commit or manual triggering (not at midnight) | |
if: needs.check_new_commit.outputs.nb_commits > 0 || github.event.schedule != '* 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.13.0 | |
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 |