Skip to content

Multicont build, install, and tests #185

Multicont build, install, and tests

Multicont build, install, and tests #185

Workflow file for this run

name: Multicont build, install, and running examples
on:
pull_request:
branches: master
push:
branches: [master]
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
jobs:
examples:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
ocaml-compiler:
- 5.1.0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-depext: false
- name: Install dune
run: |
opam install dune
opam install dune-configurator
shell: bash
- name: Install library
run: |
opam exec -- dune build
opam exec -- dune install
shell: bash
- name: Build examples
run: |
cd examples
opam exec -- dune build
shell: bash
- name: Run native examples
run: |
cd examples
test `opam exec -- dune exec ./nqueens.exe` -eq 92
test `opam exec -- dune exec ./generic_count.exe` -eq 128
diff <(opam exec -- dune exec ./async.exe) <(echo -e "starting a\nyielding a\nstarting b\nyielding b\nending a with 40\nending b with 2\nSum is 42")
diff <(opam exec -- dune exec ./supervised.exe) <(echo -e "Parent joining with Child 1\nChild 1 failed!\nChild 2 failed!\nChild 1 failed!\nChild 2 failed!\nChild 2 failed!\nChild 1 succeeded!\nChild 1 joining with Child 2\nChild 2 succeeded!\nChild 2 succeeded!\nChild 2 succeeded!\nChild 1 joined with Child 2\nParent joined with Child 1")
diff <(opam exec -- dune exec ./choice.exe) <(echo "(3, 4, 5)")
shell: bash
- name: Run byte code examples
run: |
cd examples
test `opam exec -- dune exec ./nqueens.bc.exe` -eq 92
test `opam exec -- dune exec ./generic_count.bc.exe` -eq 128
diff <(opam exec -- dune exec ./async.bc.exe) <(echo -e "starting a\nyielding a\nstarting b\nyielding b\nending a with 40\nending b with 2\nSum is 42")
diff <(opam exec -- dune exec ./supervised.bc.exe) <(echo -e "Parent joining with Child 1\nChild 1 failed!\nChild 2 failed!\nChild 1 failed!\nChild 2 failed!\nChild 2 failed!\nChild 1 succeeded!\nChild 1 joining with Child 2\nChild 2 succeeded!\nChild 2 succeeded!\nChild 2 succeeded!\nChild 1 joined with Child 2\nParent joined with Child 1")
diff <(opam exec -- dune exec ./choice.bc.exe) <(echo "(3, 4, 5)")
shell: bash