forked from aurelienpierreeng/ansel
-
Notifications
You must be signed in to change notification settings - Fork 0
266 lines (260 loc) · 8.56 KB
/
lin-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
name: Nightly Linux PKG
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
Win64:
if: github.repository == 'aurelienpierreeng/ansel' || github.event_name == 'workflow_dispatch'
name: Nightly Ansel Linux build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
btype:
- Release
compiler:
- { compiler: GNU12, CC: gcc-12, CXX: g++-12, packages: gcc-12 g++-12 }
eco: [-DBINARY_PACKAGE_BUILD=ON -DUSE_XMLLINT=OFF]
target:
- skiptest
generator:
- Ninja
branch:
- { code: "${{ github.ref_name }}", label: stable }
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
INSTALL_PREFIX: ${{ github.workspace }}/AppDir/usr
ECO: ${{ matrix.eco }}
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
GENERATOR: ${{ matrix.generator }}
TARGET: ${{ matrix.target }}
DARKTABLE_CLI: ${{ github.workspace }}/AppDir/usr/bin/ansel-cli
BRANCH: ${{ matrix.branch.code }}
BUILD_NAME: ${{ matrix.branch.label }}
steps:
- name: Install compiler ${{ matrix.compiler.compiler }}
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install \
${{ matrix.compiler.packages }}
- name: Install Base Dependencies
run: |
sudo apt-get -y install \
build-essential \
appstream-util \
desktop-file-utils \
gettext \
git \
gdb \
intltool \
libatk1.0-dev \
libavifile-0.7-dev \
libcairo2-dev \
libcolord-dev \
libcolord-gtk-dev \
libcmocka-dev \
libcups2-dev \
libcurl4-gnutls-dev \
libde265-dev \
libimage-exiftool-perl \
libinih-dev \
libgdk-pixbuf2.0-dev \
libglib2.0-dev \
libgraphicsmagick1-dev \
libgtk-3-dev \
libjpeg-dev \
libjson-glib-dev \
liblcms2-dev \
liblensfun-dev \
liblensfun-bin \
liblensfun-data-v1 \
liblensfun1 \
liblua5.3-dev \
libgmic-dev \
libopenexr-dev \
libopenjp2-7-dev \
libosmgpsmap-1.0-dev \
libpango1.0-dev \
libpng-dev \
libportmidi-dev \
libpugixml-dev \
librsvg2-dev \
libsaxon-java \
libsecret-1-dev \
libsoup2.4-dev \
libsqlite3-dev \
libtiff5-dev \
libwebp-dev \
libx11-dev \
libx265-dev \
libxml2-dev \
libxml2-utils \
ninja-build \
perl \
po4a \
python3-jsonschema \
xsltproc \
zlib1g-dev \
squashfs-tools \
libfuse2 \
gstreamer1.0-tools \
debianutils;
# squashfs, libfuse2, gstreamer are deps of AppImage builder, not Ansel
- name: Checkout ansel source
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}
fetch-depth: 2000
fetch-tags: true
submodules: true
path: src
# We manually build those dependencies because they are critical, so we
# could control the version we bundled
- name: Checkout exiv2 source
uses: actions/checkout@v4
with:
repository: 'Exiv2/exiv2'
ref: 'v0.28.1'
path: 'exiv2-src'
fetch-depth: 1
# Install manually compiled dependencies into system, so ansel will link
# against it and AppImage will grab it.
#
# Exiv2 uses `CURL_LIBRARIES` which is only set by `FindCURL.cmake` module
# so we fix compatibility with `CURLConfig.cmake`.
- name: Manually build and install exiv2
run: |
cd exiv2-src
sed -i 's/find_package(CURL REQUIRED)/find_package(CURL REQUIRED)\nif(TARGET CURL::libcurl)\nset(CURL_LIBRARIES CURL::libcurl)\nendif()/g' cmake/findDependencies.cmake
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DEXIV2_ENABLE_VIDEO=OFF \
-DEXIV2_ENABLE_NLS=ON \
-DEXIV2_ENABLE_XMP=ON \
-DEXIV2_ENABLE_CURL=ON \
-DEXIV2_ENABLE_WEBREADY=ON \
-DEXIV2_ENABLE_BMFF=ON
ninja -C build
sudo ninja -C build install
cd ..
# This is needed for libavif and libheif.
# aom is not on GitHub so cannot use the action.
- name: Manually build and install OAM AVI codec for libavif and libheif
run: |
git clone --branch v3.7.1 --depth 1 https://aomedia.googlesource.com/aom aom-src
cd aom-src
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBINARY_PACKAGE_BUILD=1 \
-DBUILD_SHARED_LIBS=ON \
-DAOM_TARGET_CPU=generic \
-DENABLE_DOCS=OFF \
-DENABLE_EXAMPLES=OFF \
-DENABLE_TESTS=OFF
ninja -C build
sudo ninja -C build install
cd ..
# This is needed on Ubuntu 20.04, which has no libavif-dev package.
- name: Checkout libavif source
uses: actions/checkout@v4
with:
repository: 'AOMediaCodec/libavif'
ref: 'v0.11.1'
path: 'libavif-src'
fetch-depth: 1
- name: Manually build and install libavif
run: |
cd libavif-src
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBINARY_PACKAGE_BUILD=1 \
-DAVIF_CODEC_AOM=ON
ninja -C build
sudo ninja -C build install
cd ..
- name: Checkout libheif source
uses: actions/checkout@v4
with:
repository: 'strukturag/libheif'
ref: 'v1.17.5'
path: 'libheif-src'
fetch-depth: 1
# We only needs libheif to handle HEIC and AVIF, so keep minimal
# dependencies for it, which are libde265 and x265 for HEIC and aom for
# AVIF.
- name: Manually build and install libheif
run: |
cd libheif-src
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_LIBDE265=ON \
-DWITH_X265=ON \
-DWITH_AOM_ENCODER=ON \
-DWITH_AOM_DECODER=ON
ninja -C build
sudo ninja -C build install
cd ..
- name: Update lensfun data for root
if: ${{ success() }}
run: |
sudo lensfun-update-data
- name: Build and Install
run: |
cd src
sh .ci/ci-script-appimage.sh
- name: Package upload
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: ansel.${{ env.BUILD_NAME }}.AppImage
path: ${{ env.SRC_DIR }}/build/Ansel-*-x86_64.AppImage*
retention-days: 90
upload_to_release:
runs-on: ubuntu-latest
env:
REPO: "https://github.com/aurelienpierreeng/ansel"
ROOM: "!SgRYbzspwqwwUgSQHC:matrix.org"
TAG: "v0.0.0"
needs: Win64
steps:
- name: Checkout ansel source
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ansel.stable.AppImage
- name: Update nightly release
uses: aurelienpierreeng/tip@master
with:
tag: ${{ env.TAG }}
rm: false
token: ${{ secrets.GITHUB_TOKEN }}
files: Ansel-*.AppImage*
- name: Install dependencies
run: |
python -m pip install simplematrixbotlib
- name: Notify Matrix
if: ${{ success() }}
run: |
FILENAME=$(find . -type f -iname "Ansel-*.AppImage")
MESSAGE="New AppImage [${FILENAME}](${{ env.REPO }}/releases/download/${{ env.TAG }}/${FILENAME}) built"
python .ci/matrix.py \
-m "$MESSAGE" \
-s ${{ secrets.MATRIX_SERVER }} \
-u ${{ secrets.MATRIX_USER }} \
-t ${{ secrets.MATRIX_ACCESS }} \
-r ${{ env.ROOM }}