prepare for smtml switch to bitvectors #132
Workflow file for this run
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: build-ubuntu | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
ocaml-compiler: | |
- "5.3" | |
- "5.1" | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: checkout-submodules | |
run: | | |
git submodule update --init test/script/reference | |
git submodule update --init test/c/collections-c/files | |
mv .git .git.tmp # prevents opam from checking-out submodules | |
- name: cache | |
id: cache-opam | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-opam-build | |
with: | |
path: | | |
~/work/owi/owi/_opam/ | |
key: ${{ runner.os }}-build-${{ matrix.ocaml-compiler }}-${{ env.cache-name }}-${{ hashFiles('**/*.opam') }} | |
- name: setup-ocaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
dune-cache: true | |
opam-pin: true | |
allow-prerelease-opam: false | |
- name: depext | |
run: | | |
# Installs rust-wasm | |
rustup update | |
rustup target add wasm32-unknown-unknown | |
sudo apt update | |
wget https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz # TODO: remove this and the following once the conf-zig package works | |
mkdir zig | |
tar xf zig-*.tar.xz -C zig --strip-components 1 | |
sudo mv zig/* /usr/local/bin/ | |
opam install . --depext-only --with-test --with-doc | |
- name: setup | |
if: steps.cache-opam.outputs.cache-hit != 'true' | |
run: | | |
opam install . --deps-only --with-test --with-doc --with-dev-setup | |
opam clean --switch-cleanup | |
- name: build | |
run: | | |
opam exec -- dune build @install | |
mv .git.tmp .git # bring it back, we won't call opam anymore from now on | |
opam exec -- dune runtest | |
ODOC_WARN_ERROR=true opam exec -- dune build @doc 2> output.txt || true | |
$(exit $(wc -l output.txt | cut -d " " -f1)) | |
opam exec -- dune build @fmt || (echo "\n⚠️ please run \`dune fmt\` and try again" && exit 1) | |
git diff --exit-code owi.opam || (echo "⚠️ please run \`dune build\`, commit the changes to owi.opam, and then try again" && exit 1) |