Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
Only test latest OCaml 4 and OCaml 5, the other versions are too old
and unsupported.
  • Loading branch information
MisterDA committed Sep 12, 2024
1 parent 51790c8 commit 1b18da9
Showing 1 changed file with 18 additions and 56 deletions.
74 changes: 18 additions & 56 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1b18da9

Please sign in to comment.