Merge pull request #790 from ocaml/dependabot/github_actions/rui314/s… #3550
This file contains hidden or 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: Builds, tests & co | |
on: | |
pull_request: | |
push: | |
schedule: | |
# Prime the caches every Monday | |
- cron: 0 1 * * MON | |
permissions: read-all | |
jobs: | |
hygiene: | |
name: Hygiene | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout tree | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: Set-up Node.js | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: latest | |
- run: corepack enable | |
- run: yarn install --immutable | |
- run: yarn format:check | |
if: always() | |
- run: yarn lint | |
if: always() | |
- run: yarn typecheck | |
if: always() | |
test: | |
name: Test | |
needs: hygiene | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
os: | |
- macos-14 | |
- ubuntu-22.04 | |
ocaml-compiler: | |
- "5.1" | |
allow-prerelease-opam: | |
- false | |
include: | |
- os: windows-2022 | |
ocaml-compiler: "4.14" | |
allow-prerelease-opam: false | |
- os: ubuntu-22.04 | |
ocaml-compiler: ocaml-variants.5.1.0+options,ocaml-option-flambda | |
allow-prerelease-opam: true | |
- os: windows-2022 | |
ocaml-compiler: ocaml-variants.5.1.0+options,ocaml-option-mingw | |
allow-prerelease-opam: false | |
opam-repositories: | | |
windows-5.0: https://github.com/dra27/opam-repository.git#windows-5.0 | |
sunset: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset | |
default: https://github.com/ocaml/opam-repository.git | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout tree | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: Set-up Mold | |
if: runner.os == 'Linux' | |
uses: rui314/setup-mold@8de9eea54963d01c1a6c200606257d65bd53bea1 # v1 | |
- name: Set-up OCaml ${{ matrix.ocaml-compiler }} | |
uses: ./ | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
allow-prerelease-opam: ${{ matrix.allow-prerelease-opam }} | |
dune-cache: ${{ matrix.os != 'windows-2022' }} | |
opam-repositories: ${{ matrix.opam-repositories }} | |
- run: opam depext --install uri | |
- run: opam install ocamlbuild |