Skip to content

Commit

Permalink
release: v2.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAnno committed Apr 29, 2023
2 parents 56f8f1a + a24293d commit 5453742
Show file tree
Hide file tree
Showing 51 changed files with 698 additions and 188 deletions.
29 changes: 0 additions & 29 deletions .bumpversion.cfg

This file was deleted.

25 changes: 11 additions & 14 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.compile: &compile
submodule-update_script: git submodule update --init --recursive
configure_script: meson -Db_lundef=false build
compile_script: ninja -C build

Expand All @@ -15,50 +14,48 @@

Debian (gcc)_task:
container:
image: snaipe/ci-meson:debian-10
image: debian:11
setup_script: |-
apt-get update
apt-get install -y pkg-config cmake libgit2-dev libffi-dev libnanomsg-dev
apt-get install -y build-essential pkg-config meson ninja-build cmake git libgit2-dev libffi-dev libnanomsg-dev python3-pip
pip3 install cram==0.7
<<: *pipeline

Alpine (gcc,x86_64)_task:
container:
image: snaipe/ci-meson:alpine
image: amd64/alpine:3
setup_script: &alpine-deps |-
apk add --no-cache cmake libgit2-dev libffi-dev
apk add --no-cache build-base pkgconf meson ninja cmake git libgit2-dev libffi-dev py3-pip
pip3 install cram==0.7
<<: *pipeline

Alpine (gcc,i386)_task:
container:
image: snaipe/ci-meson:alpine-x86
image: i386/alpine:3
setup_script: *alpine-deps
<<: *pipeline

Alpine (gcc,arm32v6)_task:
arm_container:
image: arm32v6/alpine:3
setup_script: &alpine-arm-deps |-
apk add --no-cache build-base pkgconf meson ninja cmake git libffi-dev libgit2-dev py3-pip
pip3 install cram==0.7
setup_script: *alpine-deps
<<: *pipeline

Alpine (gcc,arm32v7)_task:
arm_container:
image: arm32v7/alpine:3
setup_script: *alpine-arm-deps
setup_script: *alpine-deps
<<: *pipeline

Alpine (gcc,aarch64)_task:
arm_container:
image: arm64v8/alpine:3
setup_script: *alpine-arm-deps
setup_script: *alpine-deps
<<: *pipeline

MacOS_task:
macos_instance:
image: monterey-xcode-13.1
image: ghcr.io/cirruslabs/macos-ventura-base:latest
env:
PKG_CONFIG_PATH: ${PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig
setup_script: |-
Expand All @@ -68,7 +65,7 @@ MacOS_task:

FreeBSD_task:
freebsd_instance:
image_family: freebsd-13-0
image_family: freebsd-13-1
setup_script: |-
pkg install -y gettext-tools pkgconf cmake meson git libffi libgit2 nanomsg
python3 -m ensurepip
Expand All @@ -83,7 +80,7 @@ Windows (mingw-gcc)_task:
env:
PATH: C:\\Python;C:\\Python\\Scripts;C:\\ProgramData\\chocolatey\\lib\\ninja\\tools;%PATH%
setup_script: |-
choco install -y --no-progress python3 --params "/InstallDir:C:\Python"
choco install -y --no-progress python311 --params "/InstallDir:C:\Python"
choco install -y --no-progress ninja cmake
pip install meson cram==0.7
git config --global core.autocrlf false
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:
env:
RELEASE_BRANCH: master
RELEASE_CANDIDATE_TAG_PATTERN: ^v[0-9]+.[0-9]+.[0-9]+-rc
RELEASE_SIGNING_KEY_ID: 75B0 21D9 64AD 8693 24CD B74D DDD7 BCCD 44BB 9A9D
RELEASE_SIGNING_KEY_ID_SNAIPE: 75B0 21D9 64AD 8693 24CD B74D DDD7 BCCD 44BB 9A9D
RELEASE_SIGNING_KEY_ID_MRANNO: C43B F77A EC43 F382 F604 295E 1E7D F493 9E41 9342
GITHUB_TOKEN: ${{ github.token }}

jobs:
Expand All @@ -27,7 +28,8 @@ jobs:
fetch-depth: 0
- name: Release tag verification
run: |
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys "${RELEASE_SIGNING_KEY_ID}"
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys "${RELEASE_SIGNING_KEY_ID_SNAIPE}"
gpg --keyserver hkps://keys.openpgp.org --recv-keys "${RELEASE_SIGNING_KEY_ID_MRANNO}"
if ! git tag --verify "$GITHUB_REF_NAME" > git-verify-tag.log 2>&1; then
gh issue create --title "$GITHUB_REF_NAME tag verification failure" --body-file git-verify-tag.log
exit 1
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
*.sw[op]
.*.sw[op]
build
subprojects/debugbreak
subprojects/klib
subprojects/boxfort
subprojects/libffi
subprojects/libgit2
subprojects/nanomsg
subprojects/nanopb
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

69 changes: 40 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ up the initial development process, it's best to test it locally at first.
The following commands should get you going with a workable test system:

```
$ mkdir -p build && cd $_
$ cmake -DDEV_BUILD=1 -DCTESTS=1 ..
$ cmake --build . --target criterion_tests
$ ctest
$ meson setup --buildtype debug build
$ meson compile -C build
$ meson test -C build
```

Make sure you have cram 0.7 installed before running ctest; Criterion uses cram
Expand All @@ -74,37 +73,49 @@ $ sudo pip install cram==0.7
* Each correction on existing translations must be followed by a
rationale ("why would the translation be better if the change is applied?")

## Roadmap
## Project Directory Structure

.
|- .cmake/: CMake modules
|- dependencies/: dependencies for building libcriterion
|- doc/: Sphinx documentation files
|- dev/: Developer files
|- include/criterion/: Public API
|- src/: Sources for libcriterion
| |- compat/: Cross-platform abstractions for platform-dependent code
| |- core/: Core mechanisms used to run the tests
| |- entry/: Entry-point related sources, and default main function
| |- io/: IO related functions, redirections
| |- log/: Output providers, all the output logic in general
| `- string/: String manipulation functions, i18n
|- po/: Translation files, i18n stuff
|- test/: Unit tests for libcriterion
`- samples/: Sample files
|- outputs/: Expected output files for the current samples
`- tests/: Internal regression tests
`- outputs/: Expected output files for the regression tests
|-- ci, .github, .cirrus.yml: CI and release pipeline
|-- dependencies, subprojects: Dependencies for building libcriterion
|-- dev: Developer files
|-- doc: Sphinx documentation files
|-- include/criterion: Public API
|-- src: Sources for libcriterion
| |-- capi
| |-- compat: Cross-platform abstractions for platform-dependent code
| |-- core: Core mechanisms used to run the tests
| |-- csptr: Smart pointers
| |-- entry: Entry-point related sources, and default main function
| |-- io: IO related functions, redirections
| |-- log: Output providers, all the output logic in general
| |-- protocol: Criterion Protocol Buffers
| `-- string: String manipulation functions, i18n
|-- po: Translation files, i18n stuff
|-- samples: Sample Criterion tests
`-- test: Unit and functional tests

## Release Checklist

### Preparing release candidate

* [ ] Make sure `bleeding` builds on all platforms and all tests passes.
* [ ] `git checkout master`
* [ ] `git merge bleeding --no-commit --no-ff`
* [ ] Bump version
* [ ] Update cram tests
* [ ] Update changelog
* [ ] `git commit -m "vX.Y.Z: merging bleeding back to master"`
* [ ] Bump project version (`meson.build`)
* [ ] Bump ABI version when needed (`meson.build`)
* [ ] Update ChangeLog
* [ ] `git commit -m "release: vX.Y.Z"`
* [ ] `git tag -s vX.Y.Z-rc`
* [ ] `git push origin vX.Y.Z-rc master`

After publishing the RC tag, each new push on master will produce a new release candidate.
The `bleeding` branch is fast-forwarded automatically during the RC period.

### Finalizing release

After a 1-2 week RC period, the final version can be released:

* [ ] `git checkout master`
* [ ] `git tag -s vX.Y.Z`
* [ ] `git branch -f bleeding`
* [ ] `git push origin master bleeding vX.Y.Z`
* [ ] `git push origin vX.Y.Z`
22 changes: 22 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
2023-04-29 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com>

* criterion: version 2.4.2
* Fix: fixed crash in assert failure reporting when there was no diff.
If the user-provided function to stringify an object was bugged and
produced equal output for non-equal objects, thus producing an empty
diff, Criterion crashed trying to access an unset parameter list.
* Fix: fixed crashing tests when Criterion was compiled with nanopb>=0.4.7
(Balazs Scheidler).
* Fix: fixed deadlock when test timeout was specified and the system was
overloaded.
* Fix: fixed segfault if map_shdr fails (David Gloe).
* Fix: fixed memory leak on test failure (Jookia).
* Fix: fixed gt() and ge().
* Fix: escape XML/JSON reports.
* Misc: converted klib and debugbreak submodules to subprojects
(Cristian Prieto).
* Misc: various documentation fixes (Yuri Victorovich, Jonas Schulze).
* Misc: various updates to dependencies.

The full git changelog may be accessed with `git log v2.4.1..v2.4.2`.

2022-04-13 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com>

* criterion: version 2.4.1
Expand Down
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,22 @@ the user would have with other frameworks:

### Packages

* Ubuntu (>=21.04) / Debian (>=11): `apt-get install libcriterion-dev`, on older versions:
| Platform | Command |
| --- | --- |
**Ubuntu** (>=21.04) / **Debian** (>=11) | `apt-get install libcriterion-dev`
**Gentoo** | `emerge -a dev-libs/criterion`
**Arch Linux** ([AUR][aur]) | `pacaur -S criterion`
**macOS** | `brew install criterion`
**Nix** | `nix-env -iA nixpkgs.criterion`
**FreeBSD** | `pkg install criterion`

```bash
$ sudo add-apt-repository ppa:snaipewastaken/ppa
$ sudo apt-get update
$ sudo apt-get install criterion-dev
```
* Arch Linux ([AUR](https://aur.archlinux.org/packages/criterion/)): `pacaur -S criterion`
* macOS: `brew install criterion`
If you'd like to see Criterion included in your favorite distribution, please reach out to their package maintainers team.

### Binary archives

Binary releases are available [on the release page](https://github.com/Snaipe/Criterion/releases)
Binary releases for Linux x86\_64 are available [on the release page](https://github.com/Snaipe/Criterion/releases).

If you have a different platform, you can still [build the library from source](http://criterion.readthedocs.org/en/latest/setup.html#installation)
If you have a different platform, you can still [build the library from source](http://criterion.readthedocs.org/en/latest/setup.html#installation).

## Developer Resources

Expand All @@ -78,9 +79,8 @@ Sample tests can be found in the [sample directory][samples].

| Channel | Description |
| --- | --- |
[![Ask a question in GitHub discussions](https://img.shields.io/badge/github-Ask%20a%20question-46BC99.svg)][gh-discussions] | Ask a question in GitHub discussions
[![Subscribe to the mailing list](https://img.shields.io/badge/ml-criterion@freelists.org-46BC99.svg)][mailing-list] | Criterion mailing list on freelists.org
[![Join the chat at https://gitter.im/Snaipe/Criterion](https://badges.gitter.im/Join%20Chat.svg)][gitter-chan] | `Snaipe/Criterion` on gitter.im
[![Join #criterion on freenode](https://img.shields.io/badge/irc-%23criterion-46BC99.svg)][irc-chan] | `#criterion` on irc.freenode.net

### Misc

Expand Down Expand Up @@ -118,6 +118,7 @@ Logo made by [Paul Bouigue](http://www.cargocollective.com/pbouigue).
[autotools]: ./dev/autotools
[find-module]: ./dev/FindCriterion.cmake

[irc-chan]: http://webchat.freenode.net/?channels=%23criterion&uio=MTY9dHJ1ZSYyPXRydWUmOT10cnVlJjExPTE5NQ4e
[gitter-chan]: https://gitter.im/Snaipe/Criterion?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[aur]: https://aur.archlinux.org/packages/criterion/

[mailing-list]: http://www.freelists.org/list/criterion
[gh-discussions]: https://github.com/Snaipe/Criterion/discussions/new?category=q-a
1 change: 0 additions & 1 deletion dependencies/debugbreak
Submodule debugbreak deleted from 83bf7e
1 change: 0 additions & 1 deletion dependencies/klib
Submodule klib deleted from cdb7e9
14 changes: 10 additions & 4 deletions doc/env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ Command line arguments
linked against.
* ``-l or --list``: Print all the tests in a list.
* ``-f or --fail-fast``: Exit after the first test failure.
* ``--color=<auto|always|never>``: Colorize the output.
* ``--encoding=<ENCODING>``: Use the specified encoding for the output (default: locale-deduced)
* ``--ascii``: Don't use fancy unicode symbols or colors in the output.
* ``-jN or --jobs N``: Use ``N`` parallel jobs to run the tests. ``0`` picks
a number of jobs ideal for your hardware configuration.
* ``--filter [PATTERN]``: Run tests whose string identifier matches
the given shell wildcard pattern (see dedicated section below). (\*nix only)
* ``--timeout [TIMEOUT]``: Set a timeout (in seconds) for all tests
* ``--debug[=debugger]``: Run tests with a debugging server attached.
``debugger`` can be 'gdb', 'lldb', or 'windbg' (windows only).
* ``--debug-transport [TRANSPORT]``: Make the debugging server use the
Expand All @@ -37,15 +40,18 @@ Command line arguments
equivalent to ``--output=tap:FILE``.
* ``--verbose[=level]``: Makes the output verbose. When provided with an integer,
sets the verbosity level to that integer.
* ``--crash``: Crash failing assertions rather than aborting (for debugging purposes)
* ``--full-stats``: Forces tests to fully report statistics. By default,
tests do not report details for passing assertions, so this option forces
them to do so.
Activating this causes massive slowdowns for large number of assertions, but
provides more accurate reports.
* ``-OPROVIDER:FILE or --output=PROVIDER:FILE``: Write a test report to FILE
using the output provider named by PROVIDER.
If FILE is ``"-"``, it implies ``--quiet``, and the report shall be written
to ``stderr``.
* ``--ignore-warnings``: Ignore warnings, do not exit with a non-zero exit status.
* ``-OPROVIDER:PATH or --output=PROVIDER=PATH``: Write test report to PATH using the specified provider.
If PATH is an existing directory, the report will be created in that directory
and will be named after the binary.
If PATH is ``"-"``, it implies ``--quiet``, and the report shall be written
to ``stdout``.

Shell Wildcard Pattern
----------------------
Expand Down
9 changes: 4 additions & 5 deletions doc/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ Clone this repository:

.. code-block:: bash
$ git clone --recursive https://github.com/Snaipe/Criterion
$ git clone https://github.com/Snaipe/Criterion.git
Then, run the following commands to build Criterion:

.. code-block:: bash
$ meson build
$ ninja -C build
$ meson setup build
$ meson compile -C build
Installing the library and language files (Linux, macOS, FreeBSD)
----------------------------------------------------------------
Expand All @@ -47,7 +46,7 @@ Run with an elevated shell:

.. code-block:: bash
$ ninja -C build install
$ meson install -C build
On Linux systems, update the dynamic linker runtime bindings:

Expand Down

0 comments on commit 5453742

Please sign in to comment.