|
| 1 | +name: Windows mingw64 common workflow |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + compiler: |
| 7 | + description: 'Branch or tag of ocaml/ocaml to use as compiler' |
| 8 | + type: string |
| 9 | + default: '5.0.0-beta1' |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + runs-on: windows-latest |
| 14 | + |
| 15 | + env: |
| 16 | + COMPILER: ${{ inputs.compiler }} |
| 17 | + QCHECK_MSG_INTERVAL: '60' |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout code |
| 21 | + uses: actions/checkout@v2 |
| 22 | + |
| 23 | + - name: Install opam etc. with a temporary compiler |
| 24 | + uses: ocaml/setup-ocaml@v2 |
| 25 | + with: |
| 26 | + ocaml-compiler: 4.14 |
| 27 | + opam-repositories: | |
| 28 | + default: https://github.com/fdopen/opam-repository-mingw.git#opam2 |
| 29 | + override: https://github.com/shym/custom-opam-repository.git#windows |
| 30 | + upstream: https://github.com/ocaml/opam-repository.git |
| 31 | + alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git |
| 32 | + opam-pin: false |
| 33 | + opam-depext: false |
| 34 | + |
| 35 | + - name: Build and install the OCaml ${{ inputs.compiler }} compiler in a `ci` switch |
| 36 | + run: | |
| 37 | + opam switch create ci --empty --no-switch --repositories=default,override,upstream,alpha |
| 38 | + git clone https://github.com/ocaml/ocaml -b $Env:COMPILER --depth=1 --recurse-submodules |
| 39 | + cd ocaml |
| 40 | + curl https://github.com/shym/ocaml/commit/cca99d36bc5326dbe48fd9aaa10357b7de869bbc.patch | git -c user.name=CI -c user.email="[email protected]" am |
| 41 | + opam install --switch=ci . |
| 42 | + git log |
| 43 | + cd .. |
| 44 | + rmdir -Recurse -Force ocaml |
| 45 | +
|
| 46 | + - name: Show environment |
| 47 | + run: | |
| 48 | + opam exec --switch=ci -- ocamlopt --version |
| 49 | + opam config list --switch=ci |
| 50 | +
|
| 51 | + - name: Install Multicore Tests dependencies |
| 52 | + run: | |
| 53 | + opam pin --switch=ci add "https://github.com/shym/ocamlfind.git#fix-win" |
| 54 | + opam install --switch=ci . --deps-only --with-test |
| 55 | +
|
| 56 | + - name: Build the test suite |
| 57 | + run: opam exec --switch=ci -- dune build |
| 58 | + |
| 59 | + - name: Run the test suite |
| 60 | + run: opam exec --switch=ci -- dune runtest -j1 --no-buffer --display=quiet --cache=disabled --error-reporting=twice |
0 commit comments