Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
Add a new workflow to publish the odoc documentation of `master` branch
and compile `ocplib-simplex` with both `OCaml` 4.08.1 and 5.0.0.
  • Loading branch information
Halbaroth committed Mar 28, 2024
1 parent 8ce356f commit f7ef59e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
permissions: {}

env:
OCAML_DEFAULT_VERSION: 4.10.1
OCAML_DEFAULT_VERSION: 4.08.1
# Add OPAMYES=true to the environment, this is usefill to replace `-y` option
# in any opam call
OPAMYES: true
Expand All @@ -21,19 +21,21 @@ jobs:
- macos-latest
- ubuntu-latest
ocaml-compiler:
- 4.10.1
- 4.08.1
- 5.0.0

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: true

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
allow-prerelease-opam: true
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true

Expand All @@ -45,5 +47,3 @@ jobs:

- name: Run tests
run: opam exec -- make test


40 changes: 40 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Documentation

on:
push:
branches:
- master

env:
OCAML_DEFAULT_VERSION: 5.0.0
OPAMYES: true

jobs:
odoc:
name: Odoc documentation
runs-on: ubuntu-latest
env:
OPAMWITHDOC: true

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: ocaml/setup-ocaml@v2
with:
allow-prerelease-opam: true
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}
dune-cache: true

- name: Install dependencies
run: opam install . --deps-only --with-doc

- name: Make odoc documentation
run: opam exec -- make doc

- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: odoc
path: _build/default/_doc/_html/

0 comments on commit f7ef59e

Please sign in to comment.