-
Notifications
You must be signed in to change notification settings - Fork 21
65 lines (57 loc) · 2.18 KB
/
ci.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
name: Continuous Integration
on:
push:
branches:
- main
- 'releases/**'
tags:
- 'merklecpp-*'
- 'v*'
pull_request:
jobs:
build-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-20.04]
build_type: [Debug, Release]
compiler: [g++, clang++, clang++-11, clang++-15]
include:
- os: windows-latest
build_type: Debug
compiler: msvc
- os: windows-latest
build_type: Release
compiler: msvc
steps:
- name: Install packages
run: sudo apt install libmbedtls-dev doctest-dev clang-11 clang++-15
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04'
- uses: actions/checkout@v2
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build/${{ matrix.build_type }}
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build/${{ matrix.build_type }}
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
cmake $GITHUB_WORKSPACE -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DTESTS=ON -DOPENSSL=ON -DMBEDTLS=ON
else
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DTESTS=ON
fi
- name: Build
working-directory: ${{github.workspace}}/build/${{ matrix.build_type }}
shell: bash
run: cmake --build . --config ${{ matrix.build_type }}
- name: Test
working-directory: ${{github.workspace}}/build/${{ matrix.build_type }}
shell: bash
run: ctest -VV -C ${{ matrix.build_type }}
env:
ASAN_OPTIONS: use_sigaltstack=false # To avoid SetAlternateSignalStack with clang-11