Skip to content

Commit 770ddf6

Browse files
committed
OxCaml: setup CI
1 parent ac60bcb commit 770ddf6

File tree

5 files changed

+488
-3
lines changed

5 files changed

+488
-3
lines changed

.github/workflows/js_of_ocaml.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ jobs:
9696
skip-effects: true
9797
skip-test: true
9898
skip-doc: true
99+
- os: ubuntu-latest
100+
os-name: Ubuntu
101+
ocaml-name: "OxCaml"
102+
ocaml-compiler: "ocaml-variants.5.2.0+ox"
103+
skip-effects: false
104+
skip-test: false
105+
skip-doc: true
99106

100107
runs-on: ${{ matrix.os }}
101108

@@ -133,6 +140,16 @@ jobs:
133140
uses: ocaml/setup-ocaml@v3
134141
with:
135142
ocaml-compiler: ${{ matrix.ocaml-compiler }}
143+
if: matrix.ocaml-compiler != 'ocaml-variants.5.2.0+ox'
144+
145+
- name: Set-up OxCaml ${{ matrix.ocaml-compiler }}
146+
uses: ocaml/setup-ocaml@v3
147+
with:
148+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
149+
opam-repositories: |
150+
default: https://github.com/ocaml/opam-repository.git
151+
ox: https://github.com/oxcaml/opam-repository.git
152+
if: matrix.ocaml-compiler == 'ocaml-variants.5.2.0+ox'
136153

137154
# Work-around a race between reinstalling mingw-w64-shims
138155
# (because of conf-pkg-config optional dep) and installing other
@@ -152,10 +169,17 @@ jobs:
152169
- run: opam install . --best-effort --solver builtin-mccs+glpk
153170
if: ${{ matrix.skip-test }}
154171

172+
- name: Pin qcheck
173+
run: opam pin add -n https://github.com/vouillon/qcheck.git#oxcaml
174+
if: matrix.ocaml-compiler == 'ocaml-variants.5.2.0+ox'
175+
155176
- run: opam install . --deps-only --with-test
156177
# Install the test dependencies
157178
if: ${{ !matrix.skip-test }}
158179

180+
- name: Pin js_of_ocaml
181+
run: opam pin . -n --with-version 6.0.1+ox
182+
159183
- run: opam install .
160184
# Install the packages (without running the tests)
161185
if: ${{ !matrix.skip-test }}

.github/workflows/wasm_of_ocaml.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ jobs:
5858
separate_compilation: false
5959
jane_street_tests: true
6060
all_jane_street_tests: false
61+
- os: ubuntu-latest
62+
os-name: Ubuntu
63+
ocaml-compiler: "ocaml-variants.5.2.0+ox"
64+
separate_compilation: true
65+
jane_street_tests: true
66+
all_jane_street_tests: true
6167

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

@@ -75,13 +81,20 @@ jobs:
7581
path: wasm_of_ocaml
7682

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

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

95118
- name: Set-up Binaryen
96119
uses: Aandreba/[email protected]
@@ -109,14 +132,21 @@ jobs:
109132

110133
- name: Pin wasm_of_ocaml
111134
working-directory: ./wasm_of_ocaml
112-
run: opam pin . -n --with-version dev
135+
run: opam pin . -n --with-version 6.0.1+ox
136+
137+
- name: Pin ppxlib
138+
run: opam pin add ppxlib -n 0.35.0
139+
if: matrix.ocaml-compiler != 'ocaml-variants.5.2.0+ox'
140+
141+
- name: Pin qcheck
142+
run: opam pin add -n https://github.com/vouillon/qcheck.git#oxcaml
143+
if: matrix.ocaml-compiler == 'ocaml-variants.5.2.0+ox'
113144

114145
- name: Checkout Jane Street packages
115146
if: matrix.jane_street_tests
116147
run: |
117148
opam repo add js janestreet/opam-repository
118149
opam install opam-format
119-
opam pin add ppxlib -n 0.35.0
120150
opam exec -- dune exec --root wasm_of_ocaml tools/ci_setup.exe
121151
122152
- name: Pin Jane Street packages
File renamed without changes.

0 commit comments

Comments
 (0)