v1.3.1 #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu | |
on: | |
- push | |
- pull_request | |
env: | |
CMAKE_VERSION: 3.30.3 | |
CCACHE_VERSION: 4.10.2 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [ | |
{os: ubuntu-20.04, compiler_name: gcc-10, c_compiler: gcc-10, cxx_compiler: g++-10}, | |
{os: ubuntu-20.04, compiler_name: clang-10, c_compiler: clang-10, cxx_compiler: clang++-10}, | |
{os: ubuntu-20.04, compiler_name: clang-11, c_compiler: clang-11, cxx_compiler: clang++-11}, | |
{os: ubuntu-20.04, compiler_name: clang-12, c_compiler: clang-12, cxx_compiler: clang++-12}, | |
{os: ubuntu-22.04, compiler_name: gcc-10, c_compiler: gcc-10, cxx_compiler: g++-10}, | |
{os: ubuntu-22.04, compiler_name: gcc-11, c_compiler: gcc-11, cxx_compiler: g++-11}, | |
{os: ubuntu-22.04, compiler_name: gcc-12, c_compiler: gcc-12, cxx_compiler: g++-12}, | |
{os: ubuntu-22.04, compiler_name: clang-13, c_compiler: clang-13, cxx_compiler: clang++-13}, | |
{os: ubuntu-22.04, compiler_name: clang-14, c_compiler: clang-14, cxx_compiler: clang++-14}, | |
{os: ubuntu-22.04, compiler_name: clang-15, c_compiler: clang-15, cxx_compiler: clang++-15}, | |
{os: ubuntu-24.04, compiler_name: gcc-12, c_compiler: gcc-12, cxx_compiler: g++-12}, | |
{os: ubuntu-24.04, compiler_name: gcc-13, c_compiler: gcc-13, cxx_compiler: g++-13}, | |
{os: ubuntu-24.04, compiler_name: gcc-14, c_compiler: gcc-14, cxx_compiler: g++-14}, | |
{os: ubuntu-24.04, compiler_name: clang-16, c_compiler: clang-16, cxx_compiler: clang++-16}, | |
{os: ubuntu-24.04, compiler_name: clang-17, c_compiler: clang-17, cxx_compiler: clang++-17}, | |
{os: ubuntu-24.04, compiler_name: clang-18, c_compiler: clang-18, cxx_compiler: clang++-18}, | |
] | |
build_type: [Debug, Release, Sanitize] | |
name: ${{matrix.config.os}} - ${{matrix.config.compiler_name}} - ${{matrix.build_type}} | |
runs-on: ${{matrix.config.os}} | |
env: | |
CMAKE_GENERATOR: "Unix Makefiles" | |
CC: ${{matrix.config.c_compiler}} | |
CXX: ${{matrix.config.cxx_compiler}} | |
steps: | |
- name: Checkout dynamic_bitset | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
path: dynamic_bitset | |
- name: Setup CMake | |
id: cmake | |
uses: ./dynamic_bitset/.github/actions/setup_cmake | |
with: | |
cmake_version: ${{env.CMAKE_VERSION}} | |
used_env: ${{matrix.config.os}} | |
- name: Setup ccache | |
id: ccache | |
uses: ./dynamic_bitset/.github/actions/setup_ccache | |
with: | |
ccache_version: ${{env.CCACHE_VERSION}} | |
used_env: ${{matrix.config.os}} | |
cache_id: ${{matrix.config.os}}-${{matrix.config.compiler_name}}-${{matrix.build_type}} | |
- name: CMake version | |
run: ${{steps.cmake.outputs.cmake_binary}} --version | |
- name: CTest version | |
run: ${{steps.cmake.outputs.ctest_binary}} --version | |
- name: Ccache version | |
run: ${{steps.ccache.outputs.ccache_binary}} --version | |
- name: Make version | |
run: make --version | |
- name: C compiler version | |
run: ${CC} --version | |
- name: C++ compiler version | |
run: ${CXX} --version | |
- name: Configure | |
run: >- | |
${{steps.cmake.outputs.cmake_binary}} | |
-S "${{github.workspace}}/dynamic_bitset" | |
-B "${{github.workspace}}/dynamic_bitset/build" | |
-D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} | |
-D CMAKE_BUILD_TYPE=${{matrix.build_type}} | |
-D CMAKE_C_COMPILER_LAUNCHER=${{steps.ccache.outputs.ccache_binary}} | |
-D CMAKE_CXX_COMPILER_LAUNCHER=${{steps.ccache.outputs.ccache_binary}} | |
- name: Build | |
run: >- | |
${{steps.cmake.outputs.cmake_binary}} | |
--build "${{github.workspace}}/dynamic_bitset/build" | |
--config ${{matrix.build_type}} | |
--parallel $(nproc) | |
- name: Ccache stats | |
run: >- | |
${{steps.ccache.outputs.ccache_binary}} --show-stats | |
- name: Run tests | |
run: >- | |
${{steps.cmake.outputs.ctest_binary}} | |
--test-dir "${{github.workspace}}/dynamic_bitset/build" | |
--output-on-failure | |
--parallel $(nproc) |