-
Notifications
You must be signed in to change notification settings - Fork 2.4k
227 lines (226 loc) · 8.33 KB
/
CI.yaml
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
name: CI
on:
push:
pull_request:
schedule:
- cron: "0 9 * * 5"
jobs:
build:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- platform: x64
configuration: release
os: windows-2019
WITH_LIBSODIUM: ON
ENABLE_CURVE: ON
CMAKE_GENERATOR: Visual Studio 16 2019
MSVCVERSION: v142
MSVCYEAR: vs2019
ARTIFACT_NAME: v142-x64
ENABLE_DRAFTS: ON
- os: ubuntu-latest
BUILD_TYPE: default
PACKAGES: asciidoctor
DRAFT: disabled
POLLER: select
- os: ubuntu-latest
BUILD_TYPE: default
DRAFT: disabled
POLLER: poll
- os: ubuntu-latest
BUILD_TYPE: android
DRAFT: disabled
- os: ubuntu-latest
BUILD_TYPE: coverage
PACKAGES: libkrb5-dev libnorm-dev libpgm-dev libgnutls28-dev lcov
DRAFT: enabled
GSSAPI: enabled
PGM: enabled
NORM: enabled
TIPC: enabled
TLS: enabled
VMCI: enabled
- os: ubuntu-latest
BUILD_TYPE: valgrind
PACKAGES: valgrind libgnutls28-dev
DRAFT: enabled
- os: ubuntu-latest
BUILD_TYPE: cmake
CURVE: libsodium
DRAFT: enabled
PACKAGES: cmake libsodium-dev
TLS: enabled
- os: ubuntu-latest
BUILD_TYPE: cmake
CURVE: libsodium
DRAFT: enabled
GSSAPI: enabled
PACKAGES: cmake libsodium-dev libkrb5-dev
TLS: enabled
- os: ubuntu-latest
BUILD_TYPE: cmake
DRAFT: enabled
PACKAGES: cmake clang-format-11
DO_CLANG_FORMAT_CHECK: 1
- os: ubuntu-latest
BUILD_TYPE: default
PACKAGES: libkrb5-dev libnorm-dev libpgm-dev libgnutls28-dev libsodium-dev libnss3-dev libbsd-dev
CURVE: libsodium
ADDRESS_SANITIZER: enabled
DRAFT: enabled
- os: ubuntu-latest
BUILD_TYPE: default
PACKAGES: libkrb5-dev libnorm-dev libpgm-dev libgnutls28-dev libsodium-dev libnss3-dev libbsd-dev
CURVE: libsodium
GSSAPI: enabled
PGM: enabled
NORM: enabled
TIPC: enabled
IPv6: ON
TLS: enabled
USE_NSS: yes
VMCI: enabled
DRAFT: enabled
- os: ubuntu-latest
BUILD_TYPE: default
PACKAGES: libkrb5-dev libnorm-dev libpgm-dev libgnutls28-dev libsodium-dev libnss3-dev
CURVE: libsodium
GSSAPI: enabled
PGM: enabled
NORM: enabled
TIPC: enabled
IPv6: ON
TLS: enabled
USE_NSS: yes
VMCI: enabled
DRAFT: enabled
FORCE_98: enabled
CXX: clang++
- os: ubuntu-latest
BUILD_TYPE: abi-compliance-checker
PACKAGES: abi-dumper abi-compliance-checker
DRAFT: disabled
- os: ubuntu-latest
BUILD_TYPE: cmake
PACKAGES: clang-tidy clang-tools
DRAFT: enabled
CXX: clang++
- os: macos-latest
BUILD_TYPE: default
PACKAGES: automake autoconf libtool
DRAFT: enabled
- os: macos-latest
BUILD_TYPE: default
PACKAGES: automake autoconf libtool libsodium
CURVE: libsodium
DRAFT: disabled
env:
platform: ${{ matrix.platform }}
configuration: ${{ matrix.configuration }}
WITH_LIBSODIUM: ${{ matrix.WITH_LIBSODIUM }}
ENABLE_CURVE: ${{ matrix.ENABLE_CURVE }}
CMAKE_GENERATOR: ${{ matrix.CMAKE_GENERATOR }}
MSVCVERSION: ${{ matrix.MSVCVERSION }}
MSVCYEAR: ${{ matrix.MSVCYEAR }}
ARTIFACT_NAME: ${{ matrix.ARTIFACT_NAME }}
ENABLE_DRAFTS: ${{ matrix.ENABLE_DRAFTS }}
SODIUM_INCLUDE_DIR: ${{ github.workspace }}\libsodium\src\libsodium\include"
SODIUM_LIBRARY_DIR: ${{ github.workspace }}\libsodium\bin\${{ matrix.platform }}\${{ matrix.configuration }}\${{ matrix.MSVCVERSION }}\dynamic"
LIBZMQ_SRCDIR: ${{ github.workspace }}\libzmq
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
CURVE: ${{ matrix.CURVE }}
DRAFT: ${{ matrix.DRAFT }}
ADDRESS_SANITIZER: ${{ matrix.ADDRESS_SANITIZER }}
DO_CLANG_FORMAT_CHECK: ${{ matrix.DO_CLANG_FORMAT_CHECK }}
FORCE_98: ${{ matrix.FORCE_98 }}
CXX: ${{ matrix.CXX }}
GSSAPI: ${{ matrix.GSSAPI }}
PGM: ${{ matrix.PGM }}
NORM: ${{ matrix.NORM }}
TIPC: ${{ matrix.TIPC }}
IPv6: ${{ matrix.IPv6 }}
TLS: ${{ matrix.TLS }}
USE_NSS: ${{ matrix.USE_NSS }}
VMCI: ${{ matrix.VMCI }}
POLLER: ${{ matrix.POLLER }}
steps:
- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: matrix.os == 'windows-2019'
- uses: actions/checkout@v2
if: matrix.WITH_LIBSODIUM == 'ON'
with:
repository: jedisct1/libsodium
ref: stable
path: libsodium
- name: Compile libsodium
if: matrix.WITH_LIBSODIUM == 'ON' && matrix.os == 'windows-2019'
shell: cmd
working-directory: libsodium
run: msbuild /v:minimal /p:Configuration=%Configuration%DLL builds\msvc\%MSVCYEAR%\libsodium\libsodium.vcxproj
- name: Copy libsodium
if: matrix.WITH_LIBSODIUM == 'ON' && matrix.os == 'windows-2019'
shell: powershell
working-directory: libsodium
run: Copy-Item "bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\libsodium.lib" -Destination "bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\sodium.lib"
- uses: actions/checkout@v2
with:
path: libzmq
- run: md build_libzmq
shell: cmd
if: matrix.os == 'windows-2019'
- name: build-win
if: matrix.os == 'windows-2019'
shell: cmd
working-directory: build_libzmq
run: |
cmake -D CMAKE_INCLUDE_PATH="%SODIUM_INCLUDE_DIR%" -D CMAKE_LIBRARY_PATH="%SODIUM_LIBRARY_DIR%" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D ENABLE_DRAFTS="%ENABLE_DRAFTS%" -D ENABLE_ANALYSIS="%ENABLE_ANALYSIS%" -D ENABLE_CURVE="%ENABLE_CURVE%" -D API_POLLER="%API_POLLER%" -D POLLER="%POLLER%" %EXTRA_FLAGS% -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D LIBZMQ_WERROR="%LIBZMQ_WERROR%" -G "%CMAKE_GENERATOR%" "%LIBZMQ_SRCDIR%"
cmake --build . --config %configuration% --target install -- -verbosity:Minimal -maxcpucount
- name: test
if: matrix.os == 'windows-2019'
shell: cmd
working-directory: build_libzmq
run: ctest -C "%Configuration%"
- name: Add debian packages
if: matrix.os == 'ubuntu-latest' && (matrix.BUILD_TYPE != 'coverage' || github.repository == 'zeromq/libzmq')
uses: myci-actions/add-deb-repo@10
with:
repo-name: obs
repo: deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_20.04/ ./
keys-asc: https://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_20.04/Release.key
install: ${{ matrix.PACKAGES }}
- name: Add brew packages
if: matrix.os == 'macos-latest'
shell: bash
run: brew install ${{ matrix.PACKAGES }}
- name: build
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest') && (matrix.BUILD_TYPE != 'coverage' || github.repository == 'zeromq/libzmq')
shell: bash
working-directory: libzmq
run: ./ci_build.sh
- name: coveralls
if: matrix.BUILD_TYPE == 'coverage' && github.repository == 'zeromq/libzmq'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: /home/runner/work/libzmq/libzmq/libzmq/lcov.info
cron:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
strategy:
fail-fast: false
env:
BUILD_TYPE: cmake
CXX: clang++
CLANG_TIDY: clang-tidy
steps:
- name: Add debian packages
run: apt-get install --yes clang-tidy clang-tools
- name: build
shell: bash
working-directory: libzmq
run: ./ci_build.sh