forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 2.33 KB
/
nightly_merge_master.yml
File metadata and controls
55 lines (49 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This job merges every commit to `master` into `nightly-testing`, resolving merge conflicts in favor of `nightly-testing`.
name: Merge master to nightly
on:
schedule:
- cron: '30 0 * * *' # At 00:30 UTC every day.
workflow_dispatch:
jobs:
merge-to-nightly:
runs-on: ubuntu-latest
if: github.repository == 'leanprover-community/mathlib4'
steps:
- name: Checkout nightly-testing from fork
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: leanprover-community/mathlib4-nightly-testing
ref: nightly-testing
path: nightly-testing
token: ${{ secrets.NIGHTLY_TESTING }}
fetch-depth: 0
- name: Configure Lean
uses: leanprover/lean-action@434f25c2f80ded67bba02502ad3a86f25db50709 # v1.3.0
with:
auto-config: false
use-github-cache: false
use-mathlib-cache: false
lake-package-directory: "nightly-testing" # We will run `lake update` here later.
- name: Configure Git User
run: |
cd nightly-testing
git config user.name "leanprover-community-mathlib4-bot"
git config user.email "leanprover-community-mathlib4-bot@users.noreply.github.com"
- name: Merge master to nightly favoring nightly changes
run: |
cd nightly-testing
git remote add upstream https://github.com/leanprover-community/mathlib4.git
git fetch upstream master
# Merge master into nightly-testing, resolving conflicts in favor of nightly-testing
# If the merge goes badly, we proceed anyway via '|| true'.
# CI will report failures on the 'nightly-testing' branch direct to Zulip.
git merge upstream/master --strategy-option ours --no-commit --allow-unrelated-histories || true
# We aggressively run `lake update`, to avoid having to do this by hand.
# When Batteries changes break Mathlib, this will likely show up on nightly-testing first.
lake update -v
git add .
# If there's nothing to do (because there are no new commits from master),
# that's okay, hence the '|| true'.
git commit -m "Merge master into nightly-testing" || true
# Push to the mathlib4-nightly-testing fork
git push origin nightly-testing