-
Notifications
You must be signed in to change notification settings - Fork 36
86 lines (84 loc) · 2.43 KB
/
ci.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
name: Ubuntu
on:
push:
branches:
- '**'
tags:
- '**'
pull_request:
branches:
- main
env:
SCHEME: scheme
jobs:
build-idris2-with-api:
runs-on: ubuntu-latest
env:
IDRIS2_CG: chez
IDRIS2_TESTS_CG: chez
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Idris2 commit
id: get-idris2-commit
run: echo "idris2-commit=$(git rev-parse @:./Idris2)" >> $GITHUB_ENV
- name: Cache Idris2 with API
id: cache-idris2-with-api
uses: actions/cache@v2
with:
path: ~/.idris2/
key: ${{ env.idris2-commit }}-idris2-with-api
- name: Get Idris2 Submodule
if: steps.cache-idris2-with-api.outputs.cache-hit != 'true'
run: |
git submodule update --init Idris2
- name: Install build dependencies
if: steps.cache-idris2-with-api.outputs.cache-hit != 'true'
run: |
sudo apt-get install -y chezscheme
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
- name: Build Idris2 with API
if: steps.cache-idris2-with-api.outputs.cache-hit != 'true'
working-directory: Idris2
run: |
make bootstrap && make install
make clean
make all && make install
make install-api
- name: Artifact Idris2 with API
uses: actions/upload-artifact@v4
with:
name: installed-idris2-with-api
path: ~/.idris2/
retention-days: 1
include-hidden-files: true
build:
runs-on: ubuntu-latest
needs: build-idris2-with-api
env:
IDRIS2_CG: chez
IDRIS2_TESTS_CG: chez
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Idris2 with API Artifact
uses: actions/download-artifact@v4
with:
name: installed-idris2-with-api
path: ~/.idris2/
- name: Install build dependencies
run: |
sudo apt-get install -y chezscheme
echo "$HOME/.idris2/bin" >> $GITHUB_PATH
chmod +x $HOME/.idris2/bin/idris2 $HOME/.idris2/bin/idris2_app/*
- name: Get LSP-lib submodule
run: |
git submodule update --init LSP-lib
- name: Build and install LSP-lib
working-directory: LSP-lib
run: |
idris2 --install-with-src
- name: build and test
run: |
make build && make test INTERACTIVE=''
shell: bash