Skip to content

Commit 30726df

Browse files
authored
Merge pull request #350 from johnhaley81/switch-to-melange
Switch to Melange build system with hybrid npm/opam workflow
2 parents 5bb30c6 + 428a80f commit 30726df

File tree

175 files changed

+1797
-4323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+1797
-4323
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,53 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
48

59
jobs:
610
build:
7-
runs-on: ubuntu-latest
8-
11+
name: Build and test the project
912
strategy:
1013
matrix:
11-
node-version: [16.x]
14+
system:
15+
- ubuntu-22.04
16+
node-version:
17+
- 18.x
18+
ocaml-compiler:
19+
- 5.3.x
20+
21+
runs-on: ${{ matrix.system }}
1222

1323
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v1
16-
17-
- name: Setup Node.js
18-
uses: actions/setup-node@v1
19-
with:
20-
node-version: ${{ matrix.node-version }}
21-
22-
# TODO: not sure if this actually does anything useful
23-
- name: Cache ~/.npm
24-
uses: actions/cache@v1
25-
with:
26-
path: ~/.npm
27-
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
28-
restore-keys: |
29-
${{ runner.os }}-npm-
30-
31-
- name: Install esy
32-
run: npm install -g esy
33-
34-
- name: npm install
35-
run: npm install
36-
37-
- name: Initial esy build
38-
run: esy
39-
40-
- name: npm run cleancoverage
41-
run: npm run cleancoverage
42-
43-
- name: Coveralls
44-
run: npx bisect-ppx-report send-to Coveralls
45-
env:
46-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
PULL_REQUEST_NUMBER: ${{ github.event.number }}
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{matrix.node-version}}
31+
32+
- name: Install system dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y bubblewrap g++-multilib gcc-multilib mercurial musl-tools rsync
36+
37+
- name: Use OCaml ${{ matrix.ocaml-compiler }}
38+
uses: ocaml/setup-ocaml@v2
39+
with:
40+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
41+
opam-disable-sandboxing: true
42+
opam-depext: false
43+
env:
44+
OPAM_DEPEXT_PACKAGES: ""
45+
46+
- name: make install
47+
run: make install
48+
49+
- name: make build
50+
run: make build
51+
52+
- name: Run tests
53+
run: make test-coverage

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dune.mel
1414
_build
1515
_esy
1616
*.bs.js
17+
_opam/
1718

1819
# Git
1920
*.orig
@@ -30,3 +31,5 @@ _coverage
3031
/docs/api
3132
/docs/odoc.css
3233
/docs/highlight.pack.js
34+
35+

.vscode/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"ocaml.sandbox": {
3-
"kind": "custom",
4-
"template": "esy $prog $args --fallback-read-dot-merlin"
3+
"kind": "opam",
4+
"switch": "${workspaceFolder:relude}"
55
}
6-
}
6+
}

0 commit comments

Comments
 (0)