-
Notifications
You must be signed in to change notification settings - Fork 114
220 lines (175 loc) · 5.82 KB
/
build.yml
File metadata and controls
220 lines (175 loc) · 5.82 KB
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
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
name: 'Build'
'on':
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
ubuntu:
name: 'Linux'
runs-on: ubuntu-latest
strategy:
matrix:
build:
- name: 'default'
install_packages: valgrind
test: test-memory
- name: 'clang sanitizers'
install_packages: clang
test: test
CC: clang
CFLAGS: -fsanitize=address,undefined,signed-integer-overflow -Wformat -Werror=format-security -Werror=array-bounds -g
LDFLAGS: -fsanitize=address,undefined,signed-integer-overflow -g
steps:
- name: 'install prereqs'
env:
MATRIX_PACKAGES: ${{ matrix.build.install_packages }}
run: |
sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources}
sudo apt-get -o Dpkg::Use-Pty=0 update
sudo apt-get -o Dpkg::Use-Pty=0 install \
libcurl4-openssl-dev ${MATRIX_PACKAGES}
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'Makefile make'
env:
CC: ${{ matrix.build.CC || 'cc' }}
CFLAGS: ${{ matrix.build.CFLAGS }}
LDFLAGS: ${{ matrix.build.LDFLAGS }}
run: make
- name: 'Makefile sanity test'
run: ./trurl -v
- name: 'Makefile test'
if: ${{ matrix.build.test != 'test-memory' }}
env:
MATRIX_TEST_TARGET: ${{ matrix.build.test }}
run: make ${MATRIX_TEST_TARGET}
- name: 'cmake configure'
run: cmake -B bld -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON
- name: 'cmake build'
run: cmake --build bld
- name: 'cmake install'
run: cmake --install bld
- name: 'cmake sanity test'
run: bld/trurl -v
- name: 'cmake test'
env:
MATRIX_TEST_TARGET: ${{ matrix.build.test }}
run: cmake --build bld --target trurl-"${MATRIX_TEST_TARGET}"
cygwin:
name: 'Cygwin'
runs-on: windows-2022
defaults:
run:
shell: D:\cygwin\bin\bash.exe '{0}'
env:
SHELLOPTS: 'igncr'
steps:
- uses: cygwin/cygwin-install-action@711d29f3da23c9f4a1798e369a6f01198c13b11a # v6.1
with:
site: https://mirrors.kernel.org/sourceware/cygwin/
work-vol: 'D:'
packages: gcc-core make cmake libcurl-devel python3
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'Makefile make'
run: |
PATH=/usr/bin
make
- name: 'Makefile sanity test'
run: |
PATH=/usr/bin
./trurl -v
- name: 'Makefile test'
run: |
PATH=/usr/bin
make test
- name: 'cmake configure'
run: |
PATH=/usr/bin
cmake -B bld -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON
- name: 'cmake build'
run: |
PATH=/usr/bin
cmake --build bld
- name: 'cmake configure log'
if: ${{ !cancelled() }}
run: |
PATH=/usr/bin
cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
- name: 'cmake install'
run: |
PATH=/usr/bin
cmake --install bld
- name: 'cmake sanity test'
run: |
PATH=/usr/bin
bld/trurl -v
- name: 'cmake test'
run: |
PATH=/usr/bin
cmake --build bld --target trurl-test
macos:
name: 'macOS'
runs-on: macos-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'Makefile make'
run: make
- name: 'Makefile sanity test'
run: ./trurl -v
- name: 'Makefile test'
run: make test
- name: 'cmake configure'
run: cmake -B bld -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON
- name: 'cmake build'
run: cmake --build bld
- name: 'cmake install'
run: cmake --install bld
- name: 'cmake sanity test'
run: bld/trurl -v
- name: 'cmake test'
run: cmake --build bld --target trurl-test
windows:
name: 'Windows'
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'install prereqs'
run: |
mkdir curl
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 240 --retry 3 --retry-connrefused \
--location --proto-redir =https 'https://curl.se/windows/latest.cgi?p=win64-mingw.tar.xz' | tar --strip-components=1 -xJ --directory=curl
- name: 'cmake configure'
run: cmake -B bld -DCURL_INCLUDE_DIR="$PWD"/curl/include -DCURL_LIBRARY="$PWD"/curl/lib/libcurl.dll.a -DTRURL_WERROR=ON
- name: 'cmake build'
run: cmake --build bld --config Debug --verbose
- name: 'cmake configure log'
if: ${{ !cancelled() }}
run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
- name: 'cmake sanity test'
run: |
PATH="$PWD/curl/bin:$PATH"
bld/Debug/trurl -v
- name: 'cmake test'
run: |
PATH="$PWD/curl/bin:$PATH"
cmake --build bld --target trurl-test