-
Notifications
You must be signed in to change notification settings - Fork 41
188 lines (176 loc) · 5.86 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: MLSPP CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CTEST_OUTPUT_ON_FAILURE: 1
CMAKE_BUILD_DIR: ${{ github.workspace }}/build
CMAKE_BUILD_OPENSSL3_DIR: ${{ github.workspace }}/build_openssl3
CMAKE_TEST_OPENSSL3_DIR: ${{ github.workspace }}/build_openssl3/test
CMAKE_TEST_DIR: ${{ github.workspace }}/build/test
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_COMMIT_ID: 3b3bd424827a1f7f4813216f6b32b6c61e386b2e
jobs:
# formatting-check:
# name: Formatting Check
# runs-on: ubuntu-latest
# strategy:
# matrix:
# path:
# - '.'
# - 'cmd/interop'
# steps:
# - uses: actions/checkout@v3
#
# - name: Run clang-format style check for C/C++ programs
# uses: jidicula/clang-format-action@v4.11.0
# with:
# clang-format-version: '16'
# check-path: ${{ matrix.path }}
# include-regex: ${{ matrix.path }}\/(src|include|test|lib)\/.*\.(cpp|h)
# quick-linux-interop-check:
# needs: formatting-check
# name: Quick Linux Check and Interop
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
#
# - name: Dependencies (Ubuntu)
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: |
# sudo apt-get install -y linux-headers-$(uname -r)
#
# - uses: lukka/get-cmake@latest
#
# - name: Setup vcpkg
# uses: lukka/run-vcpkg@v10
# with:
# vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
# vcpkgDirectory: vcpkg
#
# - name: Build (OpenSSL 1.1)
# run: |
# cmake -B "${{ env.CMAKE_BUILD_DIR }}" -DTESTING=ON
# cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target all
#
# - name: Unit Test (OpenSSL 1.1)
# run: |
# cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target test
#
# - 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
#
# - name: Build (OpenSSL 3)
# run: |
# cmake -B "${{ env.CMAKE_BUILD_OPENSSL3_DIR }}" -DTESTING=ON -DVCPKG_MANIFEST_DIR="alternatives/openssl_3"
# cmake --build "${{ env.CMAKE_BUILD_OPENSSL3_DIR }}"
#
# - name: Unit Test (OpenSSL 3)
# run: |
# cmake --build "${{ env.CMAKE_BUILD_OPENSSL3_DIR }}" --target test
# platform-sanitizer-tests:
# if: github.event.pull_request.draft == false
# needs: quick-linux-interop-check
# name: Build and test platforms using sanitizers and clang-tidy
# 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
#
# steps:
# - uses: actions/checkout@v3
#
# - 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: Dependencies (Ubuntu)
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: |
# sudo apt-get install -y linux-headers-$(uname -r)
#
# - name: Restore cache
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/build/cache
# key: VCPKG-BinaryCache-${{ runner.os }}
#
# - name: Build (OpenSSL1.1)
# run: |
# cmake -B "${{ env.CMAKE_BUILD_DIR }}" -DTESTING=ON -DCLANG_TIDY=ON -DSANITIZERS=ON -DCMAKE_TOOLCHAIN_FILE="${{ matrix.vcpkg-cmake-file}}"
# cmake --build "${{ env.CMAKE_BUILD_DIR }}"
#
# - name: Unit Test (OpenSSL1.1)
# run: |
# cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target "${{ matrix.ctest-target}}"
#
# - name: Build (OpenSSL3)
# run: |
# cmake -B "${{ env.CMAKE_BUILD_OPENSSL3_DIR }}" -DTESTING=ON -DCLANG_TIDY=ON -DSANITIZERS=ON -DVCPKG_MANIFEST_DIR="${{ matrix.ossl3-vcpkg-dir }}" -DCMAKE_TOOLCHAIN_FILE="${{ matrix.vcpkg-cmake-file}}"
# cmake --build "${{ env.CMAKE_BUILD_OPENSSL3_DIR }}"
#
# - name: Unit Test (OpenSSL3)
# run: |
# cmake --build "${{ env.CMAKE_BUILD_OPENSSL3_DIR }}" --target "${{ matrix.ctest-target}}"
#
old-macos-compatibility:
if: github.event.pull_request.draft == false
# needs: quick-linux-interop-check
name: Build for older macOS
runs-on: macos-latest
env:
MACOSX_DEPLOYMENT_TARGET: 10.11
steps:
- uses: actions/checkout@v3
- name: dependencies
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"
- uses: lukka/get-cmake@latest
- name: Setup vcpkg
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
vcpkgDirectory: vcpkg
- name: Build
run: |
cmake -B "${{ env.CMAKE_BUILD_DIR }}"
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target mlspp