-
Notifications
You must be signed in to change notification settings - Fork 42
173 lines (167 loc) · 4.7 KB
/
main_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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: MLSPP CI
on:
push:
branches:
- main
paths:
- ".github/**"
- "**.cpp"
- "**.h"
pull_request:
branches:
- main
paths:
- ".github/**"
- "**.cpp"
- "**.h"
env:
CMAKE_BUILD_PARALLEL_LEVEL: 3
CTEST_OUTPUT_ON_FAILURE: 1
VCPKG_BINARY_SOURCES: files,${{ github.workspace }}/vcpkg_cache,readwrite
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
jobs:
choose_crypto_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
hpke:
- 'lib/hpke/include/**'
- 'lib/hpke/src/**'
- 'lib/hpke/test/**'
- id: set-matrix
run: |
if [ ${{ steps.filter.outputs.hpke }} = "true" ];
then
echo "matrix=[\"openssl_1.1\",\"openssl_3\",\"boringssl\"]" >> $GITHUB_OUTPUT;
else
echo "matrix=[\"openssl_3\"]" >> $GITHUB_OUTPUT
fi
build-n-test:
needs: choose_crypto_matrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
crypto: ${{ fromJson(needs.choose_crypto_matrix.outputs.matrix )}}
steps:
- run: echo "Hello ${{ matrix.someValue }}"
# formatting-check:
# name: Formatting Check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Run clang-format style check for C/C++ programs
# uses: jidicula/[email protected]
# with:
# clang-format-version: 16
# include-regex: '^\./(src|include|test|cmd)/.*\.(cpp|h)$'
# fallback-style: 'Mozilla'
#
# build-and-unit-test:
# needs: formatting-check
# name: Build and test
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [windows-latest, ubuntu-latest, macos-latest]
# crypto: [openssl_1.1, openssl_3, boringssl]
#
# env:
# CRYPTO_DIR: "./alternatives/${{ matrix.crypto }}"
#
# steps:
# - uses: ./.github/actions/prepare-build
# with:
# os: ${{ matrix.os }}
# crypto: ${{ matrix.crypto }}
# cache-dir: ${{ github.workspace }}/vcpkg_cache
#
# - name: Build
# run: |
# cmake -B "${{ runner.temp }}/build_${{ matrix.crypto }}" -DVCPKG_MANIFEST_DIR="${{ env.CRYPTO_DIR }}" -DTESTING=ON
# cmake --build "${{ runner.temp }}/build_${{ matrix.crypto }}"
#
# - name: Unit Test
# run: |
# ctest --test-dir "${{ runner.temp }}/build_${{ matrix.crypto }}"
#
# interop-test:
# if: github.event.pull_request.draft == false
# needs: build-and-unit-test
# name: Interop test
# runs-on: ubuntu-latest
#
# env:
# CRYPTO_DIR: "./alternatives/openssl_1.1"
#
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 0
#
# - uses: ./.github/actions/prepare-build
# with:
# os: ubuntu-latest
# crypto-dir: openssl_1.1
# cache-dir: ${{ github.workspace }}/vcpkg_cache
#
# - name: Build
# run: |
# cmake -B "${{ runner.temp }}/build_openssl_1.1" -DVCPKG_MANIFEST_DIR="${{ env.CRYPTO_DIR }}"
# cmake --build "${{ runner.temp }}/build_openssl_1.1"
#
# - name: Build (Interop Harness)
# run: |
# cd cmd/interop
# cmake -B build
# cmake --build build
#
# - name: Test self-interop
# run: |
# make -C cmd/interop self-test
#
# - name: Test interop on test vectors
# run: |
# make -C cmd/interop interop-test
#
# - name: Test gRPC live interop with self
# run: |
# cd cmd/interop
# ./grpc-self-test.sh
#
# clang-tidy:
# if: github.event.pull_request.draft == false
# needs: build-and-unit-test
# name: Build with clang-tidy
# runs-on: ubuntu-latest
# strategy:
# matrix:
# crypto: [openssl_1.1, openssl_3, boringssl]
#
# env:
# CRYPTO_DIR: "./alternatives/${{ matrix.crypto }}"
#
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 0
#
# - uses: ./.github/actions/prepare-build
# with:
# os: ubuntu-latest
# crypto: matrix.crypto
# cache-dir: ${{ github.workspace }}/vcpkg_cache
#
# - name: Build with clang-tidy
# run: |
# cmake -B "${{ runner.temp }}/build_${{ matrix.crypto }}" -DVCPKG_MANIFEST_DIR="${{ env.CRYPTO_DIR }}" \
# -DTESTING=ON -DCLANG_TIDY=ON -DSANITIZERS=ON
# cmake --build "${{ runner.temp }}/build_${{ matrix.crypto }}"