Skip to content

Commit b2bfd63

Browse files
committed
OxCaml: setup CI
1 parent 7e1bcd2 commit b2bfd63

File tree

5 files changed

+508
-3
lines changed

5 files changed

+508
-3
lines changed

.github/workflows/js_of_ocaml.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,14 @@ jobs:
9090
skip-effects: false
9191
skip-test: false
9292
skip-doc: true
93-
93+
- os: ubuntu-latest
94+
os-name: Ubuntu
95+
ocaml-name: "OxCaml"
96+
ocaml-compiler: "ocaml-variants.5.2.0+ox"
97+
skip-effects: false
98+
skip-test: false
99+
skip-doc: true
100+
94101
runs-on: ${{ matrix.os }}
95102

96103
name:
@@ -127,6 +134,16 @@ jobs:
127134
uses: ocaml/setup-ocaml@v3
128135
with:
129136
ocaml-compiler: ${{ matrix.ocaml-compiler }}
137+
if: matrix.ocaml-compiler != 'ocaml-variants.5.2.0+ox'
138+
139+
- name: Set-up OxCaml ${{ matrix.ocaml-compiler }}
140+
uses: ocaml/setup-ocaml@v3
141+
with:
142+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
143+
opam-repositories: |
144+
default: https://github.com/ocaml/opam-repository.git
145+
ox: https://github.com/oxcaml/opam-repository.git
146+
if: matrix.ocaml-compiler == 'ocaml-variants.5.2.0+ox'
130147

131148
# Work-around a race between reinstalling mingw-w64-shims
132149
# (because of conf-pkg-config optional dep) and installing other
@@ -146,10 +163,19 @@ jobs:
146163
- run: opam install . --best-effort --solver builtin-mccs+glpk
147164
if: ${{ matrix.skip-test }}
148165

166+
- name: Pin qcheck
167+
# With OxCaml fixes
168+
run: opam pin add -n https://github.com/c-cube/qcheck.git
169+
if: matrix.ocaml-compiler == 'ocaml-variants.5.2.0+ox'
170+
149171
- run: opam install . --deps-only --with-test
150172
# Install the test dependencies
151173
if: ${{ !matrix.skip-test }}
152174

175+
- name: Pin js_of_ocaml
176+
# OxCaml wants a precise version of Js_of_ocaml
177+
run: opam pin . -n --with-version 6.0.1+ox
178+
153179
- run: opam install .
154180
# Install the packages (without running the tests)
155181
if: ${{ !matrix.skip-test }}

.github/workflows/wasm_of_ocaml.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ jobs:
5959
separate_compilation: false
6060
jane_street_tests: true
6161
all_jane_street_tests: false
62+
- os: ubuntu-latest
63+
os-name: Ubuntu
64+
ocaml-compiler: "ocaml-variants.5.2.0+ox"
65+
separate_compilation: true
66+
jane_street_tests: true
67+
all_jane_street_tests: true
6268

6369
runs-on: ${{ matrix.os }}
6470

@@ -76,13 +82,20 @@ jobs:
7682
path: wasm_of_ocaml
7783

7884
- name: Checkout Jane Street opam repository
79-
if: matrix.jane_street_tests
85+
if: matrix.jane_street_tests && matrix.ocaml-compiler != 'ocaml-variants.5.2.0+ox'
8086
uses: actions/checkout@v5
8187
with:
8288
repository: janestreet/opam-repository
8389
ref: 2819773f29b6f6c14b918eae3cb40c8ff6b22d0e
8490
path: janestreet/opam-repository
8591

92+
- name: Checkout OxCaml opam repository
93+
if: matrix.jane_street_tests && matrix.ocaml-compiler == 'ocaml-variants.5.2.0+ox'
94+
uses: actions/checkout@v5
95+
with:
96+
repository: oxcaml/opam-repository
97+
path: janestreet/opam-repository
98+
8699
- name: Set-up Node.js
87100
uses: actions/setup-node@v6
88101
with:
@@ -92,6 +105,16 @@ jobs:
92105
uses: ocaml/setup-ocaml@v3
93106
with:
94107
ocaml-compiler: ${{ matrix.ocaml-compiler }}
108+
if: matrix.ocaml-compiler != 'ocaml-variants.5.2.0+ox'
109+
110+
- name: Set-up OxCaml ${{ matrix.ocaml-compiler }}
111+
uses: ocaml/setup-ocaml@v3
112+
with:
113+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
114+
opam-repositories: |
115+
default: https://github.com/ocaml/opam-repository.git
116+
ox: https://github.com/oxcaml/opam-repository.git
117+
if: matrix.ocaml-compiler == 'ocaml-variants.5.2.0+ox'
95118

96119
- name: Set-up Binaryen
97120
uses: Aandreba/[email protected]
@@ -110,7 +133,13 @@ jobs:
110133

111134
- name: Pin wasm_of_ocaml
112135
working-directory: ./wasm_of_ocaml
113-
run: opam pin . -n --with-version dev
136+
run: opam pin . -n --with-version 6.0.1+ox
137+
138+
- name: Pin specific packages for OxCaml
139+
run: |
140+
opam pin add -n https://github.com/vouillon/qcheck.git#oxcaml
141+
opam pin add -n zarith 1.12+ox
142+
if: matrix.ocaml-compiler == 'ocaml-variants.5.2.0+ox'
114143

115144
- name: Checkout Jane Street packages
116145
if: matrix.jane_street_tests
File renamed without changes.

0 commit comments

Comments
 (0)