-
-
Notifications
You must be signed in to change notification settings - Fork 52
81 lines (67 loc) · 1.97 KB
/
opam-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Opam Pipeline
on:
pull_request:
push:
branches:
- main
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and test
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
# - windows-latest # for some reason windows build is not picking dune 3.5
ocaml-compiler:
- 5.1.x
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
path: melange
- name: Use Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Homebrew dependencies
if: ${{ matrix.os == 'macos-latest' }}
run: |
env HOMEBREW_NO_AUTO_UPDATE=1 brew install tree
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Install dependencies
working-directory: melange
run: |
opam update
make opam-install-test
- name: Clone melange-opam-template
run: |
git clone https://github.com/melange-re/melange-opam-template.git
cd melange-opam-template
- name: Install all deps
working-directory: melange-opam-template
run: |
opam pin add reason-react-ppx.dev --dev-repo
opam pin add reason-react.dev --dev-repo
npm install
- name: Build basic template
working-directory: melange-opam-template
run: |
opam exec -- dune build @react @node --profile=release --display=short
npm run bundle
- name: Run resulting .js files
working-directory: melange-opam-template
run: |
node ./_build/default/src/node/src/Hello.js