Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Update GitHub Actions workflow #129

Merged
merged 1 commit into from
Apr 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 35 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's happening to the cache?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used to avoid this, but if you don't mind a clean build running in a few weeks, you can get rid of it.
https://github.com/actions/cache#cache-limits


jobs:
test:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-compiler:
- 4.06.x



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

steps:
- uses: actions/[email protected]

- name: Cache OCaml's opam
uses: actions/[email protected]
with:
path: ~/.opam
key: macos-latest-ocaml-4.06.1

- name: Cache npm
uses: actions/[email protected]
with:
path: ~/.npm
key: macos-latest-node-14.4.0-${{hashFiles('package-lock.json')}}

- name: Use OCaml
uses: avsm/[email protected]
with:
ocaml-version: 4.06.1

- name: Use Node.js
uses: actions/[email protected]
with:
node-version: 14.4.0

- run: npm install

- run: opam install . --deps-only
- run: eval $(opam env) && opam exec -- dune build
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x

- run: npm ci

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- run: opam install . --deps-only

- run: opam exec -- dune build