-
Notifications
You must be signed in to change notification settings - Fork 347
135 lines (130 loc) · 4.04 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: CI
on:
push:
branches:
- develop
- master
pull_request:
jobs:
linux_ubuntu_20:
name: Linux (${{ matrix.backend }})
runs-on: ubuntu-20.04 # for OpenSSL 1.1.1 and Botan 2.12
strategy:
fail-fast: false
matrix:
include:
- backend: openssl
- backend: botan
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt update -qq
sudo apt install libcppunit-dev libbotan-2-dev p11-kit
- name: Build
env:
CXXFLAGS: -Werror -DBOTAN_NO_DEPRECATED_WARNINGS
run: |
./autogen.sh
./configure --with-crypto-backend=${{ matrix.backend }}
make
- name: Test
run: |
make check || (find . -name test-suite.log -exec cat {} \; && false)
linux_ubuntu_24:
name: Linux (${{ matrix.backend }})
runs-on: ubuntu-24.04 # for OpenSSL 3.0 and Botan 2.19
strategy:
fail-fast: false
matrix:
include:
- backend: openssl
- backend: botan
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt update -qq
sudo apt install libcppunit-dev libbotan-2-dev p11-kit
- name: Build
env:
CXXFLAGS: -DBOTAN_NO_DEPRECATED_WARNINGS
run: |
./autogen.sh
./configure --with-crypto-backend=${{ matrix.backend }}
make
- name: Test
run: |
make check || (find . -name test-suite.log -exec cat {} \; && false)
macos:
name: macOS (${{ matrix.backend }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
include:
- backend: openssl
extra-options: --with-openssl=$(brew --prefix openssl@1.1)
- backend: botan
extra-options: --with-botan=$(brew --prefix botan@2)
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
brew install automake libtool cppunit botan@2
- name: Build
env:
CXXFLAGS: -Werror -DBOTAN_NO_DEPRECATED_WARNINGS
run: |
./autogen.sh
./configure --with-crypto-backend=${{ matrix.backend }} ${{ matrix.extra-options }}
make
- name: Test
run: |
make check || (find . -name test-suite.log -exec cat {} \; && false)
windows:
name: Windows (${{ matrix.arch }}, ${{ matrix.backend }})
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- arch: x64
backend: openssl
target-platform: x64
build-options:
- arch: x64
backend: botan
target-platform: x64
build-options: -DENABLE_ECC=OFF -DENABLE_EDDSA=OFF
- arch: x86
backend: openssl
target-platform: Win32
build-options: -DENABLE_ECC=OFF -DENABLE_EDDSA=OFF
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Create vcpkg.json
run: >
echo '{ "dependencies": [ "openssl", "botan", "cppunit" ],
"overrides": [ { "name": "openssl", "version-string": "1.1.1n" },
{ "name": "botan", "version-string": "2.19.3" } ],
"builtin-baseline": "38d1652f152d36481f2f4e8a85c0f1e14f3769f7" }' > vcpkg.json
- uses: seanmiddleditch/vcpkg-action@master
id: vcpkg
with:
manifest-dir: ${{ github.workspace }}
triplet: ${{ matrix.arch }}-windows
token: ${{ github.token }}
- name: Build
run: |
mkdir build
cmake -B build ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -A ${{ matrix.target-platform }} -DWITH_CRYPTO_BACKEND=${{ matrix.backend }} ${{ matrix.build-options }} -DDISABLE_NON_PAGED_MEMORY=ON -DBUILD_TESTS=ON
cmake --build build
- name: Test
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cmake --build build --target RUN_TESTS