Skip to content

Commit 1451597

Browse files
authored
Merge pull request #2 from agda/copilot/fix-review-comments-in-pr-1
agda-setup-action created by copilot from prompt and PR review
2 parents 09332d2 + 8dcb628 commit 1451597

File tree

5 files changed

+394
-1
lines changed

5 files changed

+394
-1
lines changed

.github/workflows/example.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Example Usage
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
example:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v5
15+
16+
- name: Setup Agda
17+
id: setup-agda
18+
uses: agda/agda-setup-action@v1
19+
with:
20+
agda-version: '2.8.0'
21+
agda-stdlib-version: '2.3'
22+
23+
- name: Show Agda info
24+
run: |
25+
echo "Agda path: ${{ steps.setup-agda.outputs.agda-path }}"
26+
echo "Agda dir: ${{ steps.setup-agda.outputs.agda-dir }}"
27+
agda --version
28+
29+
- name: Create a simple Agda file
30+
run: |
31+
cat > Example.agda << 'EOF'
32+
module Example where
33+
34+
open import Data.Bool.Base
35+
open import Data.Nat.Base
36+
37+
example : Bool
38+
example = true
39+
EOF
40+
41+
- name: Type-check Agda file
42+
run: agda Example.agda

.github/workflows/test.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Test Action
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- 'copilot/**'
9+
pull_request:
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
test:
17+
strategy:
18+
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: ''
29+
runs-on: ${{ matrix.os }}
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v5
33+
34+
- name: Setup Agda
35+
id: setup
36+
uses: ./
37+
with:
38+
agda-version: '2.8.0'
39+
agda-stdlib-version: ${{ matrix.agda-stdlib-version }}
40+
41+
- name: Verify Agda installation
42+
run: |
43+
echo "Agda path: ${{ steps.setup.outputs.agda-path }}"
44+
echo "Agda dir: ${{ steps.setup.outputs.agda-dir }}"
45+
agda --version
46+
47+
- name: Create test file
48+
if: matrix.os == 'ubuntu-latest'
49+
run: |
50+
cat > test.agda << 'EOF'
51+
module test where
52+
53+
data Bool : Set where
54+
true false : Bool
55+
EOF
56+
57+
- name: Test Agda
58+
if: matrix.os == 'ubuntu-latest'
59+
run: agda test.agda

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Temporary files
2+
*.tmp
3+
*.temp
4+
/tmp/
5+
6+
# Archive files used during testing
7+
*.tar.xz
8+
*.tar.gz
9+
*.zip
10+
11+
# Agda build artifacts
12+
*.agdai
13+
_build/
14+
15+
# OS files
16+
.DS_Store
17+
Thumbs.db
18+
19+
# IDE files
20+
.vscode/
21+
.idea/
22+
*.swp
23+
*.swo
24+
*~

README.md

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,103 @@
11
# agda-setup-action
2-
Github action to install Agda from the official deployed binaries
2+
3+
GitHub composite action to install Agda from the official deployed binaries and optionally the Agda standard library.
4+
5+
## Features
6+
7+
- Installs Agda from official GitHub releases.
8+
- Optional installation of the Agda standard library.
9+
- Cross-platform support:
10+
- Ubuntu (latest)
11+
- Windows (latest)
12+
- macOS (latest, including macOS-15-intel)
13+
- Outputs the path to the Agda executable and Agda application directory.
14+
15+
## Usage
16+
17+
### Basic Usage (Agda only)
18+
19+
```yaml
20+
- name: Setup Agda
21+
uses: agda/agda-setup-action@v1
22+
with:
23+
agda-version: '2.8.0'
24+
```
25+
26+
### With Standard Library
27+
28+
```yaml
29+
- name: Setup Agda with stdlib
30+
uses: agda/agda-setup-action@v1
31+
with:
32+
agda-version: '2.8.0'
33+
agda-stdlib-version: '2.3'
34+
```
35+
36+
### Using Outputs
37+
38+
```yaml
39+
- name: Setup Agda
40+
id: setup-agda
41+
uses: agda/agda-setup-action@v1
42+
with:
43+
agda-version: '2.8.0'
44+
agda-stdlib-version: '2.3'
45+
46+
- name: Use Agda
47+
run: |
48+
echo "Agda path: ${{ steps.setup-agda.outputs.agda-path }}"
49+
echo "Agda dir: ${{ steps.setup-agda.outputs.agda-dir }}"
50+
agda --version
51+
```
52+
53+
## Inputs
54+
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 | `''` |
59+
60+
## Outputs
61+
62+
| Name | Description |
63+
|------|-------------|
64+
| `agda-path` | Path to the Agda executable |
65+
| `agda-dir` | Path to the Agda application directory |
66+
67+
## Example Workflow
68+
69+
```yaml
70+
name: Build with Agda
71+
72+
on: [push, pull_request]
73+
74+
jobs:
75+
build:
76+
runs-on: ubuntu-latest
77+
78+
steps:
79+
- uses: actions/checkout@v5
80+
81+
- name: Setup Agda
82+
uses: agda/agda-setup-action@v1
83+
with:
84+
agda-version: '2.8.0'
85+
agda-stdlib-version: '2.3'
86+
87+
- name: Build Agda files
88+
run: agda Main.agda
89+
```
90+
91+
## Platform Support
92+
93+
This action supports the following platforms:
94+
- `ubuntu-latest`
95+
- `windows-latest`
96+
- `macos-latest`
97+
- `macos-15-intel`
98+
99+
The action automatically detects the platform and downloads the appropriate binary for your runner.
100+
101+
## License
102+
103+
This project is licensed under the same terms as Agda itself.

0 commit comments

Comments
 (0)