Skip to content

Commit

Permalink
CI improvements (#147)
Browse files Browse the repository at this point in the history
* Fix expect tests on windows
* more ci jobs
* standard ci
* simplify

---------

Co-authored-by: Hugo Heuzard <[email protected]>
  • Loading branch information
hhugo and Hugo Heuzard authored Jun 27, 2023
1 parent 98e915c commit d73baa7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 30 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
ocaml-compiler:
- 4.14.x
skip-test:
- false
- 5.0.x
include:
- os: ubuntu-latest
ocaml-compiler: 4.8.x
skip-test: true
- os: windows-latest
ocaml-compiler: 4.14.x
- os: windows-latest
ocaml-compiler: ocaml.5.0.0,ocaml-option-mingw

runs-on: ${{ matrix.os }}

Expand All @@ -38,27 +39,37 @@ jobs:
uses: actions/checkout@v3

- name: Use OCaml ${{ matrix.ocaml-compiler }}
if: runner.os == 'Windows'
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
dra27: https://github.com/dra27/opam-repository.git#windows-5.0
default: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
opam: https://github.com/ocaml/opam-repository.git
dune-cache: ${{ matrix.os == 'ubuntu-latest' }}
opam-depext: ${{ !matrix.skip-test }}
opam-depext: ${{ true }}
opam-depext-flags: --with-test

- run: opam install . --best-effort
if: ${{ matrix.skip-test }}
- name: Use OCaml ${{ matrix.ocaml-compiler }}
if: runner.os != 'Windows'
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: ${{ matrix.os == 'ubuntu-latest' }}
opam-depext: ${{ true }}
opam-depext-flags: --with-test

- run: opam pin add dune https://github.com/nojb/dune.git#async_io_self_pipe_win32-3.8.2
if: runner.os == 'Windows'

- run: opam install . --with-test
if: ${{ !matrix.skip-test }}

- run: opam exec -- make build
if: ${{ !matrix.skip-test }}

- run: opam exec -- make test
if: ${{ !matrix.skip-test }}

- run: opam exec -- git diff --exit-code
if: ${{ !matrix.skip-test }}

lint-fmt:
runs-on: ubuntu-latest
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml

This file was deleted.

1 change: 1 addition & 0 deletions test/basic.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
let () = set_binary_mode_out stdout true
let digit = [%sedlex.regexp? '0' .. '9']
let number = [%sedlex.regexp? Plus digit]

Expand Down

0 comments on commit d73baa7

Please sign in to comment.