fix dependency #292
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: Build | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| ocaml-compiler: | |
| - 5.2.x | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install system dependencies (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Use OCaml ${{ matrix.ocaml-compiler }} | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
| - name: Install dependencies (locked) | |
| run: opam install . --locked --deps-only --with-test | |
| - name: Build | |
| run: opam exec -- dune build --profile release | |
| - name: Run tests | |
| run: opam exec -- dune runtest --force --verbose | |
| # Build and deploy release build that uses js-of-ocaml instead of wasm-of-ocaml | |
| - name: Build js_of_ocaml version | |
| run: | | |
| cp bin/web/dune-for-js bin/web/dune | |
| opam exec -- dune build --profile release --build-dir _build-js | |
| cp -r _build-js/default/bin/web _build/default/bin/web/js | |
| - name: Deploy website | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: ${{ github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' }} | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: _build/default/bin/web |