-
Notifications
You must be signed in to change notification settings - Fork 99
304 lines (284 loc) · 9.52 KB
/
Copy pathnightly.yml
File metadata and controls
304 lines (284 loc) · 9.52 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
name: libsixel Nightly build (scheduled pre-release)
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
nightly:
name: ${{ matrix.branch }} • ${{ matrix.os }} ${{ matrix.sys }}
runs-on: ${{ matrix.runner || matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# ubuntu: [master, develop] x [x86_64, i686]
- branch: master
os: ubuntu-latest
runner: ubuntu-latest
sys: x86_64
- branch: develop
os: ubuntu-latest
runner: ubuntu-latest
sys: x86_64
- branch: master
os: ubuntu-latest
runner: ubuntu-latest
sys: i686
- branch: develop
os: ubuntu-latest
runner: ubuntu-latest
sys: i686
# macos-latest (arm): [master, develop] x [aarch64]
- branch: master
os: macos-latest
runner: macos-latest
sys: aarch64
- branch: develop
os: macos-latest
runner: macos-latest
sys: aarch64
# macos-13 (intel): [master, develop] x [x86_64]
- branch: master
os: macos-13
runner: macos-13
sys: x86_64
- branch: develop
os: macos-13
runner: macos-13
sys: x86_64
# windows-mingw: [master, develop] x [MINGW64, UCRT64, CLANG64, MINGW32]
- branch: master
os: windows-latest
msystem: MINGW64
runner: windows-latest
compiler: gcc
sys: x86_64-MINGW64
- branch: master
os: windows-latest
msystem: UCRT64
runner: windows-latest
compiler: gcc
sys: x86_64-UCRT64
- branch: master
os: windows-latest
msystem: CLANG64
runner: windows-latest
compiler: clang
sys: x86_64-CLANG64
- branch: master
os: windows-latest
msystem: MINGW32
runner: windows-latest
compiler: gcc
sys: i686-MINGW32
- branch: develop
os: windows-latest
msystem: MINGW64
runner: windows-latest
compiler: gcc
sys: x86_64-MINGW64
- branch: develop
os: windows-latest
msystem: UCRT64
runner: windows-latest
compiler: gcc
sys: x86_64-UCRT64
- branch: develop
os: windows-latest
msystem: CLANG64
runner: windows-latest
compiler: clang
sys: x86_64-CLANG64
- branch: develop
os: windows-latest
msystem: MINGW32
runner: windows-latest
compiler: gcc
sys: i686-MINGW32
# windows-msvc: [develop] x [x86_64] x [msvc]
- branch: develop
os: windows-latest
msystem: MSYS
runner: windows-latest
compiler: cl
sys: x86_64-msvc
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ matrix.branch }}
- name: Install multilib toolchain (Linux i686)
if: runner.os == 'Linux' && (matrix.sys || '') == 'i686'
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib
- name: Setup MSYS2 (Windows, MinGW/UCRT/Clang)
if: runner.os == 'Windows' && matrix.compiler != 'cl' && matrix.msystem != 'MSYS'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
make
zip
pacboy: >-
cc:p
- name: Setup MSYS2 (Windows, MSVC)
if: runner.os == 'Windows' && matrix.compiler == 'cl'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
make
zip
- name: Setup MSVC developer env (vcvars)
if: ${{ runner.os == 'Windows' && matrix.compiler == 'cl' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Configure and build (non-Windows)
if: runner.os != 'Windows'
shell: bash
run: |
if [ '${{ matrix.sys || '' }}' = 'i686' ]; then
export CC="gcc -m32"
export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
fi
./configure \
--without-png \
--without-jpeg \
--without-libcurl \
--without-bashcompletiondir \
--without-zshcompletiondir \
--disable-python \
--disable-dependency-tracking
make -j$(getconf _NPROCESSORS_ONLN)
make check
mkdir -p libsixel
make install DESTDIR=$(pwd)/libsixel
cp README.md LICENSE* libsixel/
zip -r libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}.zip libsixel
- name: Configure and build (Windows, not MSVC)
if: ${{ runner.os == 'Windows' && matrix.compiler != 'cl' }}
shell: msys2 {0}
run: |
./configure \
--without-png \
--without-jpeg \
--without-libcurl \
--without-bashcompletiondir \
--without-zshcompletiondir \
--disable-python \
--disable-dependency-tracking
make -j$(getconf _NPROCESSORS_ONLN)
make check
mkdir -p libsixel
make install DESTDIR=$(pwd)/libsixel
cp README.md LICENSE* libsixel/
zip -r libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}.zip libsixel
- name: Configure and build (Windows, MSVC)
if: ${{ runner.os == 'Windows' && matrix.compiler == 'cl' }}
shell: msys2 {0}
run: |
VCVARS="$(cygpath -w "$VSINSTALLDIR")\\VC\\Auxiliary\\Build\\vcvarsall.bat"
cmd //c call "${VCVARS}" x64 \>nul \&\& set
eval $(
cmd //c call "${VCVARS}" x64 \>nul \&\& set |
grep -i '^\(PATH\|INCLUDE\|LIB\|LIBPATH\)' |
while IFS== read -r key val; do
case "$key" in PATH|Path)
echo export PATH=\"$(echo "$val" | tr \; \\n | while read -r p; do cygpath "$p"; done | grep ^/ | tr \\n :)\"\;
;;
*)
echo export "$key"=\""$val"\"\;
;;
esac;
done
)
if test -f "${SHELL} $(pwd)/tools/ar-msvc.sh"; then
export AR="$(pwd)/tools/ar-msvc.sh"
export ARFLAGS=
else
export AR="${SHELL} $(pwd)/ar-lib lib"
export ARFLAGS=cr
fi
./configure CC=cl LD=link NM="dumpbin -symbols" STRIP=: RANLIB=: \
--host=x86_64-pc-windows-msvc \
--without-png \
--without-jpeg \
--without-libcurl \
--without-bashcompletiondir \
--without-zshcompletiondir \
--disable-python \
--disable-dependency-tracking
make
make check V=1
mkdir -p libsixel
make install DESTDIR=$(pwd)/libsixel
cp README.md LICENSE* libsixel/
zip -r libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}.zip libsixel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}
path: libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}.zip
retention-days: 7
overwrite: true
compression-level: 0
release:
needs:
- nightly
runs-on: ubuntu-latest
concurrency:
group: nightly-release-aggregate
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
pattern: libsixel-*
merge-multiple: true
- name: Debug downloaded artifacts
shell: bash
run: |
echo "Downloaded files:"
find artifacts -type f -exec ls -lh {} \; || echo "No files found"
echo ""
echo "Artifacts directory size:"
du -sh artifacts || echo "No artifacts directory found"
- name: Create and publish nightly pre-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME="nightly-latest"
if gh release view "$TAG_NAME" --repo ${{ github.repository }} >/dev/null 2>&1; then
echo "Updating existing $TAG_NAME"
gh release edit "$TAG_NAME" \
--title "libsixel Nightly" \
--notes "Nightly from multiple branches/OS. Generated on $(date -u +'%Y-%m-%dT%H:%M:%SZ') (UTC)" \
--prerelease \
--repo ${{ github.repository }}
else
echo "Creating $TAG_NAME"
gh release create "$TAG_NAME" \
--title "libsixel Nightly" \
--notes "Nightly from multiple branches/OS. Generated on $(date -u +'%Y-%m-%dT%H:%M:%SZ') (UTC)" \
--prerelease \
--repo ${{ github.repository }}
fi
gh release upload "$TAG_NAME" artifacts/*.zip --clobber --repo ${{ github.repository }}
# emacs Local Variables:
# emacs mode: c
# emacs tab-width: 4
# emacs indent-tabs-mode: nil
# emacs c-basic-offset: 4
# emacs End:
# vim: set ft=awk et ts=4 sw=0 sts=-1 fdm=marker fdl=0: