docs: create a docs/ folder and populate it #499
This file contains 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: Test partial eval | |
on: | |
push: | |
branches: | |
- partial_eval | |
pull_request: | |
types: [] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
packages: read | |
defaults: | |
run: | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell | |
# XXX using multi-line string will fail since \n is stuck to the end of the argument. | |
shell: "nix develop github:katrinafyi/pac-nix#ocamlPackages_pac.asli --impure --accept-flake-config --command bash --noprofile --norc -eo pipefail {0}" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v25 | |
- run: echo 'preparing nix shell environment' | |
- run: dune build --profile release | |
- run: dune runtest -j4 | |
- run: dune build '@coverage' -j4 | |
- run: rm -rf _build/default/tests/coverage/encodings | |
- name: Upload new coverage results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-output-${{ github.run_id }} | |
path: | | |
_build/default/tests/coverage | |
_build/.promotion-staging | |
offline: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v25 | |
- run: echo 'preparing nix shell environment' | |
- run: dune build --profile release -j4 | |
- run: echo ':gen A64 aarch64_* ocaml false offlineASL' | OCAMLRUNPARAM=b dune exec asli | |
- run: dune build offlineASL -j4 | |
- run: dune build @offline-coverage -j4 | |
offline-cpp: | |
runs-on: ubuntu-24.04 # for recent llvm version | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v25 | |
- run: echo 'preparing nix shell environment' | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- run: python -m pip install 'meson~=1.4.0' 'ninja' | |
- run: dune build --profile release | |
- run: echo ':gen A64 .* cpp' | OCAMLRUNPARAM=b dune exec asli | |
- run: LLVM_CONFIG=$(which llvm-config-17) offlineASL-cpp/check.py | |
- name: 'syntax check generated C++ lifter' | |
run: meson compile -C offlineASL-cpp/build | |
offline-scala: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v25 | |
- run: echo 'preparing nix shell environment' | |
- uses: coursier/cache-action@v6 | |
- uses: coursier/setup-action@v1 | |
with: | |
jvm: adoptium:1.17 | |
apps: mill | |
- run: dune build --profile release | |
- run: mkdir -p offlineASL-scala/lifter/src/generated | |
- run: echo ':gen A64 .* scala true offlineASL-scala/lifter/src/generated' | OCAMLRUNPARAM=b dune exec asli | |
- run: 'cd offlineASL-scala && mill lifter.assembly' | |
- run: 'cd offlineASL-scala && mill main.run --help' |