Skip to content
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

Get wasm_of_ocaml up-to-date with js_of_ocaml by merging js_of_ocaml master #86

Merged
merged 356 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
356 commits
Select commit Hold shift + click to select a range
645728d
Compiler: js-parser, improve arrow support
hhugo Dec 11, 2023
9b6572e
Compiler: js-parser: improve lexing errors
hhugo Dec 11, 2023
a2d3ca8
Tests: improve js-parser testing script
hhugo Dec 11, 2023
2a5738f
Compiler: small dedup in menhir parser
hhugo Dec 11, 2023
fa32222
Compiler: js-parser: fix yield*
hhugo Dec 11, 2023
ce17958
Compiler: js-parser: fix class member printing
hhugo Dec 11, 2023
1fbda4e
Compiler: js-parser: fix array binding pattern
hhugo Dec 11, 2023
49d89b1
Tests: better js-parser testing tool
hhugo Dec 11, 2023
575df01
Compiler: js-parser: fix default export of function
hhugo Dec 12, 2023
b29a1e4
Compiler: js-parser: tune printing of ECallTemplate
hhugo Dec 12, 2023
fb7d06a
Compiler: js-parser: fix output of async arrow
hhugo Dec 12, 2023
de3b21f
Compiler: js-parser: fix output of yield
hhugo Dec 12, 2023
04ac543
Compiler: js-parser: missing semi for debugger
hhugo Dec 12, 2023
b2545b5
fixup! Compiler: js-parser: fix default export of function
hhugo Dec 12, 2023
ec02751
Tests: switch tests-full to 5.1.1
hhugo Dec 12, 2023
b1e5761
Misc: dedicated alias for testing the js-parser
hhugo Dec 12, 2023
7356498
Compiler: js-parser, support ?.#privateName
hhugo Dec 13, 2023
3241e86
Compiler: js-parser, support #privateName
hhugo Dec 13, 2023
8549bba
Changes
hhugo Dec 12, 2023
69853f3
Compiler: js-parser, fix printer for class-expr
hhugo Dec 15, 2023
4a92bc7
Compiler: js-parser, fix pringing for empty elt in array lit
hhugo Dec 15, 2023
2581a85
Compiler: js-parser, allow optional semi at the end of export default…
hhugo Dec 15, 2023
1e426a1
fmt
hhugo Dec 17, 2023
7c7a7df
Compiler: js-parser: refactor yield
hhugo Dec 15, 2023
b3c5a32
Compiler: js-parser: preserve consise body
hhugo Dec 17, 2023
cdbe29b
Compiler: js-parser: fix lexing for escaped quotes
hhugo Dec 18, 2023
2a6a205
Compiler: js-parser: parse with statement
hhugo Dec 18, 2023
dcf3567
Compiler: js-parser: tune parens in js output
hhugo Dec 18, 2023
a4e5506
Compiler: js-parser: restrict for in
hhugo Dec 18, 2023
67f3982
Tests: fix test script
hhugo Dec 18, 2023
a2d3b4f
Runtime: fix for num 1.5
hhugo Dec 18, 2023
b9c9a4b
5.6.0
hhugo Jan 2, 2024
4921bb0
Misc: opam constraint
hhugo Dec 4, 2023
d808dfa
Compiler: fix stack for ocaml 5.2
hhugo Dec 4, 2023
61ea819
Runtime: support for blake2b
hhugo Dec 20, 2023
aa5f875
Runtime: xdg_default
hhugo Dec 20, 2023
9f3fa5f
Runtime: caml_ml_is_binary_mode
hhugo Jan 3, 2024
db4a859
Mics: compat
hhugo Jan 3, 2024
0965d78
Changes
hhugo Jan 3, 2024
792610b
Compiler: fix for let/const inside try-catch block
hhugo Dec 6, 2023
e461964
Compiler: handle more errors in js_assign
hhugo Dec 6, 2023
9077bf9
Compiler: small cleanup
hhugo Dec 6, 2023
301d035
Compiler: no longer rely on iife
hhugo Dec 5, 2023
2c4cbad
CI: fix OCaml version on windows
hhugo Dec 18, 2023
f4fb4d6
fixup! Compiler: no longer rely on iife
hhugo Dec 19, 2023
274387c
Compiler: less agressive flushing for function
hhugo Jan 4, 2024
6aa01f1
Changes
hhugo Jan 6, 2024
dac23c8
typo
hhugo Jan 6, 2024
a22a811
Compiler: no longer need to copy Ident.tbl
hhugo Jan 9, 2024
679bb51
added 'ellipse' method to canvasRenderingContext2D (#1555)
FayCarsons Jan 18, 2024
82ca673
Test: expose global DCE issue with the toplevel
hhugo Jan 21, 2024
23ea21f
Compiler: fix toplevel with globaldeacode
hhugo Jan 21, 2024
afdb5f3
Compiler: fix for 12599
hhugo Sep 29, 2023
c4052f9
Tests: Explicitly void unused c variable (#1560)
rickyvetter Feb 6, 2024
b59395e
Compiler: fix scope of fun/class inside blocks
hhugo Feb 4, 2024
d529fd7
Compiler: accept test
hhugo Feb 4, 2024
8f21eee
Compiler: add failing test
hhugo Feb 4, 2024
9f5a4d3
disable loop shrinking
hhugo Feb 4, 2024
83d9005
Compiler: preserve scopes of closures inside loops.
hhugo Feb 4, 2024
0aaec26
Changes
hhugo Feb 5, 2024
b345c53
Compiler: fix for 5.2~alpha1
hhugo Feb 9, 2024
b7d2959
Runtime: adapt runtime for 5.2
hhugo Feb 9, 2024
6ad66f2
Misc: fix version
hhugo Feb 10, 2024
323bd40
Misc: cleanup doc
hhugo Feb 10, 2024
cc74d94
Compiler: better function deps
hhugo Feb 12, 2024
1a03661
Compiler: small cleanup
hhugo Feb 12, 2024
2a7adc6
Bump version
hhugo Feb 16, 2024
517cd28
Compiler: don't accept closure inside loops if not needed
hhugo Feb 18, 2024
f73b7ef
Revert "Compiler: better function deps"
hhugo Feb 19, 2024
9b51527
Compiler: cleanup optimisation performed at the wrong stage
hhugo Feb 19, 2024
515ff3c
Compiler: cleanup invalid access_queue
hhugo Feb 19, 2024
af34d16
Tests: add test for compact option
hhugo Feb 21, 2024
b7c5ba4
Compiler: remove quadratic behavior in enqueue
hhugo Feb 21, 2024
8f34006
Changes
hhugo Feb 21, 2024
cff282b
Compiler: only flush the necessary env for closure (#1568)
hhugo Feb 28, 2024
273f6b5
Compiler: fix compact vardecl (#1571)
hhugo Feb 29, 2024
020632c
Lib: Dialog element support (#1257)
sagotch Feb 29, 2024
4c745f5
Runtime: Fix runtime for gc (#1572)
hhugo Feb 29, 2024
c2dae87
Compiler: remove some polymorphic compare (#1574)
hhugo Feb 29, 2024
dd7226b
Lib: fix paragraph construction and coercion
Mar 1, 2024
123504b
Compiler: dedicated type for "special" values (#1573)
hhugo Mar 1, 2024
46ef5fa
Compiler: remove last argument of Pushtrap (#1575)
hhugo Mar 1, 2024
e269769
Compiler: fix parallel renaming (#1580)
hhugo Mar 4, 2024
7c886d2
Runtime: reduce memory leak caused by channels (#1581)
hhugo Mar 4, 2024
eb987e0
Changes
hhugo Mar 5, 2024
03e365d
Misc: cleanup comments
hhugo Mar 7, 2024
3e11567
Compiler: cleanup some code
hhugo Mar 7, 2024
96ebeba
Compiler: use assignment instead of var declaration for back edges
hhugo Mar 8, 2024
30ce262
Compiler: use consise body in arrow when es6 is enabled
hhugo Mar 8, 2024
13ba8ab
Compiler: improve Offset_ref when n < 0
hhugo Mar 8, 2024
be5957a
Compiler: doc/comment
hhugo Mar 8, 2024
aa023ab
Changes
hhugo Mar 8, 2024
f3f2bfa
Compiler: more js simplification
hhugo Mar 6, 2024
4cd5c6c
Compiler: experiment with more es6 features
hhugo Mar 7, 2024
359dea2
Compiler: specialize string equality with js_srting
hhugo Mar 8, 2024
a28514e
Compiler: specialize int_add int_sub
hhugo Mar 8, 2024
f048312
Compiler: recognize and optimize String.concat
hhugo Apr 4, 2020
d2cf189
Doc: Fix option name for global dead code elimination (#1587)
antoinepouille Mar 15, 2024
cbd50de
Compiler: Fix renaming for object partterns and assignment targets (#…
hhugo Mar 19, 2024
4db2d9d
Compiler: More aggressive inlining
vouillon Jan 16, 2023
c248337
Runtime: abort instead of exit on unimplemented js primitives
hhugo Mar 26, 2024
28743ee
Runtime: use caml_fatal_error instead of abort
hhugo Mar 26, 2024
8dd7d54
Runtime: missing primitives for OCaml 5.2
hhugo Mar 29, 2024
1627b71
Bump version
hhugo Apr 3, 2024
5e299b8
Compiler: better abstraction for Flow
hhugo Apr 8, 2024
f8e93b8
Compiler: fix toplevel compilation with separate compilation mode
hhugo Apr 9, 2024
14a9954
Misc: refactor version handling (#1598)
hhugo Apr 11, 2024
7ca0c83
Toplevel: add test_lib_jsoo library as an example of loading precompi…
hhugo Apr 9, 2024
675dcca
Compiler: Make it possible to link runtime JavaScript file together w…
vouillon Sep 11, 2023
bb97e26
Changes
hhugo Apr 9, 2024
a2640f3
Runtime: re-support marshaling floats
hhugo Apr 8, 2024
5a27041
Doc
hhugo Apr 8, 2024
659945d
Changes
hhugo Apr 8, 2024
68c15f5
Tests: add repro for 1599
hhugo Apr 15, 2024
508c51a
Compiler: fix stack compatibility check (instroduced in #1523)
hhugo Apr 15, 2024
4f4b291
Tests: accept diff
hhugo Apr 15, 2024
b734348
Runtime: New api for channels (#1602)
hhugo Apr 18, 2024
f86814f
Compiler: track block mutability (#1603)
hhugo Apr 18, 2024
1c43da9
Bump version
hhugo Apr 20, 2024
81809da
README: Ocaml -> OCaml (#1605)
edwinans Apr 22, 2024
89417c9
Misc: fix typo in month name (#1606)
KevinBoyette Apr 25, 2024
20364ae
Update GitHub Actions workflow
smorimoto Apr 27, 2024
bfbeb69
Use Dependabot to update GitHub Actions
smorimoto Apr 27, 2024
1331b93
Lib: Add Typed_array.Bytes module (#1609)
johnridesabike May 3, 2024
7231138
CI: partial revert of recent changes
hhugo May 3, 2024
bd7b065
Misc: dune fmt
hhugo May 3, 2024
ba64258
CI: opam-lint, continue on error
hhugo May 3, 2024
c5bb1e4
Compiler: remove deprecated cmdline runtime-only flag
hhugo Apr 20, 2024
68a6dc0
Toplevel: remove some explicit runtime files for toplevels
hhugo Apr 20, 2024
3fcdfb2
Compiler: small refactoring
hhugo Apr 27, 2024
eb1d001
Compiler: refactoring
hhugo Apr 29, 2024
80b9f47
Compiler: refactoring
hhugo Apr 29, 2024
3d09f2b
Compiler: refactoring
hhugo Apr 29, 2024
1242b31
Compiler: new include-partial-runtime flag
hhugo May 3, 2024
a2275df
refactoring
hhugo May 3, 2024
f4d64b6
Bump 5.8.1
hhugo May 5, 2024
88b0554
Fix: Compiler: Fix renaming for object partterns and assignment targe…
hhugo May 23, 2024
519dc5c
Bump version
hhugo May 26, 2024
cf0b7ad
TMP: fix CI
hhugo Jun 9, 2024
ccd0dd4
Misc: no longer need to control lf on windows with ocaml 5.2
hhugo Dec 4, 2023
837f291
Misc: promote to 5.2
hhugo Apr 11, 2024
51c544b
Misc: github action uses OCaml.5.2
hhugo May 13, 2024
87d3f6b
Misc: bump ocamlformat
hhugo May 13, 2024
e80d121
Misc: disable some test on older ocaml
hhugo May 13, 2024
51baa98
Misc: disable some test on older ocaml
hhugo May 13, 2024
c80c782
Misc: bump opam contraint
hhugo May 16, 2024
2b5571c
Revert "TMP: fix CI"
hhugo Jun 10, 2024
9faf228
Compiler: speedup compiler on large bytecode (#1614)
hhugo Jun 19, 2024
e1132d2
Runtime: os_type: Cygwin -> Win32
hhugo Jun 17, 2024
1229490
Compiler: fix compilation with trunk (#1627)
hhugo Jun 21, 2024
92791fc
Misc: switch to opam 2.2 (#1616)
hhugo Jun 24, 2024
999bf16
Fix the CI (#1629)
hhugo Jun 24, 2024
9375a62
Runtime: fix #1630
hhugo Jun 27, 2024
390e6a2
Compiler: fix toplevel
hhugo Jun 28, 2024
4a65d4b
Toplevel: fix missing cmi in separate compilation mode
hhugo Jun 28, 2024
920d9bb
Changes
hhugo Jun 28, 2024
ab83bc0
Misc: typo
hhugo Jul 1, 2024
d67ac1b
Bump ocaml/setup-ocaml from 3.0.0.pre.beta to 3.0.0.pre.beta1 (#1635)
dependabot[bot] Jul 1, 2024
a03f32c
Update ocaml/setup-ocaml to v3 (#1636)
smorimoto Jul 2, 2024
ad1514f
Runtime: record backtraces should be explicit
hhugo Jul 9, 2024
467366e
Changes
hhugo Jul 22, 2024
51cce06
Misc: yojson is no longer optional
hhugo Jul 22, 2024
0f5949c
Test: demonstrace gh#1641
hhugo Jul 24, 2024
53f4db0
Compiler: fix link of packed modules
hhugo Jul 24, 2024
ccdb2ac
Change
hhugo Jul 24, 2024
4bf1952
Misc: more linting
hhugo Jul 26, 2024
c1d5dfd
Compiler: mark TextEncoder as reserved
hhugo Jul 26, 2024
f8fca75
Compiler: compact indirect call
hhugo Jul 26, 2024
21c3c07
Changes
hhugo Jul 26, 2024
7221b9c
Update CHANGES.md
hhugo Jul 26, 2024
3a082a7
Tests: Test marshalling compression only when enabled (#1651)
OlivierNicole Jul 30, 2024
3204c33
Lib: Dom_html.html_entities: move error handling to the ML side (#1653)
OlivierNicole Jul 30, 2024
c484610
Compiler: Build_info/Unit_info: conversion to and from string maps (#…
OlivierNicole Aug 2, 2024
285902b
Compiler: Effects: keep track of CPS calls (#1648)
OlivierNicole Aug 3, 2024
5cbf0b1
Compiler: speedup json parsing, relying on Yojson.Raw (#1640)
hhugo Aug 3, 2024
f014914
Tests: Make the tests for uncaught exceptions more portable (#1652)
OlivierNicole Aug 3, 2024
3881e6a
Bump tarides/changelog-check-action from 2 to 3 (#1661)
dependabot[bot] Aug 7, 2024
9c8913a
Compiler: explicit initialization of builtin prims (#1662)
OlivierNicole Aug 24, 2024
b35f5c0
Generate: export source_location
vouillon Jun 11, 2024
cd05d66
Code: additional fold functions
vouillon Jun 11, 2024
afbe5ae
Stdlib additions
vouillon Jun 11, 2024
41020be
Fs: additional functions
vouillon Jun 11, 2024
2f98d17
Expose some functions from Freevars
vouillon Jun 19, 2024
c58a528
Runtime: implement Json output for Wasm (#1660)
OlivierNicole Aug 26, 2024
9602504
Compiler: Document non-trivial function Code.constant_equal, and fix …
OlivierNicole Aug 27, 2024
39a6f9b
Compiler: Remove unnecessary export (#1663)
OlivierNicole Aug 27, 2024
ea2eeb3
Update README.md
hhugo Aug 28, 2024
814035b
remove outdated optional deps from README
hhugo Aug 28, 2024
e51d534
Ocaml_compiler: fix float array constants
vouillon Jun 11, 2024
1971177
Examples: fix missing float conversions
vouillon Jun 7, 2024
732cb95
Distinguish the different kind of integers
vouillon Jun 11, 2024
c5594b1
Distinguish float arrays
vouillon Jun 11, 2024
613cbcc
Distinguish float field accesses in the Code IR
OlivierNicole Aug 28, 2024
c957bfb
Compiler: Decode sourcemap mappings only when necessary (#1664)
OlivierNicole Sep 4, 2024
7172abc
Runtime: fix parsing of unsigned int64 (#1666)
hhugo Sep 4, 2024
33d2736
Changes
hhugo Sep 5, 2024
b2f3bae
Runtime: fix incorrect pos_in after unmarshall
hhugo Sep 10, 2024
886855c
Compiler: Take into account block mutability in flow analysis (#1670)
vouillon Sep 13, 2024
818dcd6
Lib: Update typing of typed arrays to support Wasm, and test Typed_ar…
OlivierNicole Sep 13, 2024
c76f8cc
Runtime: use `Array.isArray()` instead of `instanceof Array` (#1671)
smorimoto Sep 13, 2024
f70eabd
Add Config.target
vouillon Sep 17, 2024
f432a86
JavaScript linker: make it easier to add flags
vouillon Sep 17, 2024
ea51f5e
JavaScript linker: add 'wasm' flag
vouillon Sep 17, 2024
5a78e24
runtime: run code checks with biome in ci
smorimoto Sep 18, 2024
c25feb8
Update .git-blame-ignore-revs
smorimoto Sep 18, 2024
693fa62
Misc: update .git-blame-ignore-revs for biome
hhugo Sep 19, 2024
4efc86c
Runtime: allow dynlink of precompiled js with separate compilation (#…
hhugo Sep 19, 2024
49ab55a
Runtime: small refactoring in parsing.js (#1677)
hhugo Sep 19, 2024
7b9750c
Misc: improve toplevel_expect_test selection
hhugo Sep 23, 2024
e3429e5
Runtime: add support for OCaml 5.3
hhugo Sep 23, 2024
dbcf6a2
Misc: OCaml 5.3 support
hhugo Sep 23, 2024
d6a7aba
Compiler: Fix global flow analysis (#1680)
vouillon Sep 23, 2024
2122ab7
Init
smorimoto Sep 19, 2024
4023cde
runtime: fix noExtraBooleanCast
smorimoto Sep 19, 2024
f553d4c
runtime: fix useLiteralKeys
smorimoto Sep 19, 2024
9e211d3
runtime: fix noGlobalIsFinite
smorimoto Sep 19, 2024
168557b
runtime: fix noGlobalIsNan
smorimoto Sep 19, 2024
ba2f964
runtime: fix noRedundantUseStrict
smorimoto Sep 19, 2024
fd80886
runtime: fix noUselessEscapeInRegex
smorimoto Sep 19, 2024
59d865a
runtime: fix useNumberNamespace
smorimoto Sep 19, 2024
472b15e
runtime: fix useWhile
smorimoto Sep 19, 2024
6f2a751
Bug fix
vouillon Sep 23, 2024
cdc9329
Fix debug output
vouillon Sep 23, 2024
0a53455
Omit unused function arguments
vouillon Sep 23, 2024
e832b69
Omit some useless return statements
vouillon Sep 23, 2024
eb5ba0e
Use 0 rather than undefined as a dummy value
vouillon Sep 23, 2024
20c9f74
Make the domain private
vouillon Sep 23, 2024
7ea5f5b
Simply use a list to store where a variable is used
vouillon Sep 23, 2024
d707ad9
Improved data-flow solver
vouillon Sep 24, 2024
a3b0826
Store dependencies more efficiently
vouillon Sep 24, 2024
c3284e3
Compute a more precise liveness information to account for nested mod…
vouillon Sep 23, 2024
656e7d7
Take into account the code liveness
vouillon Sep 23, 2024
c683b91
Remove code which is no longer used
vouillon Sep 23, 2024
39ee469
Changelog
vouillon Sep 24, 2024
dae1e55
runtime: fix useNodejsImportProtocol
smorimoto Sep 25, 2024
29ed7cc
Misc: update biome rules
hhugo Sep 26, 2024
21392ad
Runtime: remove deadcode, duplicated cases
hhugo Sep 26, 2024
060424c
Misc: lint comment
hhugo Sep 26, 2024
177e2a0
Runtime: remove useless switch case
hhugo Sep 26, 2024
2a9d19c
Runtime: fix unlink logic on file not found (#1690)
hhugo Sep 26, 2024
30d4cd4
Compiler: nativeInt is always 32bit
hhugo Sep 26, 2024
6226949
Target-specific code (#1655)
OlivierNicole Sep 27, 2024
bd764f9
Runtime: default case come last
hhugo Sep 26, 2024
3e3bf3e
Merge remote-tracking branch 'jsoo/master' into jsoo-merge
OlivierNicole Oct 2, 2024
a6eefa0
Add Int31.of_int32_truncate
OlivierNicole Oct 2, 2024
00c87cb
Add some Source_map functions
OlivierNicole Oct 2, 2024
b886536
Remove special Undefined
OlivierNicole Oct 2, 2024
d3faed0
CI fixes
OlivierNicole Oct 2, 2024
af6384d
Fix compilation of the Wasm runtime under Windows.
vouillon Oct 3, 2024
a54ca81
Fix parsing test
vouillon Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
6 changes: 5 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# ocamlformat bump
3c98cd3e0c4e1191983b602a8e38a1c92d259891
3c98cd3e0c4e1191983b602a8e38a1c92d259891
# Upgrade to OCamlformat 0.26.0
7de742a776fcdad4b098695617b9e7afab822c82
# Biome
5a78e2466221c91fc3607be5b6549797551de4d1
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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- dependencies
- no changelog
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
183 changes: 183 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
name: build

on:
pull_request:
push:
branches:
- master
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- "4.08"
- "4.09"
- "4.10"
- "4.11"
- "4.12"
- "4.13"
- "5.0"
- "5.1"
skip-test:
- true
skip-doc:
- true
skip-effects:
- true
include:
- os: ubuntu-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: macos-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: windows-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: ubuntu-latest
ocaml-compiler: "5.2"
skip-effects: false
skip-test: false
skip-doc: false
- os: macos-latest
ocaml-compiler: "5.2"
skip-effects: true
skip-test: false
skip-doc: true
- os: windows-latest
ocaml-compiler: "5.2"
skip-effects: false
skip-test: false
skip-doc: true

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

steps:
- name: Set git to use LF
if: 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

- name: Set-up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
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: 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 packages
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
if: ${{ !matrix.skip-test }}

- run: opam exec -- make tests
if: ${{ !matrix.skip-test }}

- run: opam exec -- dune build @all @runtest --profile using-effects
if: ${{ !matrix.skip-effects }}

- run: opam exec -- git diff --exit-code
if: ${{ !matrix.skip-test }}

- name: build doc
if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master'}}
run: |
opam install odoc lwt_log cohttp-lwt-unix yojson ocp-indent graphics higlo
opam exec -- make doc

- name: synchronize doc
if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: wikidoc
folder: doc-dev
clean: true
target-folder: doc/dev/

lint-opam:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
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:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
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
vouillon marked this conversation as resolved.
Show resolved Hide resolved

lint-runtime:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Set-up Biome
uses: biomejs/setup-biome@v2
- name: Run biome
run: biome ci
20 changes: 20 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check changelog

on:
pull_request:
branches:
- master
types:
- labeled
- opened
- reopened
- synchronize
- unlabeled

jobs:
check-changelog:
name: Check changelog
runs-on: ubuntu-latest
steps:
- name: Check changelog
uses: tarides/changelog-check-action@v3
Empty file added .gitmodules
Empty file.
Loading