Debian Codegraph @

.github/workflows/main.yml

raw
1 name: CMake
2
3 on: [push, pull_request]
4
5 env:
6 BUILD_TYPE: Debug
7 CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Debug -DCPP_JWT_USE_VENDORED_NLOHMANN_JSON=off'
8 VCPKG_ARGUMENTS: 'nlohmann-json openssl gtest'
9 VCPKG_VERSION: '6be82cfac67649a31d4c3eba56d2fafa9dc6736a' # May 13, 2022
10
11 jobs:
12 build:
13 runs-on: ${{ matrix.config.os }}
14 strategy:
15 fail-fast: false
16 matrix:
17 config:
18 - {
19 name: 'Windows/2019/MSVC-19.30.30528.0',
20 os: windows-2019,
21 triplet: x64-windows,
22 parallel: 2,
23 }
24 - {
25 name: 'MacOSX/11/AppleClang-12.0.5.12050022',
26 os: macos-11,
27 triplet: x64-osx,
28 parallel: 3,
29 }
30 - {
31 name: 'Ubuntu/20.04/GCC-9.3.0',
32 os: ubuntu-20.04,
33 triplet: x64-linux,
34 parallel: 2,
35 }
36
37 steps:
38 - uses: actions/checkout@v1
39
40 - name: Install vcpkg
41 uses: lukka/run-vcpkg@v7
42 with:
43 vcpkgDirectory: ${{ runner.workspace }}/vcpkg
44 vcpkgArguments: ${{ env.VCPKG_ARGUMENTS }}
45 vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
46 vcpkgTriplet: ${{ matrix.config.triplet }}
47
48 - name: Configure CMake
49 run: cmake -B ${{ github.workspace }}/build -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ env.CMAKE_ARGS }}
50
51 - name: Build
52 run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel ${{ matrix.config.parallel }}
53
54 - name: Test
55 working-directory: ${{ github.workspace }}/build
56 run: ctest -C ${{ env.BUILD_TYPE }} -T test --parallel ${{ matrix.config.parallel }} --output-on-failure --timeout 200