-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GitHub Actions workflows #1782
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,6 @@ on: | |
jobs: | ||
build: | ||
env: | ||
OPAMJOBS: 2 | ||
OPAMYES: true | ||
WASM_OF_OCAML: true | ||
|
||
strategy: | ||
|
@@ -19,45 +17,44 @@ jobs: | |
os: | ||
- ubuntu-latest | ||
ocaml-compiler: | ||
- 4.14.x | ||
- 5.0.x | ||
- 5.1.x | ||
- 5.2.x | ||
- "4.14" | ||
- "5.0" | ||
- "5.1" | ||
- "5.2" | ||
- ocaml-compiler.5.3.0~beta2 | ||
separate_compilation: | ||
- true | ||
include: | ||
- os: macos-latest | ||
ocaml-compiler: 5.2.x | ||
ocaml-compiler: "5.2" | ||
separate_compilation: true | ||
- os: ubuntu-latest | ||
ocaml-compiler: 4.14.x | ||
ocaml-compiler: "4.14" | ||
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: Checkout tree | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install node | ||
- name: Checkout Jane Street opam repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: janestreet/opam-repository | ||
ref: feaf8f831051fd5f316963b28efd728cf0b0eca1 | ||
path: janestreet/opam-repository | ||
|
||
- name: Set-up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 23 | ||
node-version: latest | ||
|
||
- name: Install OCaml ${{ matrix.ocaml-compiler }} | ||
- name: Set-up 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: | ||
|
@@ -67,84 +64,68 @@ jobs: | |
# 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 | ||
opam install opam-format ocamlfind dune graphics cmdliner sexplib0.v0.16.0 | ||
opam exec -- ocaml tools/ci_setup.ml | ||
|
||
- name: Install dependencies | ||
run: opam install . --deps-only --with-test | ||
|
||
- 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 | ||
working-directory: ./janestreet/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 | ||
working-directory: ./janestreet/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 | ||
working-directory: ./janestreet/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 | ||
working-directory: ./janestreet/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 | ||
working-directory: ./janestreet/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 | ||
working-directory: ./janestreet/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 | ||
working-directory: ./janestreet/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 | ||
working-directory: ./janestreet/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 | ||
working-directory: ./janestreet/lib/bonsai | ||
run: opam exec -- dune runtest | ||
|
||
- name: Run Bonsai tests (release profile) | ||
if: ${{ ! matrix.separate_compilation }} | ||
working-directory: ./jane-street/lib/bonsai | ||
working-directory: ./janestreet/lib/bonsai | ||
run: opam exec -- dune runtest --profile release |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,12 +83,15 @@ jobs: | |
|
||
steps: | ||
- name: Set git to use LF | ||
if: matrix.ocaml-compiler < 5.2 | ||
if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }} | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
git config --global core.ignorecase false | ||
|
||
- name: Checkout tree | ||
uses: actions/checkout@v4 | ||
|
||
# EJGA: Note that I tried to fix this upstream as depext is | ||
# getting much better, but no luck yet, c.f: | ||
# https://github.com/ocaml/opam-repository/pull/26626 | ||
|
@@ -102,23 +105,15 @@ jobs: | |
# try to install them anyways, so we save an apt-roundtrip. | ||
sudo aptitude -o Acquire::Retries=30 install gcc-multilib g++-multilib pkg-config libgmp-dev libgmp-dev:i386 libx11-dev:i386 -y | ||
|
||
- name: Checkout tree | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set-up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
node-version: latest | ||
|
||
- name: Set-up OCaml ${{ matrix.ocaml-compiler }} | ||
uses: ocaml/setup-ocaml@v3 | ||
with: | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
dune-cache: true | ||
opam-pin: false | ||
|
||
- run: opam install conf-pkg-config | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is the second time you try to remove that line. It was here on purpose to work-around an opam packaging issue. Are you sure it is no longer needed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's no longer needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be more clear, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't remember this being related to zarith There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At least for now, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I though the issue was with mingw-64-shims and its optional dep on conf-pkg-config. Here is an extract of a private discussion with @dra27
@dra27 do you remember this issue, can you confirm it was fixed ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I remember correctly, it was fixed in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I have failing logs involving mingw-w64-shims.0.2.0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reverted in #1786 |
||
if: runner.os == 'Windows' | ||
|
||
- name: Set-up Binaryen | ||
uses: Aandreba/[email protected] | ||
|
@@ -132,11 +127,7 @@ jobs: | |
- run: opam install . --best-effort | ||
if: ${{ matrix.skip-test }} | ||
|
||
- run: cat VERSION | xargs opam pin . -n --with-version | ||
if: ${{ !matrix.skip-test }} | ||
shell: bash | ||
|
||
- run: opam install . --with-test --deps-only | ||
- run: opam install . --deps-only --with-test | ||
# Install the test dependencies | ||
if: ${{ !matrix.skip-test }} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ module StringSet = Set.Make (String) | |
|
||
(****) | ||
|
||
let repo = "jane-street/opam-repository/packages" | ||
let repo = "janestreet/opam-repository/packages" | ||
|
||
let roots = [ "bonsai"; "string_dict" ] | ||
|
||
|
@@ -212,7 +212,7 @@ let pin delay nm = | |
(Printf.sprintf | ||
"opam pin add -n %s https://github.com/ocaml-wasm/%s.git#wasm" | ||
(try List.assoc nm aliases | ||
with Not_found -> if List.mem_assoc nm packages then nm ^ ".v0.16.0" else nm) | ||
with Not_found -> if List.mem_assoc nm packages then nm ^ ".v0.16.1" else nm) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yet another change hidden in the noise that is not explained. |
||
nm) | ||
|
||
let pin_packages js = | ||
|
@@ -231,7 +231,7 @@ let clone delay ?branch ?(depth = 1) nm src = | |
exec_async | ||
~delay | ||
(Printf.sprintf | ||
"git clone -q --depth %d %s%s jane-street/lib/%s" | ||
"git clone -q --depth %d %s%s janestreet/lib/%s" | ||
depth | ||
(match branch with | ||
| None -> "" | ||
|
@@ -246,12 +246,11 @@ let clone' delay ?branch ?commit nm src = | |
let* () = clone delay ?branch ~depth:100 nm src in | ||
exec_async | ||
~delay:0 | ||
(Printf.sprintf "cd jane-street/lib/%s && git checkout -b wasm %s" nm commit) | ||
(Printf.sprintf "cd janestreet/lib/%s && git checkout -b wasm %s" nm commit) | ||
|
||
let () = | ||
Out_channel.( | ||
with_open_bin "jane-street/dune-workspace" | ||
@@ fun ch -> output_string ch dune_workspace) | ||
with_open_bin "janestreet/dune-workspace" @@ fun ch -> output_string ch dune_workspace) | ||
|
||
let () = | ||
let js, others = | ||
|
@@ -296,7 +295,7 @@ let () = | |
List.iter | ||
(fun (dir, patch) -> | ||
let ch = | ||
Unix.open_process_out (Printf.sprintf "cd jane-street/lib/%s && patch -p 1" dir) | ||
Unix.open_process_out (Printf.sprintf "cd janestreet/lib/%s && patch -p 1" dir) | ||
in | ||
output_string ch patch; | ||
ignore (Unix.close_process_out ch)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to come back once we start testing windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the upcoming PR, I'm going to make changes to separate the jobs for testing and installation testing so that we can run all tests on all platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you mean by that.