From 79e6914b6f298d240d8c1db537435aaafdb287c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Thu, 12 Sep 2024 11:52:02 +0200 Subject: [PATCH] Update GitHub Actions Only test latest OCaml 4 and OCaml 5, the other versions are too old and unsupported. --- .github/workflows/test.yml | 74 ++++++++++---------------------------- 1 file changed, 18 insertions(+), 56 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70a9f52..b77c6a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,77 +1,39 @@ -name: build +name: Builds, tests & co on: - push - pull_request -jobs: - builds: - name: Earliest Supported Version - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - ocaml-version: - - 4.04.0 - - runs-on: ${{ matrix.os }} +permissions: read-all - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Use OCaml ${{ matrix.ocaml-version }} - uses: avsm/setup-ocaml@v1 - with: - ocaml-version: ${{ matrix.ocaml-version }} - - - name: Deps - run: | - opam pin add -n angstrom . - opam install --deps-only angstrom - - - name: Build - run: opam exec -- dune build -p angstrom - - tests: - name: Tests +jobs: + build: strategy: fail-fast: false matrix: os: - ubuntu-latest - ocaml-version: - - 4.08.1 - - 4.10.2 - - 4.11.2 - - 4.12.0 + - macos-latest + - windows-latest + ocaml-compiler: + - 4 + - 5 runs-on: ${{ matrix.os }} steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout tree + uses: actions/checkout@v4 - - name: Use OCaml ${{ matrix.ocaml-version }} - uses: avsm/setup-ocaml@v1 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 with: - ocaml-version: ${{ matrix.ocaml-version }} + ocaml-compiler: ${{ matrix.ocaml-compiler }} - - name: Deps - run: | - opam pin add -n angstrom . - opam pin add -n angstrom-async . - opam pin add -n angstrom-lwt-unix . - opam install -t --deps-only . + - run: opam install . --deps-only --with-test - - name: Build - run: opam exec -- dune build + - run: opam exec -- dune build - - name: Test - run: opam exec -- dune runtest + - run: opam exec -- dune runtest - - name: Examples - run: | - opam install -t angstrom-async angstrom-lwt-unix - opam exec -- make examples + - run: opam exec -- make examples