Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierNicole authored and vouillon committed Oct 3, 2024
1 parent b886536 commit c1480ef
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
*.ml linguist-language=OCaml
*.mli linguist-language=OCaml

# We are pinning wasm_of_ocaml using this file in the CI. This would
# fail on Windows otherwise.
VERSION -text
8 changes: 8 additions & 0 deletions .github/workflows/build-wasm_of_ocaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ jobs:
with:
path: wasm_of_ocaml

- name: Pin faked binaryen-bin package
# It's faster to use a cached version
working-directory: ./wasm_of_ocaml
run: |
echo opam-version: '"2.0"' > binaryen-bin.opam
opam pin -n .
rm binaryen-bin.opam
- name: Checkout Jane Street opam repository
uses: actions/checkout@v4
with:
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,31 @@ jobs:
dune-cache: true
opam-pin: false

- name: Pin dune
run: |
opam pin add dune.3.17 https://github.com/ocaml-wasm/dune.git#wasm_of_ocaml
- run: opam install conf-pkg-config
if: runner.os == 'Windows'

- run: opam install . --best-effort
if: ${{ matrix.skip-test }}

- run: opam install . --with-test
- run: cat VERSION | xargs opam pin wasm_of_ocaml-compiler . -n --with-version
if: ${{ !matrix.skip-test }}
shell: bash

- run: opam install conf-c++
# Otherwise, the next step fails reinstalling gcc while compiling
# other
if: ${{ !matrix.skip-test && runner.os == 'Windows' }}

- run: opam install . --with-test --deps-only
# Install the test dependencies
if: ${{ !matrix.skip-test }}

- run: opam install .
# Install the packages (without running the tests)
if: ${{ !matrix.skip-test }}

- run: opam exec -- make all
Expand Down Expand Up @@ -134,6 +152,9 @@ jobs:
with:
ocaml-compiler: "5.2"
dune-cache: true
- name: Pin dune
run: |
opam pin add -n dune.3.17 https://github.com/ocaml-wasm/dune.git#wasm_of_ocaml
- uses: ocaml/setup-ocaml/lint-opam@v3

lint-fmt:
Expand All @@ -146,6 +167,9 @@ jobs:
with:
ocaml-compiler: "5.2"
dune-cache: true
- name: Pin dune
run: |
opam pin add -n dune.3.17 https://github.com/ocaml-wasm/dune.git#wasm_of_ocaml
- uses: ocaml/setup-ocaml/lint-fmt@v3

lint-runtime:
Expand Down
6 changes: 5 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
"files": {
"include": ["runtime"],
"ignore": ["runtime/zstd.ts"]
"ignore": [
"runtime/zstd.ts",
"runtime/wasm/runtime.js",
"runtime/wasm/deps.json"
]
},
"formatter": {
"enabled": true,
Expand Down
5 changes: 3 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
(description
"Wasm_of_ocaml is a compiler from OCaml bytecode to WebAssembly. It makes it possible to run pure OCaml programs in JavaScript environment like browsers and Node.js")
(depends
(ocaml (and (>= 4.14) (< 5.1)))
(ocaml (and (>= 4.14) (< 5.3)))
(js_of_ocaml (= :version))
(num :with-test)
(ppx_expect (and (>= v0.14.2) :with-test))
Expand All @@ -150,7 +150,8 @@
menhir
menhirLib
menhirSdk
yojson)
yojson
binaryen-bin)
(depopts
ocamlfind)
(conflicts
Expand Down
3 changes: 2 additions & 1 deletion wasm_of_ocaml-compiler.opam
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview"
bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues"
depends: [
"dune" {>= "3.17"}
"ocaml" {>= "4.14" & < "5.1"}
"ocaml" {>= "4.14" & < "5.3"}
"js_of_ocaml" {= version}
"num" {with-test}
"ppx_expect" {>= "v0.14.2" & with-test}
Expand All @@ -25,6 +25,7 @@ depends: [
"menhirLib"
"menhirSdk"
"yojson"
"binaryen-bin"
"odoc" {with-doc}
]
depopts: ["ocamlfind"]
Expand Down

0 comments on commit c1480ef

Please sign in to comment.