still broken in odoc #455
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: deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: checkout-submodules | |
run: | | |
git submodule update --init test/script/reference | |
git submodule update --init test/c/collections-c/files | |
mv .git .git.tmp # prevent opam from checking-out submodules | |
- name: setup-ocaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: "5.3" | |
dune-cache: false | |
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/builds/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-deploy | |
run: | | |
opam install . --deps-only --with-test --with-doc | |
opam install bisect_ppx z3 ocb | |
- name: api | |
run: | | |
touch doc/.nojekyll | |
opam exec -- dune build @doc | |
mv _build/default/_doc/_html doc/api | |
- name: coverage | |
run: | | |
mv .git.tmp .git # bring it back, we won't call opam anymore from now on | |
BISECT_FILE=$(pwd)/bisect opam exec -- dune runtest --force --instrument-with bisect_ppx | |
opam exec -- bisect-ppx-report html -o doc/coverage | |
- name: coverage-badge | |
run: | | |
label=coverage | |
percentage=$(opam exec -- bisect-ppx-report summary | sed -E 's/.*\((..).*/\1/g') | |
color=$(printf "%x%x%x" $((255-$percentage)) $((155+$percentage)) 85) | |
opam exec -- ocb --style classic --label $label --status $percentage'%' --color $color > doc/coverage/badge.svg | |
- name: deploy | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: doc/ | |
CLEAN: true |