1818 ocaml-compiler :
1919 - 4.14.x
2020 - 5.00.x
21+ - 5.01.x
22+ - 5.02.x
23+ include :
24+ - os : macos-latest
25+ ocaml-compiler : 5.02.x
2126
2227 runs-on : ${{ matrix.os }}
2328
@@ -49,10 +54,14 @@ jobs:
4954 submodules : true
5055 ref : version_118
5156
52- - name : Install ninja
53- if : steps.cache-binaryen.outputs.cache-hit != 'true'
57+ - name : Install ninja (Ubuntu)
58+ if : matrix.os == 'ubuntu-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
5459 run : sudo apt-get install ninja-build
5560
61+ - name : Install ninja (MacOS)
62+ if : matrix.os == 'macos-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
63+ run : brew install ninja
64+
5665 - name : Build binaryen
5766 if : steps.cache-binaryen.outputs.cache-hit != 'true'
5867 working-directory : ./binaryen
7988 ~/.opam
8089 _opam
8190 /opt/hostedtoolcache/opam
91+ /Users/runner/hostedtoolcache/opam
8292 key : ${{ runner.os }}-ocaml-${{ matrix.ocaml-compiler }}
8393
8494 - name : Install OCaml ${{ matrix.ocaml-compiler }}
@@ -90,14 +100,20 @@ jobs:
90100 opam-depext : true
91101 opam-depext-flags : --with-test
92102
93- - name : Install packages
94- if : steps.cache-ocaml.outputs.cache-hit
103+ - name : Install packages (Ubuntu)
104+ if : matrix.os == 'ubuntu-latest' && steps.cache-ocaml.outputs.cache-hit
95105 run : sudo apt-get install bubblewrap
96106
107+ - name : Install packages (MacOs)
108+ if : matrix.os == 'macos-latest' && steps.cache-ocaml.outputs.cache-hit
109+ # for graphics
110+ run : brew install xquartz
111+
97112 - name : Set opam path
98113 if : steps.cache-ocaml.outputs.cache-hit
99114 run : |
100115 echo /opt/hostedtoolcache/opam/*/x86_64 >> $GITHUB_PATH
116+ echo /Users/runner/hostedtoolcache/opam/*/arm64 >> $GITHUB_PATH
101117
102118 - name : Cache OCaml
103119 if : steps.cache-ocaml.outputs.cache-hit != 'true'
@@ -107,6 +123,7 @@ jobs:
107123 ~/.opam
108124 _opam
109125 /opt/hostedtoolcache/opam
126+ /Users/runner/hostedtoolcache/opam
110127 key : ${{ runner.os }}-ocaml-${{ matrix.ocaml-compiler }}
111128
112129 - name : Checkout code
0 commit comments