Skip to content

Commit ef0be34

Browse files
authored
Merge pull request #95 from ocaml-wasm/ci-mac
CI: test with OCaml 5.01, 5.02 and under MacOS
2 parents 78760fd + 86d3f4b commit ef0be34

File tree

5 files changed

+39
-10
lines changed

5 files changed

+39
-10
lines changed

.github/workflows/build-wasm_of_ocaml.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
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
@@ -79,6 +88,7 @@ jobs:
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

compiler/tests-ocaml/lib-digest/dune

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,20 @@
2222
(names digests)
2323
(libraries)
2424
(enabled_if
25-
(>= %{ocaml_version} 5.2))
25+
(and
26+
(>= %{ocaml_version} 5.2)
27+
(<> %{profile} wasm)
28+
(<> %{profile} wasm-effects)))
2629
(modules digests)
2730
(modes js))
2831

2932
(rule
3033
(alias runtest)
3134
(deps digests.bc.js)
3235
(enabled_if
33-
(>= %{ocaml_version} 5.2))
36+
(and
37+
(>= %{ocaml_version} 5.2)
38+
(<> %{profile} wasm)
39+
(<> %{profile} wasm-effects)))
3440
(action
3541
(run node ./digests.bc.js)))

ppx/ppx_deriving_json/tests/dune

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,21 @@
2727
(rule
2828
(alias runtest)
2929
(enabled_if
30-
(>= %{ocaml_version} 5.1))
30+
(and
31+
(>= %{ocaml_version} 5.1)
32+
(<> %{profile} wasm)
33+
(<> %{profile} wasm-effects)))
3134
;; (package js_of_ocaml-ppx)
3235
(action
3336
(diff ppx.mlt ppx.mlt.corrected)))
3437

3538
(rule
3639
(alias runtest)
3740
(enabled_if
38-
(>= %{ocaml_version} 5.1))
41+
(and
42+
(>= %{ocaml_version} 5.1)
43+
(<> %{profile} wasm)
44+
(<> %{profile} wasm-effects)))
3945
;; (package js_of_ocaml-ppx)
4046
(action
4147
(diff gen.mlt gen.mlt.corrected)))

runtime/wasm/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
(rule
1515
(target version-dependent.wat)
16-
(deps version-dependent/post-5.2.wat)
16+
(deps version-dependent/post-5.1.wat)
1717
(enabled_if
1818
(and
1919
(>= %{ocaml_version} 5.1.0)

tools/node_wrapper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22
export PATH=$(echo $PATH | cut -d : -f 2-) # Do not call oneself recursively
3-
exec node --experimental-wasm-imported-strings --experimental-wasm-stack-switching --stack-size=7000 "$@"
3+
exec node --experimental-wasm-imported-strings --experimental-wasm-stack-switching --stack-size=10000 "$@"

0 commit comments

Comments
 (0)