Skip to content

Commit 55ba455

Browse files
committed
Default to Agda 2.8.0; cosmetics
1 parent 1451597 commit 55ba455

File tree

5 files changed

+61
-62
lines changed

5 files changed

+61
-62
lines changed

.github/workflows/example.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
11
name: Example Usage
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
- master
9+
workflow_dispatch:
410

511
permissions:
612
contents: read
713

814
jobs:
915
example:
1016
runs-on: ubuntu-latest
11-
17+
1218
steps:
1319
- name: Checkout repository
1420
uses: actions/checkout@v5
15-
21+
1622
- name: Setup Agda
1723
id: setup-agda
18-
uses: agda/agda-setup-action@v1
24+
uses: agda/agda-setup-action@master
1925
with:
2026
agda-version: '2.8.0'
2127
agda-stdlib-version: '2.3'
22-
28+
2329
- name: Show Agda info
2430
run: |
2531
echo "Agda path: ${{ steps.setup-agda.outputs.agda-path }}"
2632
echo "Agda dir: ${{ steps.setup-agda.outputs.agda-dir }}"
2733
agda --version
28-
34+
2935
- name: Create a simple Agda file
3036
run: |
3137
cat > Example.agda << 'EOF'
3238
module Example where
33-
39+
3440
open import Data.Bool.Base
3541
open import Data.Nat.Base
36-
42+
3743
example : Bool
3844
example = true
3945
EOF
40-
46+
4147
- name: Type-check Agda file
4248
run: agda Example.agda

.github/workflows/test.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Test Action
33
on:
44
push:
55
branches:
6-
- main
76
- master
87
- 'copilot/**'
98
pull_request:
9+
- master
1010
workflow_dispatch:
1111

1212
permissions:
@@ -16,16 +16,8 @@ jobs:
1616
test:
1717
strategy:
1818
matrix:
19-
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
20-
include:
21-
- os: ubuntu-latest
22-
agda-stdlib-version: '2.3'
23-
- os: windows-latest
24-
agda-stdlib-version: ''
25-
- os: macos-latest
26-
agda-stdlib-version: '2.3'
27-
- os: macos-13
28-
agda-stdlib-version: ''
19+
os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
20+
agda-stdlib-version: ['2.3']
2921
runs-on: ${{ matrix.os }}
3022
steps:
3123
- name: Checkout
@@ -43,17 +35,15 @@ jobs:
4335
echo "Agda path: ${{ steps.setup.outputs.agda-path }}"
4436
echo "Agda dir: ${{ steps.setup.outputs.agda-dir }}"
4537
agda --version
46-
38+
4739
- name: Create test file
48-
if: matrix.os == 'ubuntu-latest'
4940
run: |
5041
cat > test.agda << 'EOF'
5142
module test where
52-
43+
5344
data Bool : Set where
5445
true false : Bool
5546
EOF
5647
5748
- name: Test Agda
58-
if: matrix.os == 'ubuntu-latest'
5949
run: agda test.agda

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2025, Agda Github Community
3+
Copyright (c) 2025, Andreas Abel
44

55
Redistribution and use in source and binary forms, with or without
66
modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@
22

33
GitHub composite action to install Agda from the official deployed binaries and optionally the Agda standard library.
44

5+
It supports Agda 2.8.0 (and up).
6+
For older Agda versions, please use [`wenkokke/setup-agda`](https://github.com/wenkokke/setup-agda).
7+
58
## Features
69

710
- Installs Agda from official GitHub releases.
811
- Optional installation of the Agda standard library.
912
- Cross-platform support:
10-
- Ubuntu (latest)
11-
- Windows (latest)
12-
- macOS (latest, including macOS-15-intel)
13+
- Linux
14+
- Windows
15+
- macOS (ARM and x86)
1316
- Outputs the path to the Agda executable and Agda application directory.
1417

1518
## Usage
1619

17-
### Basic Usage (Agda only)
20+
### Basic Usage (default Agda version)
1821

1922
```yaml
2023
- name: Setup Agda
2124
uses: agda/agda-setup-action@v1
22-
with:
23-
agda-version: '2.8.0'
2425
```
2526
2627
### With Standard Library
@@ -52,17 +53,17 @@ GitHub composite action to install Agda from the official deployed binaries and
5253
5354
## Inputs
5455
55-
| Name | Description | Required | Default |
56-
|------|-------------|----------|---------|
57-
| `agda-version` | Version of Agda to install (e.g., `2.8.0`) | Yes | - |
58-
| `agda-stdlib-version` | Version of Agda standard library to install (e.g., `2.3`). If not specified, stdlib will not be installed. | No | `''` |
56+
| Name | Description | Required | Default |
57+
|-----------------------|-----------------------------------------------------------------------------------------------------------------|----------|---------|
58+
| `agda-version` | Version of Agda to install (e.g., `2.8.0`) | Yes | `2.8.0` |
59+
| `agda-stdlib-version` | Version of Agda standard library to install (e.g., `2.3`). If not specified, the library will not be installed. | No | `''` |
5960

6061
## Outputs
6162

62-
| Name | Description |
63-
|------|-------------|
64-
| `agda-path` | Path to the Agda executable |
65-
| `agda-dir` | Path to the Agda application directory |
63+
| Name | Description |
64+
|-------------|----------------------------------------|
65+
| `agda-path` | Path to the Agda executable |
66+
| `agda-dir` | Path to the Agda application directory |
6667

6768
## Example Workflow
6869

@@ -74,30 +75,31 @@ on: [push, pull_request]
7475
jobs:
7576
build:
7677
runs-on: ubuntu-latest
77-
78+
7879
steps:
7980
- uses: actions/checkout@v5
80-
81+
8182
- name: Setup Agda
8283
uses: agda/agda-setup-action@v1
8384
with:
8485
agda-version: '2.8.0'
8586
agda-stdlib-version: '2.3'
86-
87+
8788
- name: Build Agda files
8889
run: agda Main.agda
8990
```
9091

9192
## Platform Support
9293

9394
This action supports the following platforms:
94-
- `ubuntu-latest`
95-
- `windows-latest`
96-
- `macos-latest`
97-
- `macos-15-intel`
95+
96+
- Linux, e.g. `ubuntu-latest`
97+
- Windows, e.g. `windows-latest`
98+
- macOS ARM, e.g. `macos-latest`
99+
- macOS x86, e.g. `macos-15-intel`
98100

99101
The action automatically detects the platform and downloads the appropriate binary for your runner.
100102

101103
## License
102104

103-
This project is licensed under the same terms as Agda itself.
105+
This project is licensed under the BSD 3-clause license.

action.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
name: 'Setup Agda'
22
description: 'Install Agda from official releases and optionally the standard library'
3-
author: 'Agda Team'
3+
author: 'Andreas Abel'
44

55
inputs:
66
agda-version:
77
description: 'Version of Agda to install (e.g., 2.8.0)'
88
required: true
9+
default: '2.8.0'
910
agda-stdlib-version:
10-
description: 'Version of Agda standard library to install (e.g., 2.3). If not specified, stdlib will not be installed.'
11+
description: 'Version of Agda standard library to install (e.g., 2.3). If not specified, the standard library will not be installed.'
1112
required: false
1213
default: ''
1314

@@ -60,14 +61,14 @@ runs:
6061
run: |
6162
archive_name="${{ steps.platform.outputs.archive-name }}"
6263
download_url="https://github.com/agda/agda/releases/download/v${{ inputs.agda-version }}/${archive_name}"
63-
64+
6465
echo "Downloading Agda from: ${download_url}"
6566
http_code=$(curl -w '%{http_code}\n' -L "${download_url}" -o "agda-archive.${{ steps.platform.outputs.archive-ext }}")
6667
exit_code=$?
67-
68+
6869
echo "curl exit code: ${exit_code}"
6970
echo "curl http code: ${http_code}"
70-
71+
7172
if [[ "${exit_code}" != "0" || "${http_code}" != "200" ]]; then
7273
echo "Download of Agda archive failed."
7374
exit 1
@@ -108,23 +109,23 @@ runs:
108109
run: |
109110
agda --version
110111
agda --setup
111-
112+
112113
if [[ "${{ runner.os }}" == "Windows" ]]; then
113114
AGDA_DIR=$(agda --print-agda-app-dir | sed 's/\\/\//g')
114115
else
115116
AGDA_DIR=$(agda --print-agda-app-dir)
116117
fi
117-
118+
118119
mkdir -p "${AGDA_DIR}"
119120
mkdir -p "${AGDA_DIR}/libraries.d"
120-
121+
121122
# Find agda executable path
122123
if [[ "${{ runner.os }}" == "Windows" ]]; then
123124
AGDA_PATH=$(where agda | head -1)
124125
else
125126
AGDA_PATH=$(which agda)
126127
fi
127-
128+
128129
echo "agda-dir=${AGDA_DIR}" >> "${GITHUB_OUTPUT}"
129130
echo "agda-path=${AGDA_PATH}" >> "${GITHUB_OUTPUT}"
130131
echo "AGDA_DIR=${AGDA_DIR}" >> "${GITHUB_ENV}"
@@ -134,34 +135,34 @@ runs:
134135
shell: bash
135136
run: |
136137
download_url="https://github.com/agda/agda-stdlib/archive/refs/tags/v${{ inputs.agda-stdlib-version }}.tar.gz"
137-
138+
138139
echo "Downloading Agda standard library from: ${download_url}"
139140
http_code=$(curl -w '%{http_code}\n' -L "${download_url}" -o "agda-stdlib.tar.gz")
140141
exit_code=$?
141-
142+
142143
echo "curl exit code: ${exit_code}"
143144
echo "curl http code: ${http_code}"
144-
145+
145146
if [[ "${exit_code}" != "0" || "${http_code}" != "200" ]]; then
146147
echo "Download of Agda standard library archive failed."
147148
exit 1
148149
fi
149-
150+
150151
tar xf agda-stdlib.tar.gz -C "${AGDA_DIR}/libraries.d/"
151152
152153
- name: Setup Agda standard library
153154
if: inputs.agda-stdlib-version != ''
154155
shell: bash
155156
run: |
156157
stdlib_path="${AGDA_DIR}/libraries.d/agda-stdlib-${{ inputs.agda-stdlib-version }}/standard-library.agda-lib"
157-
158+
158159
if [[ ! -f "${stdlib_path}" ]]; then
159160
echo "Standard library file not found at: ${stdlib_path}"
160161
echo "Contents of libraries.d:"
161162
ls -la "${AGDA_DIR}/libraries.d/"
162163
exit 1
163164
fi
164-
165+
165166
echo "${stdlib_path}" >> "${AGDA_DIR}/libraries"
166167
echo "Agda libraries file content:"
167168
cat "${AGDA_DIR}/libraries"

0 commit comments

Comments
 (0)