Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable 4.14 #5

Merged
merged 3 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: ci

on:
- pull_request
- push
push:
branches:
- main
pull_request:
branches:
- "**" # This will match pull requests targeting any branch

jobs:
build:
Expand All @@ -27,8 +31,8 @@ jobs:
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
mbarbin: https://github.com/mbarbin/opam-repository.git
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages

- name: Install dependencies
run: opam install . --deps-only --with-doc --with-test --with-dev-setup
Expand All @@ -38,8 +42,8 @@ jobs:

- name: Run tests
run: |
mkdir $BISECT_DIR
opam exec -- dune runtest --instrument-with bisect_ppx
mkdir $BISECT_DIR
opam exec -- dune runtest --instrument-with bisect_ppx
env:
BISECT_DIR: ${{ runner.temp }}/_bisect_ppx_data
BISECT_FILE: ${{ runner.temp }}/_bisect_ppx_data/data
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/more-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This workflow file is named 'more-ci' and is used to run additional CI checks
# that complement the main CI workflow. It ensures that our code is tested
# across multiple operating systems and OCaml compiler versions.
#
# Compared to the main 'ci.yml' job, this skips some steps that are not
# necessary to check for every combination of os and ocaml-compiler, such as
# generating coverage report, linting odoc, opam and fmt, etc.
#
# We prefer to keep it separate from the main CI workflow because we find it
# more readable, over having too many conditional steps in the same job.

name: more-ci

on:
push:
branches:
- main
pull_request:
branches:
- "**" # This will match pull requests targeting any branch

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-compiler:
- 5.2.x
- 4.14.x
exclude:
# We exclude the combination already tested in the 'ci' workflow.
- os: ubuntu-latest
ocaml-compiler: 5.2.x
# We exclude windows-4.14 - this fails when building core.
- os: windows-latest
ocaml-compiler: 4.14.x

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

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
mbarbin: https://github.com/mbarbin/opam-repository.git
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages

# We build and run tests for a subset of packages. More tests are run in
# the development workflow and as part of the main CI job. These are the
# tests that are checked for every combination of os and ocaml-compiler.
- name: Install dependencies
run: opam install ./loc.opam ./loc-tests.opam --deps-only --with-test

- name: Build & Run tests
run: opam exec -- dune build @all @runtest -p loc,loc-tests
28 changes: 14 additions & 14 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
(synopsis "Representing ranges of lexing positions from parsed files")
(depends
(ocaml
(>= 5.2))
(>= 4.14))
(fpath
(>= 0.7.3))
(sexplib0
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(stdune
(>= 3.16))))
Expand All @@ -35,63 +35,63 @@
(synopsis "Tests for loc")
(depends
(ocaml
(>= 5.2))
(>= 4.14))
(ocamlformat
(and
:with-dev-setup
(= 0.26.2)))
(base
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(bisect_ppx
(and
:with-dev-setup
(>= 2.8.3)))
(expect_test_helpers_core
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(fpath
(>= 0.7.3))
(loc
(= :version))
(ppx_compare
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppx_enumerate
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppx_expect
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppx_hash
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppx_here
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppx_js_style
(and
:with-dev-setup
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppx_let
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppx_sexp_conv
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppx_sexp_value
(and
(>= v0.17)
(>= v0.16)
(< v0.18)))
(ppxlib
(>= 0.33))
Expand Down
24 changes: 12 additions & 12 deletions loc-tests.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ doc: "https://mbarbin.github.io/loc/"
bug-reports: "https://github.com/mbarbin/loc/issues"
depends: [
"dune" {>= "3.16"}
"ocaml" {>= "5.2"}
"ocaml" {>= "4.14"}
"ocamlformat" {with-dev-setup & = "0.26.2"}
"base" {>= "v0.17" & < "v0.18"}
"base" {>= "v0.16" & < "v0.18"}
"bisect_ppx" {with-dev-setup & >= "2.8.3"}
"expect_test_helpers_core" {>= "v0.17" & < "v0.18"}
"expect_test_helpers_core" {>= "v0.16" & < "v0.18"}
"fpath" {>= "0.7.3"}
"loc" {= version}
"ppx_compare" {>= "v0.17" & < "v0.18"}
"ppx_enumerate" {>= "v0.17" & < "v0.18"}
"ppx_expect" {>= "v0.17" & < "v0.18"}
"ppx_hash" {>= "v0.17" & < "v0.18"}
"ppx_here" {>= "v0.17" & < "v0.18"}
"ppx_js_style" {with-dev-setup & >= "v0.17" & < "v0.18"}
"ppx_let" {>= "v0.17" & < "v0.18"}
"ppx_sexp_conv" {>= "v0.17" & < "v0.18"}
"ppx_sexp_value" {>= "v0.17" & < "v0.18"}
"ppx_compare" {>= "v0.16" & < "v0.18"}
"ppx_enumerate" {>= "v0.16" & < "v0.18"}
"ppx_expect" {>= "v0.16" & < "v0.18"}
"ppx_hash" {>= "v0.16" & < "v0.18"}
"ppx_here" {>= "v0.16" & < "v0.18"}
"ppx_js_style" {with-dev-setup & >= "v0.16" & < "v0.18"}
"ppx_let" {>= "v0.16" & < "v0.18"}
"ppx_sexp_conv" {>= "v0.16" & < "v0.18"}
"ppx_sexp_value" {>= "v0.16" & < "v0.18"}
"ppxlib" {>= "0.33"}
"stdune" {>= "3.16"}
"odoc" {with-doc}
Expand Down
4 changes: 2 additions & 2 deletions loc.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ doc: "https://mbarbin.github.io/loc/"
bug-reports: "https://github.com/mbarbin/loc/issues"
depends: [
"dune" {>= "3.16"}
"ocaml" {>= "5.2"}
"ocaml" {>= "4.14"}
"fpath" {>= "0.7.3"}
"sexplib0" {>= "v0.17" & < "v0.18"}
"sexplib0" {>= "v0.16" & < "v0.18"}
"stdune" {>= "3.16"}
"odoc" {with-doc}
]
Expand Down