Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add nightly testing YAML to test with #138

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/nightly-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bump lean-toolchain on nightly-testing

on:
workflow_dispatch:
# schedule:
# - cron: '0 10/3 * * *' # Run every three hours, starting at 11AM CET/2AM PT.

jobs:
update-toolchain:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: nightly-testing # checkout nightly-testing branch
token: ${{ secrets.NIGHTLY_TESTING }}

- name: Get latest release tag from leanprover/lean4-nightly
id: get-latest-release
run: |
RELEASE_TAG="$(curl -s "https://api.github.com/repos/leanprover/lean4-nightly/releases" | jq -r '.[0].tag_name')"
echo "RELEASE_TAG=$RELEASE_TAG" >> "${GITHUB_ENV}"

- name: Update lean-toolchain file
run: |
echo "leanprover/lean4:${RELEASE_TAG}" > lean-toolchain

- name: Commit and push changes
run: |
git config user.name "verso-lean-bot"
git config user.email "[email protected]"
git add lean-toolchain
# Don't fail if there's nothing to commit
git commit -m "chore: bump to ${RELEASE_TAG}" || true
# rebase on top of main - this branch should only contain toolchain updates
git fetch origin/main
git rebase origin/main
git push -f origin nightly-testing
Loading