|
9 | 9 | matrix: |
10 | 10 | config: |
11 | 11 | - { |
12 | | - name: linux-gcc-7, |
| 12 | + name: linux-x64-gcc-7, |
13 | 13 | os: ubuntu-18.04, |
14 | 14 | cxx: g++-7, |
15 | | - cmake-build-type: Release, |
16 | | - boost-toolset: gcc, |
17 | | - boost-platform-version: 18.04 |
| 15 | + cmake-build-type: Release |
18 | 16 | } |
19 | 17 | - { |
20 | | - name: linux-gcc-7-no-exceptions, |
| 18 | + name: linux-x64-gcc-7-no-exceptions, |
21 | 19 | os: ubuntu-18.04, |
22 | 20 | cxx: g++-7, |
23 | 21 | cxx-flags: -fno-exceptions, |
24 | | - cmake-build-type: Release, |
25 | | - boost-toolset: gcc, |
26 | | - boost-platform-version: 18.04 |
| 22 | + cmake-build-type: Release |
27 | 23 | } |
28 | 24 | - { |
29 | | - name: linux-clang-9, |
| 25 | + name: linux-x64-clang-9, |
30 | 26 | os: ubuntu-18.04, |
31 | 27 | cxx: clang++-9, |
32 | | - cmake-build-type: Release, |
33 | | - boost-toolset: gcc, |
34 | | - boost-platform-version: 18.04 |
| 28 | + cmake-build-type: Release |
35 | 29 | } |
36 | 30 | - { |
37 | | - name: macos-gcc, |
| 31 | + name: macos-x64-gcc, |
38 | 32 | os: macos-10.15, |
39 | 33 | cxx: g++, |
40 | | - cmake-build-type: Release, |
41 | | - boost-toolset: clang, |
42 | | - boost-platform-version: 10.15 |
| 34 | + cmake-build-type: Release |
43 | 35 | } |
44 | 36 | - { |
45 | | - name: macos-clang, |
| 37 | + name: macos-x64-clang, |
46 | 38 | os: macos-10.15, |
47 | 39 | cxx: clang++, |
48 | | - cmake-build-type: Release, |
49 | | - boost-toolset: clang, |
50 | | - boost-platform-version: 10.15 |
| 40 | + cmake-build-type: Release |
51 | 41 | } |
52 | 42 | - { |
53 | | - name: linux-gcc-10-sanitize, |
54 | | - os: ubuntu-18.04, |
55 | | - cxx: g++-10, |
| 43 | + name: linux-x64-clang-12-sanitize, |
| 44 | + os: ubuntu-20.04, |
| 45 | + cxx: clang++-12, |
56 | 46 | cxx-flags: "-fsanitize=address,undefined", |
57 | | - cmake-build-type: Release, |
58 | | - boost-toolset: gcc, |
59 | | - boost-platform-version: 18.04 |
| 47 | + cmake-build-type: Release |
60 | 48 | } |
61 | 49 | - { |
62 | | - name: linux-gcc-10-coverage, |
63 | | - os: ubuntu-18.04, |
| 50 | + name: linux-x64-gcc-10-coverage, |
| 51 | + os: ubuntu-20.04, |
64 | 52 | cxx: g++-10, |
65 | 53 | cxx-flags: --coverage, |
66 | | - cmake-build-type: Debug, |
67 | | - boost-toolset: gcc, |
68 | | - boost-platform-version: 18.04 |
| 54 | + gcov-tool: gcov-10, |
| 55 | + cmake-build-type: Debug |
| 56 | + } |
| 57 | + - { |
| 58 | + name: windows-x64-vs-2019, |
| 59 | + os: windows-2019, |
| 60 | + cmake-build-type: Release, |
| 61 | + cmake-generator: Visual Studio 16 2019, |
| 62 | + cmake-platform: x64, |
| 63 | + vcpkg-triplet: x64-windows-static-md |
| 64 | + } |
| 65 | + - { |
| 66 | + name: windows-x86-vs-2019, |
| 67 | + os: windows-2019, |
| 68 | + cmake-build-type: Release, |
| 69 | + cmake-generator: Visual Studio 16 2019, |
| 70 | + cmake-platform: Win32, |
| 71 | + vcpkg-triplet: x86-windows-static-md |
| 72 | + } |
| 73 | + - { |
| 74 | + name: windows-x64-vs-2022, |
| 75 | + os: windows-2022, |
| 76 | + cmake-build-type: Release, |
| 77 | + cmake-generator: Visual Studio 17 2022, |
| 78 | + cmake-platform: x64, |
| 79 | + vcpkg-triplet: x64-windows-static-md |
| 80 | + } |
| 81 | + - { |
| 82 | + name: windows-x86-vs-2022, |
| 83 | + os: windows-2022, |
| 84 | + cmake-build-type: Release, |
| 85 | + cmake-generator: Visual Studio 17 2022, |
| 86 | + cmake-platform: Win32, |
| 87 | + vcpkg-triplet: x86-windows-static-md |
69 | 88 | } |
70 | 89 | name: ${{matrix.config.name}} |
71 | 90 | runs-on: ${{matrix.config.os}} |
72 | 91 | steps: |
73 | 92 | - uses: actions/checkout@v2 |
74 | 93 |
|
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}} |
| 94 | + # Windows |
| 95 | + - name: Install boost (Windows) |
| 96 | + run: vcpkg install boost-test:${{matrix.config.vcpkg-triplet}} |
| 97 | + if: runner.os == 'Windows' |
82 | 98 |
|
83 | | - - name: Configure CMake |
84 | | - run: cmake -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -S ${{github.workspace}}/tests -B ${{github.workspace}}/build |
| 99 | + - name: Configure CMake (Windows) |
| 100 | + run: cmake -G "${{matrix.config.cmake-generator}}" -A ${{matrix.config.cmake-platform}} -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{matrix.config.vcpkg-triplet}} -S ${{github.workspace}}/tests -B ${{github.workspace}}/build |
| 101 | + if: runner.os == 'Windows' |
| 102 | + |
| 103 | + - name: Build (Windows) |
| 104 | + run: cmake --build ${{github.workspace}}/build --config ${{matrix.config.cmake-build-type}} --verbose |
| 105 | + if: runner.os == 'Windows' |
| 106 | + |
| 107 | + - name: Test (Windows) |
| 108 | + working-directory: ${{github.workspace}}/build |
| 109 | + run: ./${{matrix.config.cmake-build-type}}/tsl_robin_map_tests.exe |
| 110 | + if: runner.os == 'Windows' |
| 111 | + |
| 112 | + # Linux or macOS |
| 113 | + - name: Install boost (Linux or macOS) |
| 114 | + run: vcpkg install boost-test |
| 115 | + if: runner.os == 'Linux' || runner.os == 'macOS' |
| 116 | + |
| 117 | + - name: Configure CMake (Linux or macOS) |
| 118 | + run: cmake -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -S ${{github.workspace}}/tests -B ${{github.workspace}}/build |
85 | 119 | env: |
86 | 120 | CXX: ${{matrix.config.cxx}} |
87 | 121 | CXXFLAGS: ${{matrix.config.cxx-flags}} |
88 | | - BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} |
89 | | - BOOST_LIBRARYDIR: ${{steps.install-boost.outputs.BOOST_ROOT}}/lib |
| 122 | + if: runner.os == 'Linux' || runner.os == 'macOS' |
90 | 123 |
|
91 | | - - name: Build |
| 124 | + - name: Build (Linux or macOS) |
92 | 125 | run: cmake --build ${{github.workspace}}/build --verbose |
| 126 | + if: runner.os == 'Linux' || runner.os == 'macOS' |
93 | 127 |
|
94 | | - - name: Test |
95 | | - working-directory: ${{github.workspace}}/build |
96 | | - run: ./tsl_robin_map_tests |
| 128 | + - name: Test (Linux or macOS) |
| 129 | + run: ${{github.workspace}}/build/tsl_robin_map_tests |
| 130 | + if: runner.os == 'Linux' || runner.os == 'macOS' |
97 | 131 |
|
98 | 132 | - name: Coverage |
99 | | - working-directory: ${{github.workspace}}/build |
100 | 133 | run: | |
101 | 134 | 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 |
| 135 | + lcov -c -b ${{github.workspace}}/include -d ${{github.workspace}}/build -o ${{github.workspace}}/coverage.info --no-external --gcov-tool ${{matrix.config.gcov-tool}} |
| 136 | + bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/coverage.info |
104 | 137 | if: ${{matrix.config.name == 'linux-gcc-10-coverage'}} |
0 commit comments