-
Notifications
You must be signed in to change notification settings - Fork 71
115 lines (95 loc) · 2.92 KB
/
idris1.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
113
114
115
name: Idris1 on Ubuntu
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- main
jobs:
# -- [ Build ]
build:
# ---- [ Initialise Build Environment ]
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
emacs: [27.2, 28.2, 29.3]
idris: [git, stackage]
env:
EMACS_VERSION: ${{ matrix.emacs }}
IDRIS_VERSION: ${{ matrix.idris }}
# ---- [ Steps to Run ]
steps:
# ----- [ Steps Dependencies ]
- name: Fetch Dependencies
run: sudo apt install -y libgc-dev libgif-dev libxaw7-dev openssl
# ----- [ Initialise Variables ]
- name: Initialise variables
run: |
mkdir -p $HOME/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
# ----- [ Emacs ]
- name: Fetch Emacs
uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs }}
# ----- [ Caches ]
- name: Cache stack global package-db
id: stack-global
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ matrix.idris }}
restore-keys: |
${{ runner.os }}-stack-global-${{ matrix.idris }}
- name: Cache stack-installed programs in ~/.local/bin
id: stack-programs
uses: actions/cache@v3
with:
path: ~/.local/bin
key: ${{ runner.os }}-stack-programs-${{ matrix.idris }}
restore-keys: |
${{ runner.os }}-stack-programs-${{ matrix.idris }}
- name: Cache .stack-work
uses: actions/cache@v3
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ matrix.idris }}
restore-keys: |
${{ runner.os }}-stack-work-${{ matrix.idris }}
- name: Cache idris-dev-git/
if: matrix.idris == 'git'
id: idris-dev-git
uses: actions/cache@v3
with:
path: ~/idris-dev-git/
key: ${{ runner.os }}-idris-dev-stack-work-${{ matrix.idris }}
restore-keys: |
${{ runner.os }}-idris-dev-stack-work-${{ matrix.idris }}
# ----- [ Idris from GIT ]
- name: Install Idris from GIT
if: matrix.idris == 'git' && steps.idris-dev-git.outputs.cache-hit != 'true'
run: |
pushd .
git clone https://github.com/idris-lang/Idris-dev.git ~/idris-dev-git
cd ~/idris-dev-git
stack --no-terminal install --flag idris:-FFI --flag idris:-GMP
popd
idris --info
# ----- [ Idris from Stack ]
- name: Install Idris from Stackage
if: matrix.idris == 'stackage' && steps.stack-program.outputs.cache-hit != 'true'
run: |
stack install --resolver lts-12.26 idris
# ----- [ Checkout and Run]
- name: Checkout
uses: actions/checkout@v3
- name: Run Tests
run: |
make clean
make build
make test
# -- EOF