2020 - 5.00.x
2121 - 5.01.x
2222 - 5.02.x
23+ include :
24+ - os : macos-latest
25+ ocaml-compiler : 5.02.x
2326
2427 runs-on : ${{ matrix.os }}
2528
@@ -51,10 +54,14 @@ jobs:
5154 submodules : true
5255 ref : version_118
5356
54- - name : Install ninja
55- 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'
5659 run : sudo apt-get install ninja-build
5760
61+ - name : Install ninja (MacOS)
62+ if : matrix.os == 'macos-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
63+ run : brew install ninja
64+
5865 - name : Build binaryen
5966 if : steps.cache-binaryen.outputs.cache-hit != 'true'
6067 working-directory : ./binaryen
8188 ~/.opam
8289 _opam
8390 /opt/hostedtoolcache/opam
91+ /Users/runner/hostedtoolcache/opam
8492 key : ${{ runner.os }}-ocaml-${{ matrix.ocaml-compiler }}
8593
8694 - name : Install OCaml ${{ matrix.ocaml-compiler }}
@@ -92,14 +100,20 @@ jobs:
92100 opam-depext : true
93101 opam-depext-flags : --with-test
94102
95- - name : Install packages
96- if : steps.cache-ocaml.outputs.cache-hit
103+ - name : Install packages (Ubuntu)
104+ if : matrix.os == 'ubuntu-latest' && steps.cache-ocaml.outputs.cache-hit
97105 run : sudo apt-get install bubblewrap
98106
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+
99112 - name : Set opam path
100113 if : steps.cache-ocaml.outputs.cache-hit
101114 run : |
102115 echo /opt/hostedtoolcache/opam/*/x86_64 >> $GITHUB_PATH
116+ echo /Users/runner/hostedtoolcache/opam/*/arm64 >> $GITHUB_PATH
103117
104118 - name : Cache OCaml
105119 if : steps.cache-ocaml.outputs.cache-hit != 'true'
@@ -109,6 +123,7 @@ jobs:
109123 ~/.opam
110124 _opam
111125 /opt/hostedtoolcache/opam
126+ /Users/runner/hostedtoolcache/opam
112127 key : ${{ runner.os }}-ocaml-${{ matrix.ocaml-compiler }}
113128
114129 - name : Checkout code
0 commit comments