-
Notifications
You must be signed in to change notification settings - Fork 114
158 lines (124 loc) · 3.91 KB
/
build.yml
File metadata and controls
158 lines (124 loc) · 3.91 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
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
name: 'Build'
'on':
push:
branches:
- master
pull_request:
branches:
- master
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/microsoft-prod.list
sudo apt-get -o Dpkg::Use-Pty=0 update
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get -o Dpkg::Use-Pty=0 install \
libcurl4-openssl-dev ${MATRIX_PACKAGES}
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: 'make'
env:
CC: ${{ matrix.build.CC || 'cc' }}
CFLAGS: ${{ matrix.build.CFLAGS }}
LDFLAGS: ${{ matrix.build.LDFLAGS }}
run: make
- name: 'sanity test'
run: ./trurl -v
- name: 'test'
env:
MATRIX_TEST_TARGET: ${{matrix.build.test}}
run: make ${MATRIX_TEST_TARGET}
cygwin:
name: 'Cygwin'
runs-on: windows-2022
steps:
- uses: cygwin/cygwin-install-action@f2009323764960f80959895c7bc3bb30210afe4d # v6
with:
site: https://mirrors.kernel.org/sourceware/cygwin/
work-vol: 'D:'
packages: libcurl-devel libcurl4 make gcc-core python3
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: 'make'
run: make
- name: 'sanity test'
run: ./trurl -v
- name: 'test'
run: make test
macos:
name: 'macOS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: 'make'
run: make
- name: 'sanity test'
run: ./trurl -v
- name: 'test'
run: make test
- name: 'cmake configure'
run: cmake -B bld -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=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@v5
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 -DCMAKE_BUILD_TYPE=Debug -DCURL_INCLUDE_DIR="$PWD"/curl/include -DCURL_LIBRARY="$PWD"/curl/lib/libcurl.dll.a
- name: 'cmake build'
run: cmake --build bld --verbose
- name: 'cmake configure log'
if: ${{ !cancelled() }}
run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
- name: 'cmake sanity test'
run: |
PATH="$HOME/curl/bin:$PATH"
bld/Debug/trurl -v
- name: 'cmake test'
run: |
PATH="$HOME/curl/bin:$PATH"
cmake --build bld --target trurl-test