A GitHub Action that installs the March programming language in your CI workflow.
- uses: march-language/setup-march@v1
with:
march-version: main| Input | Description | Default |
|---|---|---|
march-version |
Branch, tag, or commit SHA to install | main |
ocaml-compiler |
OCaml compiler version used to build March | 5.3.0 |
github-token |
GitHub token to avoid API rate limits | ${{ github.token }} |
| Output | Description |
|---|---|
march-version |
The commit SHA of the installed March version |
march-path |
Path to the March installation directory |
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: march-language/setup-march@v1
with:
march-version: main
- run: march my_program.march- Resolves the
march-versioninput to a commit SHA for reliable cache keying. - Restores the March build from cache if available (keyed by SHA + OS + OCaml version).
- Always installs system dependencies (blake3, brotli, zstd, llvm).
- On a cache miss: sets up OCaml via
ocaml/setup-ocaml, clones the march repo, installs opam dependencies, and builds withdune. - Adds
marchtoPATH.
Cached runs skip OCaml setup and the March build — the expensive parts — keeping them fast.
Step 3 is deliberately not cache-gated. The march binary dynamically
links against these libraries, and they install to system paths outside the
cached directory (~/.local/march). Skipping them on a cache hit yields a
restored binary that cannot load, failing with exit 127 on every invocation.
| OS | Status |
|---|---|
| Ubuntu | Supported |
| macOS | Supported |
| Windows | Not supported |