From 276e1afd1f9e36a845c305e88509d447c7b2e4be Mon Sep 17 00:00:00 2001 From: Tom Repetti Date: Sat, 1 May 2021 16:17:15 -0400 Subject: [PATCH] Drop OCaml 4.04 for ppxlib. Migrate from Travis to GitHub Actions. --- .github/workflows/workflow.yml | 45 ++++++++++++++++++++++++++++++++++ README.md | 2 ++ dune-workspace.dev | 14 +++++------ ppx_deriving_cmdliner.opam | 2 +- 4 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..18182a1 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,45 @@ +name: Main workflow + +on: + - pull_request + - push + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + ocaml-version: + - 4.12.0 + - 4.11.2 + - 4.10.2 + - 4.09.1 + - 4.08.1 + - 4.07.1 + - 4.06.1 + - 4.05.0 + + runs-on: ${{ matrix.os }} + + 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 }} + + - run: opam pin add ppx_deriving_cmdliner.dev . --no-action + + - run: opam depext ppx_deriving_cmdliner --yes --with-test + + - run: opam install . --deps-only --with-test + + - run: opam exec -- dune build + + - run: opam exec -- dune runtest diff --git a/README.md b/README.md index d66c3ba..50a0177 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ It is also a [ppx_deriving](https://github.com/whitequark/ppx_deriving) plugin that generates a [Cmdliner](https://github.com/dbuenzli/cmdliner) `Term` for a given type. +![example workflow](https://github.com/hammerlab/ppx_deriving_cmdliner/actions/workflows/workflow.yml/badge.svg) + ## Example diff --git a/dune-workspace.dev b/dune-workspace.dev index 635c06f..653bd95 100644 --- a/dune-workspace.dev +++ b/dune-workspace.dev @@ -1,10 +1,10 @@ (lang dune 1.0) ;; This file is used by `make all-supported-ocaml-versions` -(context (opam (switch 4.04.0))) +(context (opam (switch 4.12.0))) +(context (opam (switch 4.11.2))) +(context (opam (switch 4.10.2))) +(context (opam (switch 4.09.1))) +(context (opam (switch 4.08.1))) +(context (opam (switch 4.07.1))) +(context (opam (switch 4.06.1))) (context (opam (switch 4.05.0))) -(context (opam (switch 4.06.0))) -(context (opam (switch 4.07.0))) -(context (opam (switch 4.08.0))) -(context (opam (switch 4.09.0))) -(context (opam (switch 4.10.0))) -(context (opam (switch 4.11.0))) diff --git a/ppx_deriving_cmdliner.opam b/ppx_deriving_cmdliner.opam index 4613cf8..7d229e8 100644 --- a/ppx_deriving_cmdliner.opam +++ b/ppx_deriving_cmdliner.opam @@ -22,7 +22,7 @@ run-test: [ ["dune" "runtest" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "4.03"} + "ocaml" {>= "4.05"} "cmdliner" {>= "1.0.0"} "result" "ppx_deriving" {>= "5.0"}