GHA: run tests on Windows #123
Workflow file for this run
This file contains 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: Builds, tests & co | |
on: | |
- push | |
- pull_request | |
permissions: read-all | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
ocaml-compiler: | |
- 5 | |
include: | |
- os: ubuntu-latest | |
ocaml-compiler: 4.11 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout tree | |
uses: actions/checkout@v4 | |
- name: Set-up OCaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
- name: Install opam dependencies | |
run: | | |
# Work around https://github.com/ocaml/setup-ocaml/issues/899 | |
opam install conf-pkg-config | |
opam install . --deps-only --with-test --with-dev-setup | |
- env: | |
PKG_CONFIG_PATH: /usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig | |
run: opam exec -- dune build | |
- run: opam exec -- dune runtest | |
if: ${{ runner.os != 'Windows' }} | |
- run: | | |
opam exec -- dune build examples/test_memory_leaks.exe | |
opam exec -- cygcheck _build/default/examples/test_memory_leaks.exe | |
opam exec -- printenv PATH | |
opam exec -- ls /cygdrive/D/cygwin/usr/x86_64-w64-mingw32/sys-root/mingw/bin/ | |
C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\gflags.exe -i _build/default/examples/test_memory_leaks.exe +sls | |
windbg _build/default/examples/test_memory_leaks.exe | |
if: ${{ runner.os == 'Windows' }} |