Lib: add missing pointerEvent bindings to Dom_html #2102
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: wasm_of_ocaml | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| # Prime the caches every Monday | |
| - cron: 0 1 * * MON | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| env: | |
| WASM_OF_OCAML: true | |
| OXCAML_OPAM_REPO_REF: d89747aa6e7b9f44d6cc844dca5b5e7c8a90716f | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # 4.14 and 5.5 are tested on all three OSes; build-only compiler | |
| # coverage lives in the build workflow. 5.5 exercises the toplevel | |
| # cmi embedding on Windows: on OCaml >= 5.4 the expect tests fail | |
| # if the virtual filesystem paths are wrong. | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| ocaml-compiler: | |
| - "4.14" | |
| - "5.5" | |
| ocaml-name: | |
| - "" | |
| wasi: | |
| - false | |
| include: | |
| # Display names for the OSes | |
| - os: ubuntu-latest | |
| os-name: Ubuntu | |
| - os: macos-latest | |
| os-name: MacOS | |
| - os: windows-latest | |
| os-name: Windows | |
| # Extra configurations, Ubuntu-only | |
| - os: ubuntu-latest | |
| os-name: Ubuntu | |
| ocaml-name: "5.6+trunk" | |
| ocaml-compiler: "ocaml-variants.5.6.0+trunk" | |
| wasi: false | |
| - os: ubuntu-latest | |
| os-name: Ubuntu | |
| ocaml-name: "OxCaml" | |
| ocaml-compiler: "ocaml-variants.5.2.0+ox" | |
| wasi: false | |
| - os: ubuntu-latest | |
| os-name: Ubuntu | |
| ocaml-name: "" | |
| ocaml-compiler: "5.5" | |
| wasi: true | |
| runs-on: ${{ matrix.os }} | |
| name: | |
| ${{ matrix.wasi && 'WASI / ' || '' }}${{ matrix.ocaml-name != '' && matrix.ocaml-name || matrix.ocaml-compiler }} / ${{ matrix.os-name }} | |
| steps: | |
| - name: Update apt cache | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: sudo apt-get update | |
| - name: Checkout tree | |
| uses: actions/checkout@v7 | |
| with: | |
| path: wasm_of_ocaml | |
| - name: Set-up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.os == 'windows-latest' && 'latest' || 'v26.0.0-v8-canary20260216631fb6e5ef' }} | |
| - name: Set-up Wasmtime | |
| if: matrix.wasi | |
| uses: bytecodealliance/actions/wasmtime/setup@v1 | |
| with: | |
| version: "dev" | |
| - name: Set-up Wizard engine | |
| if: matrix.wasi | |
| uses: ./wasm_of_ocaml/.github/actions/setup-wizard | |
| - name: Set-up OCaml ${{ matrix.ocaml-compiler }} | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
| if: ${{ ! endsWith(matrix.ocaml-compiler, '+ox') }} | |
| - name: Set-up OxCaml ${{ matrix.ocaml-compiler }} | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
| opam-repositories: | | |
| default: https://github.com/ocaml/opam-repository.git | |
| ox: https://github.com/oxcaml/opam-repository.git#${{ env.OXCAML_OPAM_REPO_REF }} | |
| if: ${{ endsWith(matrix.ocaml-compiler, '+ox') }} | |
| - name: Pin ppxlib | |
| if: matrix.ocaml-name == '5.6+trunk' | |
| run: opam pin add -n ppxlib https://github.com/hhugo/ppxlib.git#support-5.6 | |
| - name: Set-up Binaryen | |
| uses: Aandreba/setup-binaryen@v1.0.0 | |
| with: | |
| token: ${{ github.token }} | |
| # Work-around a race between reinstalling mingw-w64-shims | |
| # (because of conf-pkg-config optional dep) and installing other | |
| # packages that implicitly depend on mingw-w64-shims. | |
| - run: opam install conf-pkg-config conf-mingw-w64-gcc-i686 conf-mingw-w64-g++-x86_64 | |
| if: runner.os == 'Windows' | |
| - name: Pin wasm_of_ocaml | |
| working-directory: ./wasm_of_ocaml | |
| run: opam pin . -n --with-version 6.0.1+ox | |
| # The with-native-effects profile relies on the wasm rules of | |
| # dune >= 3.23 (keyed on `js_of_ocaml --build-config`) to build the | |
| # runtime in the right effects mode; with an older dune the runtime | |
| # is built with the default mode and linking fails. oxcaml-dune-patches | |
| # pins dune <= 3.22.2+ox, so re-pin it with the dune version constraint | |
| # stripped — opam re-checks dependency constraints on every install, | |
| # so a one-shot --ignore-constraints-on flag isn't enough. | |
| - name: Drop dune version constraint from oxcaml-dune-patches (OxCaml) | |
| if: ${{ endsWith(matrix.ocaml-compiler, '+ox') }} | |
| run: | | |
| DIR=$(mktemp -d) | |
| opam show --raw oxcaml-dune-patches \ | |
| | perl -0777 -pe 's/"dune"\s+\{build & \([^)]+\)\}/"dune" {build}/' \ | |
| > "$DIR/oxcaml-dune-patches.opam" | |
| opam pin add oxcaml-dune-patches "$DIR" -k path -n -y | |
| - name: Install wasm_of_ocaml and its test dependencies | |
| working-directory: ./wasm_of_ocaml | |
| run: | | |
| opam install . -t | |
| - name: Run tests | |
| if: ${{ ! matrix.wasi }} | |
| working-directory: ./wasm_of_ocaml | |
| run: opam exec -- dune build @runtest-wasm | |
| # we continue-on-error on windows because we seem to often hit | |
| # an internal assert inside libuv. | |
| # See https://github.com/libuv/libuv/issues/3622 | |
| - name: Run tests with CPS effects | |
| if: ${{ (startsWith(matrix.ocaml-compiler, '5.') || startsWith(matrix.ocaml-compiler, 'ocaml-variants.5.')) && ! matrix.wasi }} | |
| continue-on-error: ${{ matrix.os == 'windows-latest' }} | |
| working-directory: ./wasm_of_ocaml | |
| run: opam exec -- dune build @runtest-wasm --profile with-effects | |
| - name: Run tests with native effects | |
| if: ${{ (startsWith(matrix.ocaml-compiler, '5.') || startsWith(matrix.ocaml-compiler, 'ocaml-variants.5.')) && matrix.os != 'windows-latest' }} | |
| working-directory: ./wasm_of_ocaml | |
| run: opam exec -- dune build @runtest-wasm --profile with-native-effects | |
| - name: Run tests (WASI runtime - node) | |
| if: ${{ matrix.wasi }} | |
| working-directory: ./wasm_of_ocaml | |
| run: opam exec -- dune build @runtest-wasm --profile wasi-with-native-effects | |
| - name: Run tests (WASI runtime - Wizard engine) | |
| if: ${{ matrix.wasi }} | |
| working-directory: ./wasm_of_ocaml | |
| env: | |
| WASM_ENGINE: wizard-fast | |
| run: opam exec -- dune build @runtest-wasm --profile wasi-with-native-effects | |
| - name: Run tests (WASI runtime - Wizard engine - SPC) | |
| if: ${{ matrix.wasi }} | |
| working-directory: ./wasm_of_ocaml | |
| env: | |
| WASM_ENGINE: wizard-spc | |
| run: opam exec -- dune build @runtest-wasm --profile wasi-with-native-effects | |
| - name: Run tests (WASI runtime - wasmtime) | |
| if: ${{ matrix.wasi }} | |
| working-directory: ./wasm_of_ocaml | |
| env: | |
| WASM_ENGINE: wasmtime | |
| run: opam exec -- dune build @runtest-wasm --profile wasi |