Skip to content

Commit 1ef98a0

Browse files
kim-emclaude
andcommitted
feat: add nanoda to parallel workflow
Add nanoda external type checker as a parallel job in ci.yml workflow: - New inputs: nanoda, nanoda-allow-sorry - New output: nanoda-status - Runs in parallel with test, lint, lean4checker, and reservoir 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent df4bab5 commit 1ef98a0

3 files changed

Lines changed: 58 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,23 @@ on:
9191
type: string
9292
required: false
9393
default: "false"
94+
nanoda:
95+
description: |
96+
Check environment with nanoda external type checker.
97+
nanoda is an independent Lean 4 type checker written in Rust.
98+
Requires Rust toolchain (will be installed automatically if not present).
99+
Allowed values: "true" | "false".
100+
type: string
101+
required: false
102+
default: "false"
103+
nanoda-allow-sorry:
104+
description: |
105+
When running nanoda, permit the sorryAx axiom.
106+
Set to "false" if your project should have no sorry placeholders.
107+
Allowed values: "true" | "false".
108+
type: string
109+
required: false
110+
default: "true"
94111
outputs:
95112
build-status:
96113
description: "Status of lake build: SUCCESS | FAILURE | ''"
@@ -107,6 +124,9 @@ on:
107124
detected-mathlib:
108125
description: "Whether Mathlib dependency was detected"
109126
value: ${{ jobs.build.outputs.detected-mathlib }}
127+
nanoda-status:
128+
description: "Status of nanoda check: SUCCESS | FAILURE | ''"
129+
value: ${{ jobs.nanoda.outputs.nanoda-status }}
110130

111131
jobs:
112132
build:
@@ -312,3 +332,36 @@ jobs:
312332
"${{ github.event.repository.license.spdx_id }}"
313333
shell: bash
314334
working-directory: ${{ inputs.lake-package-directory }}
335+
336+
nanoda:
337+
needs: build
338+
if: inputs.nanoda == 'true'
339+
runs-on: ubuntu-latest
340+
outputs:
341+
nanoda-status: ${{ steps.nanoda.outputs.nanoda-status }}
342+
steps:
343+
- uses: actions/checkout@v5
344+
345+
- name: install elan
346+
run: |
347+
: Install Elan
348+
"${GITHUB_WORKSPACE}/scripts/install_elan.sh"
349+
shell: bash
350+
working-directory: ${{ inputs.lake-package-directory }}
351+
352+
- uses: actions/cache/restore@v4
353+
if: inputs.use-github-cache == 'true'
354+
with:
355+
path: ${{ inputs.lake-package-directory }}/.lake
356+
key: lake-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(format('{0}/lean-toolchain', inputs.lake-package-directory)) }}-${{ hashFiles(format('{0}/lake-manifest.json', inputs.lake-package-directory)) }}-${{ github.sha }}
357+
restore-keys: lake-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(format('{0}/lean-toolchain', inputs.lake-package-directory)) }}-${{ hashFiles(format('{0}/lake-manifest.json', inputs.lake-package-directory)) }}
358+
359+
- name: nanoda
360+
id: nanoda
361+
env:
362+
NANODA_ALLOW_SORRY: ${{ inputs.nanoda-allow-sorry }}
363+
run: |
364+
: Check Environment with nanoda
365+
"${GITHUB_WORKSPACE}/scripts/run_nanoda.sh"
366+
shell: bash
367+
working-directory: ${{ inputs.lake-package-directory }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
- new parallel reusable workflow `.github/workflows/ci.yml` that runs test, lint, leanchecker, nanoda, and reservoir checks in parallel
1213
- new `nanoda` input to check environment with [nanoda](https://github.com/ammkrn/nanoda_lib) external type checker
1314
- new `nanoda-allow-sorry` input to permit sorryAx axiom when running nanoda (default: true)
1415
- new `nanoda-status` output parameter

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ To be certain `lean-action` runs a step, specify the desire feature with a featu
140140

141141
## Parallel Workflow
142142

143-
For faster CI, `lean-action` provides a reusable workflow that runs test, lint, lean4checker, and reservoir checks in parallel on separate runners:
143+
For faster CI, `lean-action` provides a reusable workflow that runs test, lint, lean4checker, nanoda, and reservoir checks in parallel on separate runners:
144144

145145
```yaml
146146
name: CI
@@ -158,14 +158,15 @@ jobs:
158158
test: "true"
159159
lint: "true"
160160
lean4checker: "true"
161+
nanoda: "true"
161162
```
162163

163164
The parallel workflow:
164165
- Runs a **build** job first (elan setup, config, mathlib cache, lake build)
165-
- Then runs **test**, **lint**, **lean4checker**, and **reservoir** jobs in parallel
166+
- Then runs **test**, **lint**, **lean4checker**, **nanoda**, and **reservoir** jobs in parallel
166167
- Each parallel job restores the build cache from the build job
167168

168-
All inputs from the standard action are supported. The workflow outputs the same status parameters (`build-status`, `test-status`, `lint-status`, `mk_all-status`).
169+
All inputs from the standard action are supported. The workflow outputs the same status parameters (`build-status`, `test-status`, `lint-status`, `mk_all-status`, `nanoda-status`).
169170

170171
## Customization
171172

0 commit comments

Comments
 (0)