mirror of
https://github.com/boostorg/rational.git
synced 2026-01-19 04:42:09 +00:00
Update CI to 2024.12 spec, update README
This commit is contained in:
@@ -33,6 +33,12 @@ branches:
|
||||
- /fix\/.*/
|
||||
- /pr\/.*/
|
||||
|
||||
skip_commits:
|
||||
files:
|
||||
- LICENSE
|
||||
- meta/*
|
||||
- README.md
|
||||
|
||||
matrix:
|
||||
fast_finish: false
|
||||
# Adding MAYFAIL to any matrix job allows it to fail but the build stays green:
|
||||
|
||||
118
.github/workflows/ci.yml
vendored
118
.github/workflows/ci.yml
vendored
@@ -1,7 +1,7 @@
|
||||
# Copyright 2020-2021 Peter Dimov
|
||||
# Copyright 2021 Andrey Semashev
|
||||
# Copyright 2021 Alexander Grund
|
||||
# Copyright 2022 James E. King III
|
||||
# Copyright 2022-2024 James E. King III
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
@@ -18,6 +18,10 @@ on:
|
||||
- feature/**
|
||||
- fix/**
|
||||
- pr/**
|
||||
paths-ignore:
|
||||
- LICENSE
|
||||
- meta/**
|
||||
- README.md
|
||||
|
||||
concurrency:
|
||||
group: ${{format('{0}:{1}', github.repository, github.ref)}}
|
||||
@@ -29,8 +33,7 @@ env:
|
||||
B2_CI_VERSION: 1
|
||||
B2_VARIANT: debug,release
|
||||
B2_LINK: shared,static
|
||||
LCOV_BRANCH_COVERAGE: 1
|
||||
CODECOV_NAME: Github Actions
|
||||
LCOV_BRANCH_COVERAGE: 0
|
||||
|
||||
jobs:
|
||||
posix:
|
||||
@@ -42,54 +45,37 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Linux, gcc
|
||||
- { compiler: gcc-4.8, cxxstd: '11', os: ubuntu-latest, container: 'ubuntu:16.04' }
|
||||
- { compiler: gcc-4.9, cxxstd: '11', os: ubuntu-latest, container: 'ubuntu:16.04' }
|
||||
- { compiler: gcc-5, cxxstd: '11,14,1z', os: ubuntu-latest, container: 'ubuntu:18.04' }
|
||||
- { compiler: gcc-6, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:18.04' }
|
||||
- { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-20.04 }
|
||||
- { compiler: gcc-8, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
|
||||
- { compiler: gcc-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
|
||||
- { compiler: gcc-10, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
|
||||
- { compiler: gcc-11, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
|
||||
- { compiler: gcc-12, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
|
||||
- { compiler: gcc-13, cxxstd: '11,14,17,20,2b', os: ubuntu-24.04 }
|
||||
# linux, gcc
|
||||
- { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-20.04 }
|
||||
- { compiler: gcc-8, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
|
||||
- { compiler: gcc-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
|
||||
- { compiler: gcc-10, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
|
||||
- { compiler: gcc-11, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
|
||||
- { compiler: gcc-12, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
|
||||
- { compiler: gcc-13, cxxstd: '11,14,17,20,2b', os: ubuntu-22.04 }
|
||||
- { compiler: gcc-14, cxxstd: '11,14,17,20,2b', os: ubuntu-24.04 }
|
||||
- { name: GCC w/ sanitizers, sanitize: yes,
|
||||
compiler: gcc-13, cxxstd: '11,14,17,20', os: ubuntu-24.04 }
|
||||
compiler: gcc-13, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
|
||||
- { name: Collect coverage, coverage: yes,
|
||||
compiler: gcc-13, cxxstd: '11,14,17,20,2b', os: ubuntu-24.04, install: 'g++-13-multilib', address-model: '32,64' }
|
||||
compiler: gcc-12, cxxstd: '11', os: ubuntu-22.04, install: 'g++-12-multilib', address-model: '32,64' }
|
||||
|
||||
# Linux, clang
|
||||
- { compiler: clang-3.5, cxxstd: '11', os: ubuntu-latest, container: 'ubuntu:16.04' }
|
||||
- { compiler: clang-3.6, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:16.04' }
|
||||
- { compiler: clang-3.7, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:16.04' }
|
||||
- { compiler: clang-3.8, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:16.04' }
|
||||
- { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:18.04' }
|
||||
- { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:18.04' }
|
||||
- { compiler: clang-5.0, cxxstd: '11,14,1z', os: ubuntu-latest, container: 'ubuntu:18.04' }
|
||||
- { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-20.04 }
|
||||
- { compiler: clang-7, cxxstd: '11,14,17', os: ubuntu-20.04 }
|
||||
# Note: clang-8 does not fully support C++20, so it is not compatible with some libstdc++ versions in this mode
|
||||
- { compiler: clang-8, cxxstd: '11,14,17,2a', os: ubuntu-20.04 , install: 'clang-8 g++-7', gcc_toolchain: 7 }
|
||||
- { compiler: clang-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
|
||||
- { compiler: clang-10, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
|
||||
- { compiler: clang-11, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
|
||||
- { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
|
||||
# linux, clang
|
||||
- { compiler: clang-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
|
||||
- { compiler: clang-10, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
|
||||
- { compiler: clang-11, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
|
||||
- { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
|
||||
# Clang isn't compatible with libstdc++-13, so use the slightly older one
|
||||
- { compiler: clang-13, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-13 g++-12', gcc_toolchain: 12 }
|
||||
- { compiler: clang-14, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-14 g++-12', gcc_toolchain: 12 }
|
||||
- { compiler: clang-15, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-15 g++-12', gcc_toolchain: 12 }
|
||||
- { compiler: clang-13, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-13 g++-12', gcc_toolchain: 12 }
|
||||
- { compiler: clang-14, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-14 g++-12', gcc_toolchain: 12 }
|
||||
- { compiler: clang-15, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-15 g++-12', gcc_toolchain: 12 }
|
||||
- { compiler: clang-16, cxxstd: '11,14,17,20,2b', os: ubuntu-24.04 }
|
||||
# https://github.com/llvm/llvm-project/issues/59827: disabled 2b/23 for clang-17 with libstdc++13 in 24.04
|
||||
- { compiler: clang-17, cxxstd: '11,14,17,20', os: ubuntu-24.04 }
|
||||
- { compiler: clang-18, cxxstd: '11,14,17,20,23,2c', os: ubuntu-24.04 }
|
||||
- { compiler: clang-17, cxxstd: '11,14,17,20', os: ubuntu-24.04 }
|
||||
- { compiler: clang-18, cxxstd: '11,17,20,23,2c', os: ubuntu-24.04 }
|
||||
|
||||
# libc++
|
||||
- { compiler: clang-6.0, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:18.04', stdlib: libc++, install: 'clang-6.0 libc++-dev libc++abi-dev' }
|
||||
- { compiler: clang-7, cxxstd: '11,14,17', os: ubuntu-20.04, stdlib: libc++, install: 'clang-7 libc++-7-dev libc++abi-7-dev' }
|
||||
# linux, libc++
|
||||
- { name: Clang w/ sanitizers, sanitize: yes,
|
||||
compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev' }
|
||||
compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04, stdlib: 'libc++', install: 'clang-12 libc++-12-dev libc++abi-12-dev' }
|
||||
|
||||
- { name: MacOS w/ clang and sanitizers,
|
||||
compiler: clang, cxxstd: '11,14,17,20,2b', os: macos-13, sanitize: yes }
|
||||
@@ -100,20 +86,14 @@ jobs:
|
||||
# requires two github secrets in repo to activate; see ci/github/coverity.sh
|
||||
# does not run on pull requests, only on pushes into develop and master
|
||||
- { name: Coverity, coverity: yes,
|
||||
compiler: clang-12, cxxstd: '11,20', os: ubuntu-20.04, ccache: no }
|
||||
compiler: clang-12, cxxstd: '17', os: ubuntu-20.04, ccache: no }
|
||||
|
||||
# multiarch (bigendian testing) - does not support coverage yet
|
||||
- { name: Big-endian, multiarch: yes,
|
||||
compiler: clang, cxxstd: '17', os: ubuntu-22.04, ccache: no, distro: fedora, edition: 34, arch: s390x }
|
||||
|
||||
|
||||
timeout-minutes: 120
|
||||
runs-on: ${{matrix.os}}
|
||||
container:
|
||||
image: ${{matrix.container}}
|
||||
volumes:
|
||||
- /node20217:/node20217:rw,rshared
|
||||
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
|
||||
env: {B2_USE_CCACHE: 1}
|
||||
|
||||
steps:
|
||||
@@ -131,7 +111,7 @@ jobs:
|
||||
for i in {1..${NET_RETRY_COUNT:-3}}; do sudo -E add-apt-repository -y ppa:git-core/ppa && break || sleep 10; done
|
||||
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
|
||||
osver=$(lsb_release -sr | cut -f1 -d.)
|
||||
pkgs="g++ git"
|
||||
pkgs="g++ git xz-utils"
|
||||
# Ubuntu 22+ has only Python 3 in the repos
|
||||
if [ -n "$osver" ] && [ "$osver" -ge "22" ]; then
|
||||
pkgs+=" python-is-python3 libpython3-dev"
|
||||
@@ -182,8 +162,8 @@ jobs:
|
||||
- name: Install packages
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
SOURCE_KEYS=(${{join(matrix.source_keys, ' ')}})
|
||||
SOURCES=(${{join(matrix.sources, ' ')}})
|
||||
SOURCE_KEYS=("${{join(matrix.source_keys, '" "')}}")
|
||||
SOURCES=("${{join(matrix.sources, '" "')}}")
|
||||
# Add this by default
|
||||
SOURCE_KEYS+=('http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F')
|
||||
SOURCES+=(ppa:ubuntu-toolchain-r/test)
|
||||
@@ -249,21 +229,11 @@ jobs:
|
||||
if: '!matrix.coverity'
|
||||
run: ci/build.sh
|
||||
|
||||
- name: Collect coverage
|
||||
- name: Upload coverage
|
||||
if: matrix.coverage
|
||||
run: ci/codecov.sh "upload"
|
||||
env:
|
||||
BOOST_CI_CODECOV_IO_UPLOAD: skip
|
||||
|
||||
- name: Upload coverage
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
disable_search: true
|
||||
file: coverage.info
|
||||
name: Github Actions
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
verbose: true
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: Run coverity
|
||||
if: matrix.coverity && github.event_name == 'push' && (github.ref_name == 'develop' || github.ref_name == 'master')
|
||||
@@ -280,13 +250,13 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { toolset: msvc-14.0, cxxstd: '14,latest', addrmd: '32,64', os: windows-2019 }
|
||||
- { toolset: msvc-14.2, cxxstd: '14,17,20', addrmd: '32,64', os: windows-2019 }
|
||||
- { toolset: msvc-14.3, cxxstd: '14,17,20,latest', addrmd: '32,64', os: windows-2022 }
|
||||
- { toolset: msvc-14.0, cxxstd: '14,latest', addrmd: '32,64', os: windows-2019 }
|
||||
- { toolset: msvc-14.2, cxxstd: '14,17,20', addrmd: '32,64', os: windows-2019 }
|
||||
- { toolset: msvc-14.3, cxxstd: '14,17,20,latest',addrmd: '32,64', os: windows-2022 }
|
||||
- { name: Collect coverage, coverage: yes,
|
||||
toolset: msvc-14.3, cxxstd: 'latest', addrmd: '64', os: windows-2022 }
|
||||
- { toolset: clang-win, cxxstd: '14,17,latest', addrmd: '32,64', os: windows-2022 }
|
||||
- { toolset: gcc, cxxstd: '11,14,17,2a', addrmd: '64', os: windows-2019 }
|
||||
toolset: msvc-14.3, cxxstd: 'latest', addrmd: '64', os: windows-2022 }
|
||||
- { toolset: clang-win, cxxstd: '14,17,latest', addrmd: '32,64', os: windows-2022 }
|
||||
- { toolset: gcc, cxxstd: '11,14,17,2a', addrmd: '64', os: windows-2019 }
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
@@ -327,11 +297,12 @@ jobs:
|
||||
|
||||
- name: Upload coverage
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v4
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
disable_search: true
|
||||
file: __out/cobertura.xml
|
||||
name: Github Actions
|
||||
fail_ci_if_error: true
|
||||
files: __out/cobertura.xml
|
||||
name: github-actions
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
verbose: true
|
||||
|
||||
@@ -458,3 +429,4 @@ jobs:
|
||||
cmake -G "${{matrix.generator}}" -DBOOST_CI_INSTALL_TEST=ON -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.build_shared}} -DCMAKE_PREFIX_PATH=~/.local ..
|
||||
cmake --build . --config ${{matrix.build_type}} -j$B2_JOBS
|
||||
ctest --output-on-failure --build-config ${{matrix.build_type}}
|
||||
|
||||
|
||||
19
README.md
19
README.md
@@ -1,8 +1,8 @@
|
||||
Rational, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), provides an implementation of rational numbers.
|
||||
Rational, part of collection of the [Boost C++ Libraries](https://github.com/boostorg), provides an implementation of rational numbers.
|
||||
|
||||
### License
|
||||
|
||||
Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
|
||||
Distributed under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
### Properties
|
||||
|
||||
@@ -11,10 +11,11 @@ Distributed under the [Boost Software License, Version 1.0](http://www.boost.org
|
||||
|
||||
### Build Status
|
||||
|
||||
Branch | GHA CI | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
|
||||
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
|
||||
[`master`](https://github.com/boostorg/rational/tree/master) | [](https://github.com/boostorg/rational/actions?query=branch:master) | [](https://ci.appveyor.com/project/cppalliance/rational) | [](https://scan.coverity.com/projects/boostorg-rational) | [](https://codecov.io/gh/boostorg/rational/branch/master)| [](https://pdimov.github.io/boostdep-report/master/rational.html) | [](https://www.boost.org/doc/libs/master/libs/rational) | [](http://www.boost.org/development/tests/master/developer/rational.html)
|
||||
[`develop`](https://github.com/boostorg/rational/tree/develop) | [](https://travis-ci.org/boostorg/rational) | [](https://ci.appveyor.com/project/cppalliance/rational/branch/develop) | [](https://scan.coverity.com/projects/boostorg-rational) | [](https://codecov.io/gh/boostorg/rational/branch/develop) | [](https://pdimov.github.io/boostdep-report/develop/rational.html) | [](https://www.boost.org/doc/libs/develop/libs/rational) | [](http://www.boost.org/development/tests/develop/developer/rational.html)
|
||||
<!-- boost-ci/tools/makebadges.sh --project rational --appveyor ieim2q28u1ksc8i7 --codecov GWRPyIttVH --coverity 16002 -->
|
||||
| Branch | GHA CI | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
|
||||
| :-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
|
||||
| [`master`](https://github.com/boostorg/rational/tree/master) | [](https://github.com/boostorg/rational/actions?query=branch:master) | [](https://ci.appveyor.com/project/cppalliance/rational/branch/master) | [](https://scan.coverity.com/projects/boostorg-rational) | [](https://codecov.io/gh/boostorg/rational/tree/master) | [](https://pdimov.github.io/boostdep-report/master/rational.html) | [](https://www.boost.org/doc/libs/master/libs/rational) | [](https://www.boost.org/development/tests/master/developer/rational.html)
|
||||
| [`develop`](https://github.com/boostorg/rational/tree/develop) | [](https://github.com/boostorg/rational/actions?query=branch:develop) | [](https://ci.appveyor.com/project/cppalliance/rational/branch/develop) | [](https://scan.coverity.com/projects/boostorg-rational) | [](https://codecov.io/gh/boostorg/rational/tree/develop) | [](https://pdimov.github.io/boostdep-report/develop/rational.html) | [](https://www.boost.org/doc/libs/develop/libs/rational) | [](https://www.boost.org/development/tests/develop/developer/rational.html)
|
||||
|
||||
### Directories
|
||||
|
||||
@@ -25,8 +26,8 @@ Branch | GHA CI | Appveyor | Coverity Scan | codecov.io | Deps | Docs |
|
||||
|
||||
### More information
|
||||
|
||||
* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-rational)
|
||||
* [Ask questions](https://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-rational)
|
||||
* [Report bugs](https://github.com/boostorg/rational/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
|
||||
* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
|
||||
* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[rational]` tag at the beginning of the subject line.
|
||||
* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
|
||||
* Discussions about the library are held on the [Boost developers mailing list](https://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](https://www.boost.org/community/policy.html) before posting and add the `[rational]` tag at the beginning of the subject line.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user