remove generated docs #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |