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

Prepare release #21

Merged
merged 10 commits into from
Sep 16, 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
43 changes: 37 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,27 @@ jobs:
- ubuntu-latest
- windows-latest
ocaml-compiler:
- 5.2.x
- 4.14.x
- 4.08.x
- 4.13.x
include:
# OCaml 4.12.x: skipping windows (fail)
- ocaml-compiler: 4.12.x
os: ubuntu-latest
- ocaml-compiler: 4.12.x
os: macos-latest
# OCaml 4.11.x: skipping macos & windows (fail)
- ocaml-compiler: 4.11.x
os: ubuntu-latest
# OCaml 4.10.x: skipping windows (fail)
- ocaml-compiler: 4.10.x
os: ubuntu-latest
- ocaml-compiler: 4.10.x
os: macos-latest
# OCaml 4.08.x: skipping macos & windows (fail)
# Keep the minimal version of OCaml in sync in here and `dune-project`
- ocaml-compiler: 4.08.x
os: ubuntu-latest

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

Expand All @@ -27,15 +46,27 @@ jobs:
git config --global core.ignorecase false

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

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- run: opam install . --deps-only --with-test
- name: Install dependencies
run: opam install . --deps-only --with-doc --with-test --with-dev-setup

- run: opam exec -- dune build
- name: Build
run: opam exec -- dune build

- run: opam exec -- dune runtest
- name: Run tests
run: opam exec -- dune runtest

- name: Check for uncommitted changes
run: git diff --exit-code

- name: Lint fmt
uses: ocaml/setup-ocaml/lint-fmt@v3

- name: Lint doc
uses: ocaml/setup-ocaml/lint-doc@v3
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.26.0
version=0.26.2
break-separators=before
dock-collection-brackets=false
break-sequences=true
Expand Down
12 changes: 10 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Unreleased
----------
2.0.0
-----

- Prepare release (#21, @mbarbin)
- Upgrade to `ocamlformat.0.26.2`.
- Fmt the code
- Add CI badge to README
- Upgrade GitHub workflow actions dependencies (checkout@v4, setup-ocaml@v3)
- Add more validation steps in CI
- Add `ocamlformat` as dev-setup dependency

- Add `Pp.verbatimf`. (#18, @mbarbin)

Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ reinstall: uninstall install
clean:
dune clean

all-supported-ocaml-versions:
dune runtest --workspace dune-workspace.dev

release:
dune-release tag
dune-release distrib --skip-build --skip-lint --skip-tests -n pp
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Pp - Pretty printing
====================

[![CI Status](https://github.com/ocaml-dune/pp/workflows/CI/badge.svg)](https://github.com/ocaml-dune/pp/actions/workflows/ci.yml)

This library provides a lean alternative to the [Format][format]
module of the OCaml standard library. It aims to make it easy for
users to do the right thing. If you have tried `Format` before but
Expand Down
8 changes: 6 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
(package
(name pp)
(depends
(ocaml (>= 4.08.0))
(ppx_expect :with-test))
(ocaml (>= 4.08))
(ppx_expect :with-test)
(ocamlformat
(and
:with-dev-setup
(= 0.26.2))))
(synopsis "Pretty-printing library")
(description "
This library provides a lean alternative to the Format [1] module of
Expand Down
4 changes: 0 additions & 4 deletions dune-workspace.dev

This file was deleted.

3 changes: 2 additions & 1 deletion pp.opam
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ doc: "https://ocaml-dune.github.io/pp/"
bug-reports: "https://github.com/ocaml-dune/pp/issues"
depends: [
"dune" {>= "2.8"}
"ocaml" {>= "4.08.0"}
"ocaml" {>= "4.08"}
"ppx_expect" {with-test}
"ocamlformat" {with-dev-setup & = "0.26.2"}
"odoc" {with-doc}
]
build: [
Expand Down
3 changes: 2 additions & 1 deletion test/tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -328,5 +328,6 @@ let%expect_test "paragraph" =
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum euismod,
nisl eget aliquam ultricies. |}]

let%expect_test "paragraphf" = print (Pp.paragraphf "Hello World%s" "!");
let%expect_test "paragraphf" =
print (Pp.paragraphf "Hello World%s" "!");
[%expect {| Hello World! |}]