Skip to content

Commit

Permalink
Merge pull request #42 from smorimoto/gha
Browse files Browse the repository at this point in the history
Cleanup GitHub Actions workflow
  • Loading branch information
c-cube authored Jan 4, 2022
2 parents 0bb7094 + 008eae1 commit 3d8e9b0
Showing 1 changed file with 35 additions and 16 deletions.
51 changes: 35 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
name: build
on: [push, pull_request]

on:
pull_request:
push:
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON

jobs:
run:
name: Build
runs-on: ${{ matrix.operating-system }}
build:
strategy:
fail-fast: false
matrix:
operating-system: [macos-latest, ubuntu-latest, windows-latest]
ocaml-compiler: [ '4.04.0', '4.11.0' ]
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-compiler:
- 4.04.x
- 4.13.x

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

steps:
- uses: actions/checkout@master
- uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- run: opam pin -n .
- run: opam depext -yt tiny_httpd tiny_httpd_camlzip
- run: opam install -t . --deps-only
- run: opam exec -- dune build @install
- run: opam exec -- dune runtest
if: ${{ matrix.operating-system == 'unbuntu-latest' }}
- name: Checkout code
uses: actions/checkout@v2

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-depext-flags: --with-test

- run: opam install . --deps-only --with-test

- run: opam exec -- dune build @install

- run: opam exec -- dune runtest
if: ${{ matrix.os == 'ubuntu-latest' }}

0 comments on commit 3d8e9b0

Please sign in to comment.