Skip to content

Commit

Permalink
Update GitHub Actions (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
smorimoto authored Jul 24, 2024
1 parent c62a108 commit 21fe83a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 58 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
93 changes: 36 additions & 57 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,61 @@ jobs:
matrix:
os:
- ubuntu-latest
packages: [ '.' ]
packages:
- "."
runtest:
- true
ocaml-compiler:
- 4.14.x
- 5.0.x
- "5.x"
- "4.14"
include:
- os: macos-latest
ocaml-compiler: 4.14.x
packages: '.'
ocaml-compiler: "4.14"
packages: "."
runtest: true

- os: windows-latest
ocaml-compiler: 4.14.x
packages: 'alcotest alcotest-js alcotest-lwt alcotest-mirage'
opam-local-packages: 'alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam'
ocaml-compiler: "4.14"
packages: "alcotest alcotest-js alcotest-lwt alcotest-mirage"
opam-local-packages: "alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam"
runtest: false

- os: ubuntu-latest
ocaml-compiler: 4.08.x
packages: 'alcotest alcotest-js alcotest-lwt alcotest-mirage'
opam-local-packages: 'alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam'
ocaml-compiler: "4.08"
packages: "alcotest alcotest-js alcotest-lwt alcotest-mirage"
opam-local-packages: "alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam"
runtest: false

- os: ubuntu-latest
ocaml-compiler: 4.09.x
packages: 'alcotest alcotest-js alcotest-lwt alcotest-mirage'
opam-local-packages: 'alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam'
ocaml-compiler: "4.09"
packages: "alcotest alcotest-js alcotest-lwt alcotest-mirage"
opam-local-packages: "alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam"
runtest: false

- os: ubuntu-latest
ocaml-compiler: 4.10.x
packages: 'alcotest alcotest-js alcotest-lwt alcotest-mirage'
opam-local-packages: 'alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam'
ocaml-compiler: "4.10"
packages: "alcotest alcotest-js alcotest-lwt alcotest-mirage"
opam-local-packages: "alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam"
runtest: false

- os: ubuntu-latest
ocaml-compiler: 4.11.x
packages: 'alcotest alcotest-js alcotest-lwt alcotest-mirage'
opam-local-packages: 'alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam'
ocaml-compiler: "4.11"
packages: "alcotest alcotest-js alcotest-lwt alcotest-mirage"
opam-local-packages: "alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam"
runtest: false

- os: ubuntu-latest
ocaml-compiler: 4.12.x
packages: 'alcotest alcotest-js alcotest-lwt alcotest-mirage'
opam-local-packages: 'alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam'
ocaml-compiler: "4.12"
packages: "alcotest alcotest-js alcotest-lwt alcotest-mirage"
opam-local-packages: "alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam"
runtest: false

- os: ubuntu-latest
ocaml-compiler: 4.13.x
packages: 'alcotest alcotest-js alcotest-lwt alcotest-mirage'
opam-local-packages: 'alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam'
ocaml-compiler: "4.13"
packages: "alcotest alcotest-js alcotest-lwt alcotest-mirage"
opam-local-packages: "alcotest.opam alcotest-js.opam alcotest-lwt.opam alcotest-mirage.opam"
runtest: false



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

steps:
Expand All @@ -79,38 +78,18 @@ jobs:
git config --global core.eol lf
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v3
- name: Set-up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: lts/*

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: runner.os != 'Windows'
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-local-packages: $${ matrix.opam-local-packages }}
opam-depext-flags: --with-test

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: runner.os == 'Windows'
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-local-packages: $${ matrix.opam-local-packages }}
opam-depext-flags: --with-test
opam-repositories: |
opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
default: https://github.com/ocaml/opam-repository.git
- run: |
opam pin add alcotest-async.dev ./ -n
opam pin add alcotest-js.dev ./ -n
opam pin add alcotest-lwt.dev ./ -n
opam pin add alcotest-mirage.dev ./ -n
opam pin add alcotest.dev ./ -n
opam-local-packages: ${{ matrix.opam-local-packages }}

- run: opam install ${{ matrix.packages }} --with-test --deps-only
- if: ${{ matrix.runtest }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: git diff
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-needed') }}
Expand Down

0 comments on commit 21fe83a

Please sign in to comment.