Skip to content

Commit 21bf2c1

Browse files
committed
Add MSVC to GitHub Actions CI and remove AppVeyor
1 parent 38ace2f commit 21bf2c1

File tree

2 files changed

+82
-88
lines changed

2 files changed

+82
-88
lines changed

.github/workflows/ci.yml

Lines changed: 82 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,96 +9,129 @@ jobs:
99
matrix:
1010
config:
1111
- {
12-
name: linux-gcc-7,
12+
name: linux-x64-gcc-7,
1313
os: ubuntu-18.04,
1414
cxx: g++-7,
15-
cmake-build-type: Release,
16-
boost-toolset: gcc,
17-
boost-platform-version: 18.04
15+
cmake-build-type: Release
1816
}
1917
- {
20-
name: linux-gcc-7-no-exceptions,
18+
name: linux-x64-gcc-7-no-exceptions,
2119
os: ubuntu-18.04,
2220
cxx: g++-7,
2321
cxx-flags: -fno-exceptions,
24-
cmake-build-type: Release,
25-
boost-toolset: gcc,
26-
boost-platform-version: 18.04
22+
cmake-build-type: Release
2723
}
2824
- {
29-
name: linux-clang-9,
25+
name: linux-x64-clang-9,
3026
os: ubuntu-18.04,
3127
cxx: clang++-9,
32-
cmake-build-type: Release,
33-
boost-toolset: gcc,
34-
boost-platform-version: 18.04
28+
cmake-build-type: Release
3529
}
3630
- {
37-
name: macos-gcc,
31+
name: macos-x64-gcc,
3832
os: macos-10.15,
3933
cxx: g++,
40-
cmake-build-type: Release,
41-
boost-toolset: clang,
42-
boost-platform-version: 10.15
34+
cmake-build-type: Release
4335
}
4436
- {
45-
name: macos-clang,
37+
name: macos-x64-clang,
4638
os: macos-10.15,
4739
cxx: clang++,
48-
cmake-build-type: Release,
49-
boost-toolset: clang,
50-
boost-platform-version: 10.15
40+
cmake-build-type: Release
5141
}
5242
- {
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,
5646
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
6048
}
6149
- {
62-
name: linux-gcc-10-coverage,
63-
os: ubuntu-18.04,
50+
name: linux-x64-gcc-10-coverage,
51+
os: ubuntu-20.04,
6452
cxx: g++-10,
6553
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
6988
}
7089
name: ${{matrix.config.name}}
7190
runs-on: ${{matrix.config.os}}
7291
steps:
7392
- uses: actions/checkout@v2
7493

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'
8298

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
85119
env:
86120
CXX: ${{matrix.config.cxx}}
87121
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'
90123

91-
- name: Build
124+
- name: Build (Linux or macOS)
92125
run: cmake --build ${{github.workspace}}/build --verbose
126+
if: runner.os == 'Linux' || runner.os == 'macOS'
93127

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'
97131

98132
- name: Coverage
99-
working-directory: ${{github.workspace}}/build
100133
run: |
101134
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
104137
if: ${{matrix.config.name == 'linux-gcc-10-coverage'}}

appveyor.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)