Merge pull request #644 from dra27/clarify-config #27
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: Build and test on Ubuntu | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
deploy-owl: | |
name: Install Owl and build doc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Use OCaml | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: '5.1' | |
# opam-local-packages: | | |
# *.opam | |
dune-cache: true | |
allow-prerelease-opam: true | |
- name: Deps | |
# run: sudo apt-get install git build-essential wget unzip aspcud m4 pkg-config libshp-dev libopenblas-dev liblapacke-dev | |
run: sudo apt-get install aspcud libshp-dev libopenblas-dev liblapacke-dev | |
- name: OCaml Deps | |
run: opam install ocaml-compiler-libs alcotest conf-openblas ctypes dune-configurator stdio npy odoc | |
- name: Build doc | |
run: | | |
opam exec -- odoc --version | |
opam exec -- dune build @doc --verbose 2>&1 | |
ls _build/default/_doc/_html/owl/Owl_dense_matrix | |
cp docs/*.js _build/default/_doc/_html/ | |
cp docs/*.css _build/default/_doc/_html/ | |
# cat docs/mathjax.js docs/highlight.pack.js >> _build/default/_doc/_html/highlight.pack.js | |
- name: inspect | |
run: | | |
ls _build/default/_doc/_html/owl/Owl | |
ls _build/default/_doc/_html/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/default/_doc/_html | |
destination_dir: . | |
- name: Compile Owl, install | |
run: opam exec -- dune build @install | |
- name: Run tests | |
# installing owl-base is a temp hack due to some unknown error in testing | |
run: | | |
opam install owl-base | |
opam exec -- dune runtest -j 1 --no-buffer -p owl |