diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e0a688f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: [push] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-24.04] + compiler: [4.14.2, 5.2.0] + steps: + - name: Build and test module + uses: savonet/build-and-test-ocaml-module@main + with: + ocaml-compiler: ${{ matrix.compiler }} diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..1db3e4a --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,28 @@ +name: Doc build + +on: + push: + branches: + - main + +jobs: + build_doc: + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: Setup OCaml + uses: toots/setup-ocaml@master + with: + ocaml-compiler: 4.14.x + - name: Pin locally + run: opam pin -y add --no-action . + - name: Install locally + run: opam install -y --with-doc . + - name: Build doc + run: opam exec dune build @doc + - name: Deploy doc + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: _build/default/_doc/_html diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 17ee71c..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: CI - -on: [push] - -jobs: - cancel_previous_run: - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.4.0 - with: - access_token: ${{ github.token }} - - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest] - steps: - - name: Build and test module - uses: savonet/build-and-test-ocaml-module@main