Skip to content

Commit

Permalink
Merge pull request #386 from Nadrieril/speedup-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril authored Dec 4, 2024
2 parents 7fe487e + c1cae44 commit f1bf71d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,32 @@ jobs:
- run: nix build -L .#aeneas
- run: nix build -L .#checks.x86_64-linux.default

diff_lean_files:
runs-on: [self-hosted, linux, nix]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # deep clone in order to get access to other commits
- id: skip_check
run: |
# Compares this version with `main`, and checks whether the lean files changed.
if git diff origin/main --quiet -- tests/lean && git diff origin/main --quiet -- backends/lean; then
echo 'lean files were not changed in this PR.'
echo "CHECK_LEAN=false" >> "$GITHUB_ENV"
else
echo 'lean files were changed in this PR.'
echo "CHECK_LEAN=true" >> "$GITHUB_ENV"
fi
outputs:
check_lean: ${{ env.CHECK_LEAN }}

lean:
needs: [diff_lean_files]
runs-on: [self-hosted, linux, nix]
if: needs.diff_lean_files.outputs.check_lean == 'true'
steps:
# Lean cannot run its tests in the sandbox because `elan` will download things
- uses: actions/checkout@v4
# Lean cannot run its tests in the nix sandbox because `elan` will download things
- run: nix develop --command bash -c "cd tests/lean && make"

charon-pin-is-forward:
Expand Down
16 changes: 0 additions & 16 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f1bf71d

Please sign in to comment.