Skip to content

cleanup: update README and Makefile for 1.0 #66

cleanup: update README and Makefile for 1.0

cleanup: update README and Makefile for 1.0 #66

Workflow file for this run

on:
pull_request:
workflow_dispatch:
name: OCaml CI
jobs:
test:
name: OCaml
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [ "5.1" ]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: ./.github/actions/libextism
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Setup OCaml env
uses: ocaml/setup-ocaml@v2
with:
dune-cache: true
ocaml-compiler: ${{ matrix.compiler }}
- run: opam exec -- ocamlc -version > .ocaml-version
- name: Cache OCaml
id: cache-ocaml
uses: actions/cache@v3
with:
path: _opam
key: ${{ runner.os }}-opam-${{ hashFiles('*.opam') }}-${{ hashFiles('dune-project') }}-${{ hashFiles('.ocaml-version') }}
- name: Build OCaml Host SDK
if: steps.cache-ocaml.outputs.cache-hit != 'true'
run: |
opam upgrade -y
opam install -y --deps-only --with-test --with-doc .
LD_LIBRARY_PATH=/usr/local/lib opam exec -- dune build
- name: Test OCaml Host SDK
run: |
opam upgrade -y
LD_LIBRARY_PATH=/usr/local/lib opam exec -- dune exec ./bin/main.exe wasm/code.wasm count_vowels -- --input "qwertyuiop"
LD_LIBRARY_PATH=/usr/local/lib opam exec -- dune runtest