-
Notifications
You must be signed in to change notification settings - Fork 36
313 lines (302 loc) · 11.4 KB
/
nightly.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
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
305
306
307
308
309
310
311
312
313
name: nightly packages
# based on the same for darktable-org/darktable
# i suppose that makes it GPLv3.
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
AppImage:
if: github.repository == 'hanatos/vkdt'
name: nightly appimage
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
glfw:
- { package: pentablet }
- { package: glfw3.4 }
raw:
- { backend: rawler }
- { backend: rawspeed }
compiler:
- { compiler: clang, CC: clang-17, CXX: clang++-17, packages: clang-17 libomp-17-dev }
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
VKDT_CLI: ${{ github.workspace }}/AppDir/usr/bin/vkdt-cli
BRANCH: master
GLFW: ${{ matrix.glfw.package }}
RAW: ${{ matrix.raw.backend }}
steps:
- name: update apt and install clang
run: |
# Remove azure mirror because it is unreliable and sometimes unpredictably leads to failed CI
sudo sed -i 's/azure\.//' /etc/apt/sources.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-17 main"
sudo apt-get update
sudo apt-get -y install \
${{ matrix.compiler.packages }}
- name: install base dependencies
run: |
sudo apt-get -y install \
build-essential \
appstream-util \
git \
glslang-tools \
libvulkan-dev \
libjpeg-dev \
zlib1g-dev \
libasound2-dev \
libavformat-dev \
libavcodec-dev \
libxkbcommon-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
libfuse2 \
appstream;
- name: install extra deps for rawler
if: matrix.raw.backend == 'rawler'
run: |
sudo apt-get -y install \
rustc \
cargo
curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: install extra deps for rawspeed
if: matrix.raw.backend == 'rawspeed'
run: |
sudo apt-get -y install \
libpugixml-dev \
libexiv2-dev
- uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}
# We have to fetch the entire history to correctly generate the version for the AppImage filename
fetch-depth: 0
- name: configure for local glfw
run: |
echo "VKDT_GLFW_CFLAGS=-I${{ github.workspace }}/glfw/include" >> bin/config.mk
echo "VKDT_GLFW_LDFLAGS=-I${{ github.workspace }}/glfw/build/src -lglfw3" >> bin/config.mk
echo "export VKDT_GLFW_CFLAGS VKDT_GLFW_LDFLAGS" >> bin/config.mk
- name: build new glfw without pentablet support
if: matrix.glfw.package != 'pentablet'
run: |
sudo apt-get -y install libglfw3-dev libxrandr-dev
git clone --branch master https://github.com/glfw/glfw glfw
cd glfw
git checkout 3.4
cmake -S . -B build -DGLFW_BUILD_WAYLAND=1 -DGLFW_BUILD_X11=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
sudo cmake --install build
cd ..
- name: build glfw with pentablet support
if: matrix.glfw.package == 'pentablet'
run: |
sudo apt-get -y install libglfw3-dev libxrandr-dev
git clone --branch master --depth 1 https://github.com/hanatos/glfw glfw
cd glfw
cmake -S . -B build -DGLFW_BUILD_WAYLAND=1 -DGLFW_BUILD_X11=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
sudo cmake --install build
cd ..
echo "VKDT_USE_PENTABLET=1" >> bin/config.mk
echo "export VKDT_USE_PENTABLET" >> bin/config.mk
- name: update config.mk for rawspeed
if: matrix.raw.backend == 'rawspeed'
run: |
cat >> bin/config.mk << 'EOF'
VKDT_USE_RAWINPUT=1
export VKDT_USE_RAWINPUT
VKDT_PUGIXML_CFLAGS=$(eval VKDT_PUGIXML_CFLAGS := $$(shell pkg-config --cflags pugixml))$(VKDT_PUGIXML_CFLAGS)
VKDT_PUGIXML_LDFLAGS=$(eval VKDT_PUGIXML_LDFLAGS := $$(shell pkg-config --libs pugixml))$(VKDT_PUGIXML_LDFLAGS)
export VKDT_PUGIXML_CFLAGS VKDT_PUGIXML_LDFLAGS
VKDT_USE_EXIV2=1
export VKDT_USE_EXIV2
VKDT_EXIV2_CFLAGS=$(eval VKDT_EXIV2_CFLAGS := $$(shell pkg-config --cflags exiv2))$(VKDT_EXIV2_CFLAGS)
VKDT_EXIV2_LDFLAGS=$(eval VKDT_EXIV2_LDFLAGS := $$(shell pkg-config --libs exiv2))$(VKDT_EXIV2_LDFLAGS)
export VKDT_EXIV2_CFLAGS VKDT_EXIV2_LDFLAGS
CC=clang-17
CXX=clang++-17
export CC CXX
EOF
- name: build and install
run: |
bash bin/mkappimg.sh
mv vkdt-*.AppImage $(echo vkdt-*.AppImage | sed "s/vkdt-/vkdt-${{ env.RAW }}-${{ env.GLFW }}-/")
- name: check if it runs
run: |
./vkdt-*.AppImage --version
# *sigh* we'd like to do this but the github runners don't have a gpu:
# sudo apt-get -y remove \
# git \
# glslang-tools \
# libvulkan-dev \
# libjpeg-dev \
# libglfw3-dev \
# zlib1g-dev \
# libpugixml-dev \
# libfreetype-dev \
# libexiv2-dev \
# libasound2-dev \
# libavformat-dev \
# libavcodec-dev \
# libxkbcommon-dev \
# libxinerama-dev \
# libxcursor-dev \
# libxi-dev
# ./vkdt-*.AppImage cli -g bin/examples/spheres.cfg --config frames:1
- name: package upload
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
path: vkdt-*.AppImage*
name: artifact-appimage-${{ env.RAW }}-${{ env.GLFW }}
retention-days: 1
WindowsRawler:
if: github.repository == 'hanatos/vkdt'
name: nightly vkdt windows with rawler backend
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
msystem:
- UCRT64
defaults:
run:
shell: msys2 {0}
env:
SRC_DIR: ${{ github.workspace }}/src
INSTALL_PREFIX: ${{ github.workspace }}/install
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
install: >-
git
rsync
make
zip
unzip
wget
vim
pacboy: >-
cc:p
gcc-libs:p
dlfcn:p
glfw:p
freetype:p
ffmpeg:p
vulkan-devel:p
glslang:p
libjpeg-turbo:p
zlib:p
omp:p
cmake:p
pugixml:p
update: false
- run: git config --global core.autocrlf input
shell: bash
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: src
- name: install rust
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: install rust for msys2
run: |
/c/Users/runneradmin/.cargo/bin/rustup toolchain install stable-x86_64-pc-windows-gnu
/c/Users/runneradmin/.cargo/bin/rustup default stable-x86_64-pc-windows-gnu
- name: build and install
run: |
export PATH=/c/Users/runneradmin/.cargo/bin/:$PATH
echo "VKDT_USE_RAWINPUT=2" >> ${SRC_DIR}/bin/config.mk
echo "export VKDT_USE_RAWINPUT" >> ${SRC_DIR}/bin/config.mk
echo "VKDT_USE_EXIV2=0" >> ${SRC_DIR}/bin/config.mk
echo "export VKDT_USE_EXIV2" >> ${SRC_DIR}/bin/config.mk
make -C ${SRC_DIR}
make DESTDIR=${INSTALL_PREFIX} -C ${SRC_DIR} install
- name: bundle exiftool
run: |
wget https://exiftool.org/exiftool-12.76.zip
unzip exiftool-12.76.zip
mv exiftool*exe ${INSTALL_PREFIX}/usr/lib/vkdt/exiftool.exe
- name: check if it runs
run: |
${INSTALL_PREFIX}/usr/lib/vkdt/vkdt.exe --version
- name: get version info
run: |
cd ${SRC_DIR}
echo "VERSION=$(git describe)" >> $GITHUB_ENV
([[ ${MSYSTEM_CARCH} == x86_64 ]] && echo "SYSTEM=win64" || echo "SYSTEM=woa64") >> $GITHUB_ENV
- name: create zip package
run: |
cd ${INSTALL_PREFIX}/usr/lib
# find and copy required libraries
ldd vkdt/vkdt.exe | grep '/ucrt64/bin/' | awk '{print($1)}' > dllhell
find vkdt/ -name "*lib*.so" -exec ldd {} \; | grep '/ucrt64/bin/' | awk '{print($1)}' | sort | uniq >> dllhell
for i in $(cat dllhell); do cp /ucrt64/bin/${i} vkdt/; done
zip -r vkdt-rawler-${{ env.VERSION }}-${{ env.SYSTEM }}.zip vkdt/
- name: package upload
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
path: ${{ env.INSTALL_PREFIX}}/usr/lib/vkdt-rawler-${{ env.VERSION }}-${{ env.SYSTEM }}.zip
name: artifact-windows-rawler
retention-days: 1
upload_to_release:
permissions:
contents: write
runs-on: ubuntu-latest
needs: [AppImage, WindowsRawler]
steps:
- name: download artifacts
uses: actions/download-artifact@v4
- name: update nightly release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
prerelease: true
name: 'vkdt nightly build $$'
body: |
this is an automated nightly build of vkdt.
it may contain pre-release quality features, use with care :)
appimage
===================================================
the appimage compiles in a lot of features
(mlv, v4l, asound, i-vid, o-vid, rawspeed, exiv2, freetype)
but not all
(no quake).
you also currently need the `exiftool` binary installed on your
host system to enable all features (metadata handling).
appimage with rawler
====================
use this for CR3 raws (newer canon cameras) and for older ubuntu
that don't have a recent libstdc++, uses the rust-based backend
instead of the c++-based rawspeed which does not have CR3 support.
also it builds a custom glfw with pentablet/wacom support
appimage with pentablet
=======================
links against a custom version of glfw, enabling drawing of masks via pentablet/wacom device.
only available in xorg version currently.
windows with rawler
===================
the windows version is pre-alpha and has known issues, see https://github.com/hanatos/vkdt/issues/103 .
it compiles less features
(freetype mlv, i-vid, o-vid)
and leaves out many
(no v4l, no sound, no quake, no pentablet support).
you can help by reporting more issues (or maybe even fixing, if you can ;) ).
files: |
artifact-appimage-rawspeed-glfw3.4/*
artifact-appimage-rawspeed-pentablet/*
artifact-appimage-rawler-glfw3.4/*
artifact-appimage-rawler-pentablet/*
artifact-windows-rawler/*