Skip to content

Commit 322b4db

Browse files
committed
Merge branch 'pr-branch' into copilot/fix-review-comments-in-pr-1
2 parents b7f43b0 + 7b55b2f commit 322b4db

File tree

5 files changed

+435
-1
lines changed

5 files changed

+435
-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@v4
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
35+
open import Data.Nat
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: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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-linux:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Agda
23+
id: setup
24+
uses: ./
25+
with:
26+
agda-version: '2.8.0'
27+
agda-stdlib-version: '2.3'
28+
29+
- name: Verify Agda installation
30+
run: |
31+
echo "Agda path: ${{ steps.setup.outputs.agda-path }}"
32+
echo "Agda dir: ${{ steps.setup.outputs.agda-dir }}"
33+
agda --version
34+
35+
- name: Create test file
36+
run: |
37+
cat > test.agda << 'EOF'
38+
module test where
39+
40+
data Bool : Set where
41+
true false : Bool
42+
EOF
43+
44+
- name: Test Agda
45+
run: agda test.agda
46+
47+
test-windows:
48+
runs-on: windows-latest
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
53+
- name: Setup Agda
54+
id: setup
55+
uses: ./
56+
with:
57+
agda-version: '2.8.0'
58+
59+
- name: Verify Agda installation
60+
run: |
61+
echo "Agda path: ${{ steps.setup.outputs.agda-path }}"
62+
echo "Agda dir: ${{ steps.setup.outputs.agda-dir }}"
63+
agda --version
64+
65+
test-macos:
66+
runs-on: macos-latest
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v4
70+
71+
- name: Setup Agda
72+
id: setup
73+
uses: ./
74+
with:
75+
agda-version: '2.8.0'
76+
agda-stdlib-version: '2.3'
77+
78+
- name: Verify Agda installation
79+
run: |
80+
echo "Agda path: ${{ steps.setup.outputs.agda-path }}"
81+
echo "Agda dir: ${{ steps.setup.outputs.agda-dir }}"
82+
agda --version
83+
84+
test-macos-intel:
85+
runs-on: macos-13 # Intel-based macOS
86+
steps:
87+
- name: Checkout
88+
uses: actions/checkout@v4
89+
90+
- name: Setup Agda
91+
id: setup
92+
uses: ./
93+
with:
94+
agda-version: '2.8.0'
95+
96+
- name: Verify Agda installation
97+
run: |
98+
echo "Agda path: ${{ steps.setup.outputs.agda-path }}"
99+
echo "Agda dir: ${{ steps.setup.outputs.agda-dir }}"
100+
agda --version

.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@v4
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)