Improve README.md #102
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
env: | |
OCAML_COMPILER: 5.3 | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup SSH | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout Submodules | |
run: git submodule update --init vendor/ECMA-SL vendor/graphjs | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup OCaml ${{ env.OCAML_COMPILER }} | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: ${{ env.OCAML_COMPILER }} | |
- name: Install dependencies | |
run: | | |
opam install -y . ./vendor/ECMA-SL --deps-only | |
cd vendor/ECMA-SL && opam exec -- dune build @install -p ecma-sl | |
opam exec -- dune install -p ecma-sl | |
cd ../.. && opam exec -- dune build @install | |
- name: Build | |
run: opam exec -- dune build @install | |
- name: Test | |
run: opam exec -- dune runtest -j 1 |