generated from mmasdeu/topologygame
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.36 KB
/
update_mathlib.yml
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
# This is a basic workflow to help you get started with Actions
name: Update Mathlib and build
# Controls when the workflow will run
on:
schedule:
- cron: '0 2 * * 0' # every Sunday
# Triggers the workflow on push or pull request events but only for the main and test branch
push:
branches: [ main, test ]
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- name: Checkout ${{ github.ref_name }} branch
uses: actions/checkout@v2
with:
ref: ${{ github.ref_name }}
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Update packages
run: sudo apt install -y curl
- name: Install elan
run: |
set -o pipefail
curl https://raw.githubusercontent.com/Kha/elan/master/elan-init.sh -sSf | sh -s -- -v -y
sudo ln -s $HOME/.elan/bin/* /usr/local/bin;
- name: Install python Lean dependencies
run: |
python -m pip install --upgrade pip mathlibtools
- name: Try to upgrade Lean and dependencies (${{ github.ref_name }})
run: |
leanproject up
leanproject build
- name: Try to upgrade Lean and dependencies (main)
if: ${{ github.event_name == 'schedule' }}
run: |
git checkout main
leanproject up
leanproject build