-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
name: Build | ||
on: [push] | ||
jobs: | ||
cancel_previous_run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
build: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-20.04, macos-latest] | ||
operating-system: [ubuntu-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: avsm/setup-ocaml@master | ||
- run: opam pin add -n . | ||
- run: opam depext -yti mm ao mad pulseaudio theora gstreamer # SDL and graphics fail on OSX | ||
if: matrix.operating-system == 'macos-latest' | ||
- run: opam depext -yti mm alsa ao mad pulseaudio ocamlsdl theora graphics gstreamer | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
- name: Install OCaml | ||
uses: ocaml/setup-ocaml@v2 | ||
- name: Update packages | ||
run: | | ||
sudo apt-get update | ||
if: matrix.operating-system != 'macos-latest' | ||
- run: eval $(opam env) && dune build | ||
- name: Pin locally | ||
run: opam pin -y add --no-action . | ||
- name: Install locally | ||
run: opam install -y mm ao mad pulseaudio theora gstreamer # SDL and graphics fail on OSX | ||
if: matrix.operating-system == 'macos-latest' | ||
- run: opam install -y mm alsa ao mad pulseaudio ocamlsdl theora graphics gstreamer | ||
if: matrix.operating-system != 'macos-latest' | ||
- name: Run tests locally | ||
run: opam exec dune runtest |
This file contains 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
This file contains 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