CI: update ubuntu for missing package (darcs) #312
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: mlmpfr CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 0' # weekly | |
jobs: | |
main: | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, macos-latest] | |
ocaml-compiler: [4.14.0, 5.0.0, 5.2.0] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Temp fix: https://github.com/actions/runner-images/issues/10476 | |
- name: Update Ubuntu | |
if: runner.os == 'linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl | |
curl -sSL https://get-ghcup.haskell.org | sh -s -- -y | |
source $HOME/.ghcup/env | |
ghcup install ghc 8.10.7 | |
ghcup set ghc 8.10.7 | |
ghcup install cabal 3.4.0.0 | |
ghcup set cabal 3.4.0.0 | |
cabal update | |
cabal install darcs | |
- name: Use OCaml ${{ matrix.ocaml-compiler }} | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
# setup-ocaml automatically install mlmpfr dependencies (i.e.: gmp/mpfr) | |
# rely on dune configurator for C and link flags | |
- name: Build and test mlmpfr | |
run: | | |
opam install . --deps-only --with-doc --with-test | |
opam exec -- dune build @install --profile dev | |
opam exec -- dune build @runtest --profile dev --verbose | |
opam exec -- dune build @doc | |
opam exec -- dune install | |
opam exec -- dune exec examples/example.exe |