-
Notifications
You must be signed in to change notification settings - Fork 189
150 lines (123 loc) · 4.77 KB
/
build-wasm_of_ocaml.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Build wasm_of_ocaml
on:
pull_request:
push:
branches:
- master
jobs:
build:
env:
OPAMJOBS: 2
OPAMYES: true
WASM_OF_OCAML: true
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- 4.14.x
- 5.0.x
- 5.1.x
- 5.2.x
- ocaml-compiler.5.3.0~beta2
separate_compilation:
- true
include:
- os: macos-latest
ocaml-compiler: 5.2.x
separate_compilation: true
- os: ubuntu-latest
ocaml-compiler: 4.14.x
separate_compilation: false
runs-on: ${{ matrix.os }}
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.ignorecase false
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 'v24.0.0-v8-canary202412116884e26428'
- name: Install OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Checkout code
uses: actions/checkout@v4
with:
path: wasm_of_ocaml
- name: Set-up Binaryen
uses: Aandreba/[email protected]
with:
token: ${{ github.token }}
- name: Pin faked binaryen-bin package
# It's faster to use a cached version
run: opam install --fake binaryen-bin
- name: Checkout Jane Street opam repository
uses: actions/checkout@v4
with:
repository: janestreet/opam-repository
ref: feaf8f831051fd5f316963b28efd728cf0b0eca1
path: jane-street/opam-repository
- name: Pin wasm_of_ocaml
working-directory: ./wasm_of_ocaml
run: opam pin -n --with-version `< VERSION` .
- name: Install some needed packages
run: opam install opam-format ocamlfind dune graphics cmdliner sexplib0.v0.16.0
- name: Checkout Jane Street packages
run: opam exec -- ocaml wasm_of_ocaml/tools/ci_setup.ml
- name: Install wasm_of_ocaml and its test dependencies
working-directory: ./wasm_of_ocaml
run: |
opam install `basename -s .opam *.opam` num cohttp-lwt-unix ppx_expect cstruct
- name: Run tests
if: ${{ matrix.separate_compilation }}
working-directory: ./wasm_of_ocaml
run: opam exec -- dune build @runtest-wasm
- name: Run tests with CPS effects
if: ${{ matrix.ocaml-compiler >= '5.' && matrix.separate_compilation }}
working-directory: ./wasm_of_ocaml
run: opam exec -- dune build @runtest-wasm --profile with-effects
- name: Run Base tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/base
run: opam exec -- dune runtest
- name: Run Base bigstring tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/base_bigstring
run: opam exec -- dune runtest
- name: Run Core tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/core
run: opam exec -- dune runtest
- name: Run Bignum tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/bignum
run: opam exec -- dune runtest
- name: Run Bin_prot tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/bin_prot
run: opam exec -- dune runtest
- name: Run String_dict tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/string_dict
run: opam exec -- dune runtest
- name: Run Zarith tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/zarith_stubs_js
run: opam exec -- dune runtest
- name: Run Virtual_dom tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/virtual_dom
run: opam exec -- dune runtest
- name: Run Bonsai tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
working-directory: ./jane-street/lib/bonsai
run: opam exec -- dune runtest
- name: Run Bonsai tests (release profile)
if: ${{ ! matrix.separate_compilation }}
working-directory: ./jane-street/lib/bonsai
run: opam exec -- dune runtest --profile release