Skip to content

Commit a171530

Browse files
authored
Fix #9: Add CI (#11)
* Add CI * Try setup-agda@main, add more Agda versions We should use @latest, not @main, but see wenkokke/setup-agda#205 * Mention CI in README.md * README: fix wording
1 parent a9a7fa1 commit a171530

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed

.github/workflows/agda-ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: agda-ci
2+
3+
on:
4+
push: { branches: [master] }
5+
pull_request: { branches: [master] }
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
name: Agda ${{ matrix.agda }} on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest]
17+
agda:
18+
## we need std-lib >= 1.0 which is not compatible with Agda 2.5.*
19+
# - 2.6.0.1 ## build error: Ambiguous module Wk
20+
- 2.6.1.3
21+
- 2.6.2.2
22+
- 2.6.3
23+
- 2.6.4
24+
- 2.6.4.1
25+
26+
steps:
27+
28+
# Checkout to $HOME empties $HOME so we have to do it before we put stuff there.
29+
- uses: actions/checkout@v4
30+
31+
- name: Setup Agda
32+
uses: wenkokke/setup-agda@main
33+
# 2024-01-24 we should use @latest but this does not have 2.6.4.1 yet
34+
# https://github.com/wenkokke/setup-agda/issues/205
35+
id: setup
36+
with:
37+
agda-version: ${{ matrix.agda }}
38+
agda-stdlib-version: recommended
39+
40+
- name: Restore cache
41+
uses: actions/cache/restore@v4
42+
id: cache
43+
env:
44+
key: ${{ runner.os }}-agda-${{ steps.setup.outputs.agda-version }}
45+
with:
46+
key: ${{ env.key }}-commit-${{ github.sha }}
47+
restore-keys: ${{ env.key }}-
48+
path: |
49+
_build
50+
~/.agda/libraries.d
51+
52+
- name: Build
53+
run: make
54+
55+
- name: Save cache
56+
if: always()
57+
uses: actions/cache/save@v4
58+
with:
59+
key: ${{ steps.cache.outputs.cache-primary-key }}
60+
path: |
61+
_build
62+
~/.agda/libraries.d

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@ Since then, the project has been extended in the following ways:
2727
### Dependencies ###
2828

2929
This project is written in Agda.
30-
It has been tested to be working with Agda version 2.6.2 and its standard library.
30+
It is compatible with Agda version ≥ 2.6.1 and the
31+
[matching standard library](https://wiki.portal.chalmers.se/agda/Libraries/StandardLibrary).
32+
The full list of tested Agda versions can be found in the
33+
[continuous integration script](.github/workflows/agda-ci.yml).

0 commit comments

Comments
 (0)