Skip to content

Commit

Permalink
Merge pull request #92 from bernedom/building/update-to-catch-2.13.6
Browse files Browse the repository at this point in the history
Building/update to catch 2.13.6
  • Loading branch information
bernedom committed Apr 28, 2021
2 parents d4ead6a + e9a3c54 commit 87b6c83
Show file tree
Hide file tree
Showing 53 changed files with 92 additions and 114 deletions.
57 changes: 22 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ jobs:
include:
- name: ubuntu-gcc-7
os: ubuntu-18.04
compiler: g++-7
compiler: g++
compiler-version: 7
compiler-name-conan: gcc

- name: ubuntu-clang-6
os: ubuntu-18.04
compiler: clang++-6.0
compiler: clang++
compiler-version: "6.0"
compiler-name-conan: clang

- name: macos-appleclang-11
os: macos-latest
Expand All @@ -37,7 +41,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt install shunit2 ninja-build python3-setuptools python3-pip -y
if [ "${{ matrix.compiler }}" = "clang++-6.0" ]; then
if [ "${{ matrix.compiler }}" = "clang++" ]; then
sudo apt install clang-6.0 -y
fi
sudo pip3 install conan
Expand All @@ -52,10 +56,24 @@ jobs:
- name: set-compiler-env
run: |
if [ "${{ matrix.compiler }}" != "" ]; then
echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV
echo "CXX=${{ matrix.compiler }}-${{ matrix.compiler-version }}" >> $GITHUB_ENV
fi
shell: bash

- name: conan-profile
if: runner.os == 'Linux' || runner.os == 'macOs'
run: |
conan profile new default --detect
if [ "${{ matrix.compiler-name-conan }}" != "" ]; then
conan profile update settings.compiler=${{ matrix.compiler-name-conan }} default
fi
if [ "${{ matrix.compiler-version }}" != "" ]; then
conan profile update settings.compiler.version=${{ matrix.compiler-version }} default
fi
conan profile update settings.compiler.libcxx=libstdc++ default
cat ~/.conan/profiles/default
- name: make-build-dir
run: mkdir build
- name: cmake-configure-debug
Expand Down Expand Up @@ -96,34 +114,3 @@ jobs:
run: |
git fetch --tags --force
./test/version-consistency.sh
deploy-to-bintray:
needs: version-consistency-check
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: dependencies
run: |
sudo apt install shunit2 python3-setuptools python3-pip -y
sudo pip3 install conan
- name: set-environment
run: |
echo "CONAN_LOGIN_USERNAME=${{ secrets.CONAN_USERNAME }}" >> $GITHUB_ENV
echo "CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }}" >> $GITHUB_ENV
- name: deploy-unstable
if: github.event.action != 'published' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
run: |
conan remote add bernedom https://api.bintray.com/conan/bernedom/conan
conan create . SI/unstable
conan upload SI/*@SI/unstable --all -c -r bernedom
- name: deploy-stable
if: github.event.action == 'published'
run: |
conan remote add bernedom https://api.bintray.com/conan/bernedom/conan
conan create . SI/stable
conan upload SI/*@SI/stable --all -c -r bernedom
2 changes: 1 addition & 1 deletion .lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ extraction:
- export PATH=$PATH:~/.local/bin
- conan --version
- conan profile new default --detect
- conan remote update conan-center https://conan.bintray.com False
- conan remote update conan-center https://conan.io/center False
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.1.2

* Update to catch 2.13.6 in the conan recipes
* Remove deployment to bintray.com as it is scheduled to sunset on May 1 2021

## 2.1.1

* Tests are built without the need for conan if catch2 is found. (using conan is still the preferred way)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12)

project(
"SI"
VERSION 2.1.1
VERSION 2.1.2
DESCRIPTION
"A header only c++ library that provides type safety and user defined literals for handling pyhsical values defined in the International System of Units."
HOMEPAGE_URL "https://github.com/bernedom/SI"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Contributions and suggestions to this repo are highly welcome. For deeper techni

## Building the tests

The tests use [Catch2](https://github.com/catchorg/Catch2) version 2.11. Catch is retrieved as a conan package. **If conan is not found, the tests will not be built**.
The tests use [Catch2](https://github.com/catchorg/Catch2) version 2.16. Catch is retrieved as a conan package if possible, else any system install will be used. **If catch2 is not found, the tests will not be built**.

For ubuntu releases < 18.04 use:

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

[![GitHub Releases](https://img.shields.io/github/release/bernedom/SI.svg)](https://github.com/bernedom/SI/releases)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/bernedom/SI/master/LICENSE)
[![Download](https://api.bintray.com/packages/bernedom/conan/si%3ASI/images/download.svg)](https://bintray.com/bernedom/conan/si%3ASI/_latestVersion)

# SI - Type safety for physical units

Expand Down Expand Up @@ -129,7 +128,7 @@ substitute `--config Debug` with `--config Release` for optimized builds

### Installing

The default installation location for SI is `/usr/local/lib/SI`. SI can be installed using raw cmake, cpack (cmakes package mechanism), or as a conan.io package provided from [Bintray](https://bintray.com/bernedom/conan/si%3ASI)
The default installation location for SI is `/usr/local/lib/SI`. SI can be installed using raw cmake, cpack (cmakes package mechanism), or as a conan.io package provided from [conan center](https://conan.io/center/si/)

See [the installation guide](doc/installation-guide.md) for detailed instructions

Expand Down
13 changes: 7 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from conans import ConanFile, CMake
from conans.tools import load
import re, os
import re
import os


class SiConan(ConanFile):

name = "si"
license = "MIT"
url = "https://bintray.com/beta/#/bernedom/conan/si:si"
url = "https://conan.io/center/si/"
homepage = "https://github.com/bernedom/SI"
description = "A header only c++ library that provides type safety and user defined literals \
for handling pyhsical values defined in the International System of Units."
Expand All @@ -16,7 +17,7 @@ class SiConan(ConanFile):
exports_sources = "include/*", "CMakeLists.txt", "test/*", "doc/CMakeLists.txt", "doc/*.md", "cmake/SIConfig.cmake.in", "LICENSE"
no_copy_source = True
generators = "cmake", "txt", "cmake_find_package"
build_requires = "Catch2/2.11.1@catchorg/stable"
build_requires = "catch2/2.13.6"
_cmake = None

def _configure_cmake(self):
Expand All @@ -28,10 +29,10 @@ def _configure_cmake(self):

def set_version(self):
cmake = load(os.path.join(self.recipe_folder, "CMakeLists.txt"))

version = re.search(r"(?:[ \t]*)(?:VERSION\s+?)(\d+\.\d+\.\d+)", cmake).group(1)
self.version = version

version = re.search(
r"(?:[ \t]*)(?:VERSION\s+?)(\d+\.\d+\.\d+)", cmake).group(1)
self.version = version

def build(self):
cmake = self._configure_cmake()
Expand Down
16 changes: 1 addition & 15 deletions doc/installation-guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installing `SI`

The default installation location for SI is `/usr/local/lib/si`. SI can be installed using raw cmake, cpack (cmakes package mechanism), or as a conan.io package provided from [conan center](https://conan.io/center/si). Early access to conan packages for unstable versions is available from [Bintray](https://bintray.com/bernedom/conan/si%3ASI)
The default installation location for SI is `/usr/local/lib/si`. SI can be installed using raw cmake, cpack (cmakes package mechanism), or as a conan.io package provided from [conan center](https://conan.io/center/si).

## Installing using cmake

Expand Down Expand Up @@ -48,20 +48,6 @@ Use the following in your `conanfile.txt`
si/[>1.0 <2.0]@SI/stable
```

### Early access and nightly builds

For nightly builds and early access to versions use the custom repository https://api.bintray.com/conan/bernedom/conan

```bash
conan remote add bernedom https://api.bintray.com/conan/bernedom/conan
```
In the `conanfile.txt` SI is added like this, to ensure to get the latest version.

```
[requires]
si/[>1.0 <2.0]@SI/stable
```

`SI/stable` are release builds and are considered usable.
Use `SI/unstable` to get the latest development builds. See the [official conan documentation](https://docs.conan.io/en/latest/integrations/build_system/cmake/cmake_generator.html) on how to integrate the package into your cmake project.

Expand Down
2 changes: 1 addition & 1 deletion include/SI/absorbed_dose.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/acceleration.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/angle.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/area.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/astronomic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/catalytic_activity.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/detail/cross_unit_operations.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/detail/detail.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/detail/eps_equal.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/detail/number_parser.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/detail/operator_helpers.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/detail/unit.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/detail/unit_cast.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/detail/unit_symbol.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/electric_capacity.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/electric_charge.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/electric_conductance.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/electric_current.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/electric_potential.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/electric_resistance.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/energy.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/equivalent_dose.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/force.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/frequency.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/illuminance.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/inductance.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down
2 changes: 1 addition & 1 deletion include/SI/length.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of "SI" version 2.1.1
* This file is part of "SI" version 2.1.2
* A header only c++ library that provides type safety and user defined literals
* for handling pyhsical values defined in the International System of
* Units
Expand Down

3 comments on commit 87b6c83

@bernedom
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Catch2 Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.0.

Benchmark suite Current: 87b6c83 Previous: d4ead6a Ratio
Default construction 0.139222 ns (+/- 0.0105568) 0 ns (+/- 0) Infinity
Value initialized construction 0.301351 ns (+/- 0.0435125) 0 ns (+/- 0) Infinity
copy construction same ratio 0.239401 ns (+/- 0.046515) 0 ns (+/- 0) Infinity
copy construction different ratio 0.232719 ns (+/- 0.00428197) 0 ns (+/- 0) Infinity

This comment was automatically generated by workflow using github-action-benchmark.

CC: @bernedom

@bernedom
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Catch2 Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.0.

Benchmark suite Current: 87b6c83 Previous: d4ead6a Ratio
Default construction 0.292087 ns (+/- 0.00477932) 0 ns (+/- 0) Infinity
Value initialized construction 0.374443 ns (+/- 0.44935) 0 ns (+/- 0) Infinity
copy construction same ratio 0.35695 ns (+/- 0.55502) 0 ns (+/- 0) Infinity
copy construction different ratio 0.299605 ns (+/- 0.00210081) 0 ns (+/- 0) Infinity

This comment was automatically generated by workflow using github-action-benchmark.

CC: @bernedom

@bernedom
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Catch2 Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.0.

Benchmark suite Current: 87b6c83 Previous: d4ead6a Ratio
Default construction 0.156865 ns (+/- 0.0127285) 0 ns (+/- 0) Infinity
Value initialized construction 0.310793 ns (+/- 0.0711801) 0 ns (+/- 0) Infinity
copy construction same ratio 0.256603 ns (+/- 0.0594408) 0 ns (+/- 0) Infinity
copy construction different ratio 0.219646 ns (+/- 0.0482553) 0 ns (+/- 0) Infinity

This comment was automatically generated by workflow using github-action-benchmark.

CC: @bernedom

Please sign in to comment.