-
Notifications
You must be signed in to change notification settings - Fork 42
68 lines (58 loc) · 2.1 KB
/
build_openssl3.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
name: Build and Test (OpenSSL 3)
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '30 3 * * 1'
env:
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
vcpkg-cmake-file: "$env:VCPKG_INSTALLATION_ROOT\\scripts\\buildsystems\\vcpkg.cmake"
ossl3-vcpkg-dir: "alternatives\\openssl_3"
ctest-target: RUN_TESTS
- os: ubuntu-latest
vcpkg-cmake-file: "$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
ossl3-vcpkg-dir: "alternatives/openssl_3"
ctest-target: test
- os: macos-latest
vcpkg-cmake-file: "$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
ossl3-vcpkg-dir: "alternatives/openssl_3"
ctest-target: test
env:
CMAKE_BUILD_DIR: ${{ github.workspace }}/build
CMAKE_TEST_DIR: ${{ github.workspace }}/build/test
steps:
- uses: actions/checkout@v2
- name: dependencies (macos)
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install llvm pkg-config
ln -s "/usr/local/opt/llvm/bin/clang-format" "/usr/local/bin/clang-format"
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"
- name: Restore cache
uses: actions/cache@v2
with:
path: |
${{ env.CMAKE_BUILD_DIR }}/vcpkg_installed
key: ${{ runner.os }}-${{ hashFiles( '**/vcpkg.json' ) }}
- name: Configure to use clang-tidy and sanitizers
run: |
cmake -B "${{ env.CMAKE_BUILD_DIR }}" -DTESTING=ON -DCLANG_TIDY=ON -DSANITIZERS=ON -DVCPKG_MANIFEST_DIR="${{ matrix.ossl3-vcpkg-dir }}" -DCMAKE_TOOLCHAIN_FILE="${{ matrix.vcpkg-cmake-file}}" .
- name: Build
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}"
- name: Unit tests
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target "${{ matrix.ctest-target}}"