Skip to content

remove generated docs #36

remove generated docs

remove generated docs #36

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Setup Carp
uses: carpentry-org/setup-carp@v1
- name: Install Lua deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y liblua5.4-dev
sudo mkdir -p /opt/homebrew/include /opt/homebrew/lib
sudo ln -sf /usr/include/lua5.4 /opt/homebrew/include/lua
sudo ln -sf /usr/lib/x86_64-linux-gnu/liblua5.4.so /opt/homebrew/lib/liblua.so
- name: Install Lua deps (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install lua
- name: Run tests
run: |
set -euo pipefail
carp -x test/lua.carp
carp -x test/midlevel.carp
carp -x test/cfunction.carp
carp -x test/metatable.carp
carp -x test/coroutine.carp
- name: Install angler
run: |
set -euo pipefail
git clone --depth 1 https://github.com/carpentry-org/angler /tmp/angler
(cd /tmp/angler && carp -b main.carp)
sudo install -m 755 /tmp/angler/out/angler /usr/local/bin/
- name: Install carp-fmt
run: |
set -euo pipefail
git clone --depth 1 https://github.com/carpentry-org/carp-fmt /tmp/carp-fmt
(cd /tmp/carp-fmt && carp -b main.carp)
sudo install -m 755 /tmp/carp-fmt/out/carp-fmt /usr/local/bin/
- name: Lint
run: |
# `with-lua-do`'s macro body uses `(do %@body)` to splice variadic
# rest-args into `with-lua-as`'s single body slot; angler can't see
# past the splice and reports a false-positive lonely-do.
angler --disable lonely-do $(find . -name '*.carp' \
-not -path './out/*' \
-not -path './docs/*' \
-not -path './.carp-src/*' \
-not -path './examples/*')
- name: Format check
run: |
carp-fmt --check $(find . -name '*.carp' \
-not -path './out/*' \
-not -path './docs/*' \
-not -path './.carp-src/*' \
-not -path './examples/*')
- name: Generate docs
run: carp -x gendocs.carp