-
Notifications
You must be signed in to change notification settings - Fork 72
65 lines (57 loc) · 1.83 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Main workflow
on:
pull_request:
push:
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
ocaml-compiler:
- 5.0.x
local-packages:
- eio eio_posix eio_main
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-local-packages:
opam-disable-sandboxing: true
- run: opam --cli=2.1 pin -yn --with-version=dev .
- run: opam install ${{ matrix.local-packages }} --deps-only --with-test
- run: opam install ${{ matrix.local-packages }} --with-test
windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v2
with:
opam-pin: false
opam-depext: false
ocaml-compiler: ocaml.5.0.0,ocaml-option-mingw
opam-repositories: |
dra27: https://github.com/dra27/opam-repository.git#windows-5.0
normal: https://github.com/ocaml/opam-repository.git
# --with-version=dev is not available, and --with-test also tries running tests for packages (like MDX) which fail...
- run: |
opam pin -yn eio.dev .
opam pin -yn eio_windows.dev .
opam pin -yn eio_main.dev .
opam install eio eio_windows eio_main --deps-only --with-test
- run: opam exec -- dune build
- run: opam exec -- dune runtest
- run: opam exec -- dune exec -- ./examples/net/main.exe
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build .