Skip to content

Box Tests

Box Tests #138

Workflow file for this run

name: Box Tests
on:
push:
branches:
- 'main'
tags:
- "[0-9]+.*"
- "v*"
# ... or trigger manually from GitHub web interface
workflow_dispatch:
# ... or prime the caches every Wednesday at 18:00 UTC
schedule:
- cron: 0 18 * * WED
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
ocaml-compiler:
# ---------------
# Why not 4.08.0?
# ---------------
#
# It fails on macos: https://github.com/diskuv/diskuvbox/runs/5891371632?check_suite_focus=true
#
#=== ERROR while compiling ppx_deriving.5.2.1 =================================#
# context 2.1.2 | macos/x86_64 | ocaml-base-compiler.4.08.0 | git+https://github.com/ocaml/opam-repository.git
# path ~/work/diskuvbox/diskuvbox/_opam/.opam-switch/build/ppx_deriving.5.2.1
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ppx_deriving -j 3
# exit-code 1
# env-file ~/.opam/log/ppx_deriving-6411-7f9caa.env
# output-file ~/.opam/log/ppx_deriving-6411-7f9caa.out
### output ###
# File "src_plugins/create/dune", line 11, characters 2-23:
# 11 | (pps ppxlib.metaquot))
# ^^^^^^^^^^^^^^^^^^^^^
# (cd _build/default && .ppx/0224ad3443a846e54f1637fccb074e7d/ppx.exe --cookie 'library-name="ppx_deriving_create"' -o src_plugins/create/ppx_deriving_create.pp.ml --impl src_plugins/create/ppx_deriving_create.ml -corrected-suffix .ppx-corrected -diff-cmd - -dump-ast)
# Command got signal KILL.
#
# ---------------
# Why not 4.09.0?
# ---------------
#
# It fails on macos: https://github.com/diskuv/diskuvbox/actions/runs/3332746014/jobs/5514449266
#
#=== ERROR while compiling base.v0.14.3 =======================================#
# context 2.1.3 | macos/x86_64 | ocaml-base-compiler.4.09.0 | git+https://github.com/ocaml/opam-repository.git
# path ~/work/diskuvbox/diskuvbox/_opam/.opam-switch/build/base.v0.14.3
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p base -j 3
# exit-code 1
# env-file ~/.opam/log/base-15853-2d07a0.env
# output-file ~/.opam/log/base-15853-2d07a0.out
### output ###
# File "compiler-stdlib/src/dune", line 3, characters 0-97:
# 3 | (rule (targets caml.ml)
# 4 | (action (run ../gen/gen.exe -ocaml-where %{ocaml_where} -o %{targets})))
# (cd _build/default/compiler-stdlib/src && ../gen/gen.exe -ocaml-where /Users/runner/work/diskuvbox/diskuvbox/_opam/lib/ocaml -o caml.ml)
# Command got signal KILL.
- '4.10.0'
- '4.13.x'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.ocaml-compiler }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: OCaml ${{ matrix.ocaml-compiler }} with Dune cache
uses: ocaml/setup-ocaml@v2
if: ${{ !startsWith(matrix.os, 'windows-') }}
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
- name: OCaml ${{ matrix.ocaml-compiler }} without Dune cache
uses: ocaml/setup-ocaml@v2
if: ${{ startsWith(matrix.os, 'windows-') }}
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: false
cache-prefix: v2
- name: Install Opam dependencies
run: opam install . --deps-only --with-test
- name: Build OCaml
run: opam exec -- dune build --display=short
- name: Test OCaml excluding timestamp tests
if: ${{ !startsWith(matrix.os, 'ubuntu-') }}
run: opam exec -- dune runtest --display=short
- name: Test OCaml including timestamp tests
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: opam exec -- env BOX_TIMESTAMP_TESTS=true dune runtest --display=short