Classify boolean C-call results #4412
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Opam Pipeline | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| 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 | |
| - ubuntu-22.04-arm | |
| # - windows-latest # for some reason windows build is not picking dune 3.5 | |
| ocaml-compiler: | |
| - ocaml-base-compiler.5.5.0 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: "recursive" | |
| path: melange | |
| - name: Use Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - 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@v3 | |
| with: | |
| ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
| cache-prefix: v3-${{ hashFiles('melange/.github/workflows/opam-build.yml') }} | |
| - name: Restore OPAM cache | |
| id: opam-cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: | | |
| ~/.opam | |
| ~/work/melange/melange/_opam | |
| key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('melange/.github/workflows/opam-build.yml') }}-${{ hashFiles('melange/*.opam', 'melange/dune-project', 'melange/Makefile') }} | |
| restore-keys: | | |
| opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('melange/.github/workflows/opam-build.yml') }}- | |
| - name: Install dependencies | |
| working-directory: melange | |
| run: | | |
| rm -rf ~/.opam/repo/default ~/.opam/repo/default.tar.gz | |
| opam update | |
| dune_commit=eac1b1290fd59d2f68734e3c5166ef8116432188 | |
| rm -rf /tmp/dune-pin | |
| git init -q /tmp/dune-pin | |
| git -C /tmp/dune-pin remote add origin https://github.com/ocaml/dune.git | |
| git -C /tmp/dune-pin fetch --depth 1 --filter=blob:none origin "$dune_commit" | |
| git -C /tmp/dune-pin checkout --detach --quiet FETCH_HEAD | |
| cp /tmp/dune-pin/opam/dune.opam /tmp/dune-pin/dune.opam | |
| cp /tmp/dune-pin/opam/dune-build-info.opam /tmp/dune-pin/dune-build-info.opam | |
| opam pin add dune.3.24.1 /tmp/dune-pin -y --no-action | |
| opam pin add dune-build-info.3.24.1 /tmp/dune-pin -y --no-action | |
| make opam-install-test | |
| - name: Clone melange-opam-template | |
| run: | | |
| git clone --depth 1 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 git+https://github.com/reasonml/reason-react.git#c97615d62311f32c2dbb1e5d159c06e147ca7545 -y | |
| opam pin add reason-react.dev git+https://github.com/reasonml/reason-react.git#c97615d62311f32c2dbb1e5d159c06e147ca7545 -y | |
| 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.mjs | |
| - name: Save OPAM cache | |
| uses: actions/cache/save@v6 | |
| if: steps.opam-cache.outputs.cache-hit != 'true' | |
| with: | |
| path: | | |
| ~/.opam | |
| ~/work/melange/melange/_opam | |
| key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('melange/.github/workflows/opam-build.yml') }}-${{ hashFiles('melange/*.opam', 'melange/dune-project', 'melange/Makefile') }} |