Skip to content

build: replace call to Node.js with OCaml generator for js_record_iter #1487

build: replace call to Node.js with OCaml generator for js_record_iter

build: replace call to Node.js with OCaml generator for js_record_iter #1487

Workflow file for this run

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@v3
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 install -y reason-react
npm install
- name: Build basic template
working-directory: melange-opam-template
run: |
opam exec -- dune build @react @node --display=short
npm run bundle
- name: Run resulting .js files
working-directory: melange-opam-template
run: |
node ./_build/default/src/node/src/Hello.js