forked from input-output-hk/Lean-blaster
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (95 loc) · 3.09 KB
/
ci-linux.yaml
File metadata and controls
115 lines (95 loc) · 3.09 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: ci-linux
on:
pull_request:
push:
branches: [ staging, main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
LEAN_VERSION: "4.24.0"
Z3_VERSION: "4.15.4"
GLIBC_Z3: "2.39"
jobs:
build:
runs-on:
labels: ubuntu-latest
steps:
- name: Setup Lean
run: |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y
echo "/home/runner/.elan/bin" >> $GITHUB_PATH
chmod +x /home/runner/.elan/bin/*
- name: Fix Elan version
run: |
elan toolchain install ${{ env.LEAN_VERSION }}
elan default ${{ env.LEAN_VERSION }}
- name: Install Z3
run: |
cd /home/runner/
wget -q https://github.com/Z3Prover/z3/releases/download/z3-${{ env.Z3_VERSION }}/z3-${{ env.Z3_VERSION }}-x64-glibc-${{ env.GLIBC_Z3 }}.zip
unzip -q z3-${{ env.Z3_VERSION }}-x64-glibc-${{ env.GLIBC_Z3 }}.zip
chmod +x z3-${{ env.Z3_VERSION }}-x64-glibc-${{ env.GLIBC_Z3 }}.zip
echo "/home/runner/z3-${{ env.Z3_VERSION }}-x64-glibc-${{ env.GLIBC_Z3 }}/bin" >> $GITHUB_PATH
- name: Tools version
run: |
elan --version
lake --version
lean --version
z3 --version
- name: Cache Z3
uses: actions/cache@v3
id: z3-cache
with:
path: /home/runner/z3-${{ env.Z3_VERSION }}-x64-glibc-${{ env.GLIBC_Z3 }}/bin
key: z3-${{ env.Z3_VERSION }}
restore-keys: z3-
- name: Cache .elan
uses: actions/cache@v3
id: elan-cache
with:
path: /home/runner/.elan/bin
key: elan-${{ env.LEAN_VERSION }}
restore-keys: elan-
check-packages:
needs: build
runs-on: ubuntu-latest-16-cores
strategy:
matrix:
pkg:
- { cmd: solver, name : Solver }
# - { cmd: tests, name : Tests }
steps:
- uses: actions/checkout@v4
- name: Restore Lean
uses: actions/cache@v3
with:
path: /home/runner/.elan/bin
key: elan-${{ env.LEAN_VERSION }}
restore-keys: elan-
- name: Restore Z3
uses: actions/cache@v3
with:
path: /home/runner/z3-${{ env.Z3_VERSION }}-x64-glibc-${{ env.GLIBC_Z3 }}/bin
key: z3-${{ env.Z3_VERSION }}
restore-keys: z3-
- name: Add Lean to PATH
run: |
echo "/home/runner/.elan/bin" >> $GITHUB_PATH
echo "/home/runner/z3-${{ env.Z3_VERSION }}-x64-glibc-${{ env.GLIBC_Z3 }}/bin" >> $GITHUB_PATH
- name: Configure Lean toolchain
run: elan default ${{ env.LEAN_VERSION }}
- name: Tools version
run: |
elan --version
lake --version
lean --version
z3 --version
- name: Build and Validate ${{ matrix.pkg.name }} Project
run: make check_${{ matrix.pkg.cmd }}
- name: Upload build log
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.pkg.cmd }}-build
path: ./${{ matrix.pkg.name }}/build.log