Skip to content

Commit

Permalink
Update ci (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo authored Nov 1, 2024
1 parent c8156d1 commit 023635a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 30 deletions.
39 changes: 11 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: build

on:
merge_group:
pull_request:
push:
branches:
Expand All @@ -9,6 +10,10 @@ on:
# Prime the caches every Monday
- cron: 0 1 * * MON

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand All @@ -17,6 +22,7 @@ jobs:
os:
- ubuntu-latest
- macos-latest
- windows-latest
ocaml-compiler:
- 4.14.x
- 5.0.x
Expand All @@ -26,12 +32,6 @@ jobs:
- os: ubuntu-latest
ocaml-compiler: 4.8.x
skip-test: true
- os: windows-latest
ocaml-compiler: 4.14.x
skip-test: false
- os: windows-latest
ocaml-compiler: ocaml.5.0.0,ocaml-option-mingw
skip-test: false

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

Expand All @@ -43,30 +43,13 @@ jobs:
git config --global core.ignorecase false
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use OCaml ${{ matrix.ocaml-compiler }}
if: runner.os == 'Windows'
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
dra27: https://github.com/dra27/opam-repository.git#windows-5.0
default: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
opam: https://github.com/ocaml/opam-repository.git
dune-cache: ${{ matrix.os == 'ubuntu-latest' }}
opam-depext: ${{ !matrix.skip-test }}
opam-depext-flags: --with-test

- name: Use OCaml ${{ matrix.ocaml-compiler }}
if: runner.os != 'Windows'
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: ${{ matrix.os == 'ubuntu-latest' }}
opam-depext: ${{ !matrix.skip-test }}
opam-depext-flags: --with-test


- run: opam install . --with-test
if: ${{ !matrix.skip-test }}
Expand All @@ -85,13 +68,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use OCaml 4.14.x
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4.14.x
dune-cache: true

- name: Lint fmt
uses: ocaml/setup-ocaml/lint-fmt@v2
uses: ocaml/setup-ocaml/lint-fmt@v3
4 changes: 2 additions & 2 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Setup OCaml
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4.14.x
- name: Pin locally
Expand Down

0 comments on commit 023635a

Please sign in to comment.