-
Notifications
You must be signed in to change notification settings - Fork 8
84 lines (64 loc) · 2.46 KB
/
cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CMake
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Use Debug type as Windows extra debug assertions can uncover extra bugs.
BUILD_TYPE: Debug
jobs:
test-openssl1-1:
strategy:
matrix:
os: [macos-latest, windows-latest]
# Stops killing other jobs when one fails
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install OpenSSL on MacOS
if: matrix.os == 'macos-latest'
run: |
brew uninstall openssl --ignore-dependencies openssl
brew install [email protected]
- name: Install OpenSSL on Windows
if: matrix.os == 'windows-latest'
run: |
rd -r "C:/Program Files/OpenSSL"
choco install openssl --version=1.1.1.2100
# Copy-Item -Path "C:/Program Files/OpenSSL/lib/VC/x64/MD/*" -Destination "C:/Program Files/OpenSSL/lib/VC" -Recurse
- name: Configure Windows CMake
if: matrix.os == 'windows-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON
- name: Configure MacOS CMake
if: matrix.os == 'macos-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/[email protected]
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -VV
test-openssl3:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
# Stops killing other jobs when one fails
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install OpenSSL on MacOS
if: matrix.os == 'macos-latest'
run: brew install openssl@3
- name: Configure MacOS CMake
if: matrix.os == 'macos-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
- name: Configure Ubuntu CMake
if: matrix.os == 'ubuntu-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -VV