-
Notifications
You must be signed in to change notification settings - Fork 8
112 lines (96 loc) · 3.24 KB
/
ci-ubuntu.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
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
name: Ubuntu
on:
push:
branches:
- main
pull_request:
branches:
- main
########################################################################
## CONFIGURATION
##
## Key variables:
##
## IDRIS2_COMMIT picks the version of Idris2 to use to build the library.
## It can either be:
## - a branch,
## - a hash of a specific commit (to target a bugfix for instance),
## - or a tag e.g. tags/v0.4.0 (to target a released version).
##
## COLLIE_VERSION and IDRALL_COMMIT follow the same logic.
##
## SCHEME is the scheme executable used to bootstrap Idris2
########################################################################
env:
IDRIS2_COMMIT: 9e84b153bd3d7d5a63ec9e6a9adfa47a067ea172
COLLIE_COMMIT: ed2eda5e04fbd02a7728e915d396e14cc7ec298e
IDRALL_COMMIT: 62a455894b1db5134c8b56d31aadb31d483a4b2c
SCHEME: scheme
########################################################################
## BUILD
########################################################################
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Initialise variables
run: |
# Only deploy if the build follows from pushing to main
if [[ '${{ github.ref }}' == 'refs/heads/main' ]]; then
echo "KATLA_DEPLOY=true" >> $GITHUB_ENV
fi
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
# This caching step allows us to save a lot of building time by only
# self-hosting Idris2 from boostrap if absolutely necessary
- name: Cache Idris2
uses: actions/cache@v2
id: cache-idris2
with:
path: |
~/.idris2
key: ${{ runner.os }}-${{ env.IDRIS2_COMMIT }}-${{ env.COLLIE_COMMIT }}-${{ env.IDRALL_COMMIT }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y chezscheme
sudo apt-get install -y texlive texlive-fonts-extra
- name: Install Idris2 & its API
if: steps.cache-idris2.outputs.cache-hit != 'true'
run: |
git clone https://github.com/idris-lang/idris2
cd idris2
git checkout ${{ env.IDRIS2_COMMIT }}
make bootstrap && make install
make clean
make && make install
idris2 --install idris2api.ipkg
- name: Download and install Collie from github
if: steps.cache-idris2.outputs.cache-hit != 'true'
run: |
git clone https://github.com/ohad/collie
cd collie
git checkout ${{ env.COLLIE_COMMIT }}
make install
cd ..
- name: Download and install Idrall from github
if: steps.cache-idris2.outputs.cache-hit != 'true'
run: |
git clone https://github.com/alexhumphreys/idrall/
cd idrall
git checkout ${{ env.IDRALL_COMMIT }}
make install
cd ..
- name: Checkout Katla
uses: actions/checkout@v2
- name: Build package
run: make
- name: Run tests
run: make test INTERACTIVE=''
- name: Build HTML doc
run: make doc
- name: Deploy HTML
uses: JamesIves/[email protected]
if: ${{ success() && env.KATLA_DEPLOY }}
with:
branch: gh-pages
folder: build/docs/