Skip to content

Commit

Permalink
Try to show a summary after the CI run (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasgrosser authored May 23, 2024
1 parent e2ef2b9 commit 8151bf5
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permissions:
jobs:
build:
name: core library
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
Expand All @@ -32,4 +34,21 @@ jobs:
- name: Compile Alive Examples
run: |
lake -R exe cache get # download cache of mathlib docs.
lake -R build AliveExamples
lake -R build AliveExamples 2>&1 | tee out
echo `grep theorem SSA/Projects/InstCombine/AliveStatements.lean | wc -l` > all
grep 'Alive.*sorry' out | wc -l > failed
x=$((`cat all` - `cat failed`)); echo $x > diff
echo "ALIVE_SUCCESS=$(cat diff)" >> $GITHUB_ENV
echo "ALIVE_ALL=$(cat all)" >> $GITHUB_ENV
echo "ALIVE_FAILED=$(cat failed)" >> $GITHUB_ENV
- uses: actions/github-script@v6
if: github.event_name == 'pull_request'
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Alive Statistics: ${{env.ALIVE_SUCCESS}} / ${{env.ALIVE_ALL}} (${{env.ALIVE_FAILED}} failed)`
})

0 comments on commit 8151bf5

Please sign in to comment.