|
| 1 | +name: CMake |
| 2 | + |
| 3 | +on: [push, pull_request, release] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + strategy: |
| 8 | + fail-fast: false |
| 9 | + matrix: |
| 10 | + config: |
| 11 | + - { |
| 12 | + name: linux-gcc-7, |
| 13 | + os: ubuntu-18.04, |
| 14 | + cxx: g++-7, |
| 15 | + cmake-build-type: Release, |
| 16 | + boost-toolset: gcc, |
| 17 | + boost-platform-version: 18.04 |
| 18 | + } |
| 19 | + - { |
| 20 | + name: linux-gcc-7-no-exceptions, |
| 21 | + os: ubuntu-18.04, |
| 22 | + cxx: g++-7, |
| 23 | + cxx-flags: -fno-exceptions, |
| 24 | + cmake-build-type: Release, |
| 25 | + boost-toolset: gcc, |
| 26 | + boost-platform-version: 18.04 |
| 27 | + } |
| 28 | + - { |
| 29 | + name: linux-clang-9, |
| 30 | + os: ubuntu-18.04, |
| 31 | + cxx: clang++-9, |
| 32 | + cmake-build-type: Release, |
| 33 | + boost-toolset: gcc, |
| 34 | + boost-platform-version: 18.04 |
| 35 | + } |
| 36 | + - { |
| 37 | + name: macos-gcc, |
| 38 | + os: macos-10.15, |
| 39 | + cxx: g++, |
| 40 | + cmake-build-type: Release, |
| 41 | + boost-toolset: clang, |
| 42 | + boost-platform-version: 10.15 |
| 43 | + } |
| 44 | + - { |
| 45 | + name: macos-clang, |
| 46 | + os: macos-10.15, |
| 47 | + cxx: clang++, |
| 48 | + cmake-build-type: Release, |
| 49 | + boost-toolset: clang, |
| 50 | + boost-platform-version: 10.15 |
| 51 | + } |
| 52 | + - { |
| 53 | + name: linux-gcc-10-sanitize, |
| 54 | + os: ubuntu-18.04, |
| 55 | + cxx: g++-10, |
| 56 | + cxx-flags: "-fsanitize=address,undefined", |
| 57 | + cmake-build-type: Release, |
| 58 | + boost-toolset: gcc, |
| 59 | + boost-platform-version: 18.04 |
| 60 | + } |
| 61 | + - { |
| 62 | + name: linux-gcc-10-coverage, |
| 63 | + os: ubuntu-18.04, |
| 64 | + cxx: g++-10, |
| 65 | + cxx-flags: --coverage, |
| 66 | + cmake-build-type: Debug, |
| 67 | + boost-toolset: gcc, |
| 68 | + boost-platform-version: 18.04 |
| 69 | + } |
| 70 | + name: ${{matrix.config.name}} |
| 71 | + runs-on: ${{matrix.config.os}} |
| 72 | + steps: |
| 73 | + - uses: actions/checkout@v2 |
| 74 | + |
| 75 | + - name: Install boost |
| 76 | + uses: MarkusJx/install-boost@v2.1.0 |
| 77 | + id: install-boost |
| 78 | + with: |
| 79 | + boost_version: 1.78.0 |
| 80 | + platform_version: ${{matrix.config.boost-platform-version}} |
| 81 | + toolset: ${{matrix.config.boost-toolset}} |
| 82 | + |
| 83 | + - name: Configure CMake |
| 84 | + run: cmake -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -S ${{github.workspace}}/tests -B ${{github.workspace}}/build |
| 85 | + env: |
| 86 | + CXX: ${{matrix.config.cxx}} |
| 87 | + CXXFLAGS: ${{matrix.config.cxx-flags}} |
| 88 | + BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} |
| 89 | + BOOST_LIBRARYDIR: ${{steps.install-boost.outputs.BOOST_ROOT}}/lib |
| 90 | + |
| 91 | + - name: Build |
| 92 | + run: cmake --build ${{github.workspace}}/build --verbose |
| 93 | + |
| 94 | + - name: Test |
| 95 | + working-directory: ${{github.workspace}}/build |
| 96 | + run: ./tsl_robin_map_tests |
| 97 | + |
| 98 | + - name: Coverage |
| 99 | + working-directory: ${{github.workspace}}/build |
| 100 | + run: | |
| 101 | + sudo apt-get install -y lcov |
| 102 | + lcov -c -b ../include/ -d . -o coverage.info --no-external |
| 103 | + bash <(curl -s https://codecov.io/bash) -f coverage.info |
| 104 | + if: ${{matrix.config.name == 'linux-gcc-10-coverage'}} |
0 commit comments