-
-
Notifications
You must be signed in to change notification settings - Fork 63
executable file
·329 lines (271 loc) · 10.4 KB
/
build.yaml
File metadata and controls
executable file
·329 lines (271 loc) · 10.4 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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# Test build process on various OS and Configutations
name: Build
on:
workflow_dispatch:
env:
APPIMAGE_DIR: package/AppImage
jobs:
build-appimage:
name: "${{ matrix.name }} (${{ matrix.arch }})"
runs-on: ${{ matrix.runs-on }}
outputs:
output_version: ${{ steps.converseen-version.outputs.version }}
strategy:
matrix:
include:
- runs-on: ubuntu-latest
name: Build AppImage
arch: x86_64
- runs-on: ubuntu-24.04-arm
name: Build AppImage
arch: aarch64
container:
image: ghcr.io/pkgforge-dev/archlinux:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Converseen Version Number
id: converseen-version
run: |
file_content=$(<package/AppImage/build/PKGBUILD)
VERSION=$(echo "$file_content" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Version: $VERSION"
- name: Create builder user
run: |
pacman -Sy --noconfirm shadow sudo base-devel
# useradd -m -u 1000 -s /bin/bash builder
useradd -m builder
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown -Rv builder:builder $GITHUB_WORKSPACE
- name: Get dependencies
run: |
cd $APPIMAGE_DIR
chmod +x ./get-dependencies.sh && ./get-dependencies.sh
- name: Install Custom ImageMagick
run: |
cd $APPIMAGE_DIR
chmod +x ./build-imagemagick.sh && ./build-imagemagick.sh
- name: Build Converseen
run: |
cd $APPIMAGE_DIR/build
sed -i 's|git+\$url.git#tag=v\$pkgver|git+\$url.git|' PKGBUILD
sudo -u builder makepkg -si --noconfirm
- name: Make AppImage
run: |
cd "$APPIMAGE_DIR"
chmod +x ./*-appimage.sh && ./*-appimage.sh
- name: Upload artifact
uses: actions/upload-artifact@v4.6.2
with:
name: AppImage-${{ matrix.arch }}
path: ${{ env.APPIMAGE_DIR }}/dist
build-linux-qt6-im6:
name: Converseen Linux Build (Qt6 + ImageMagick6)
runs-on: ubuntu-latest
steps:
- name: Checkout Converseen
uses: actions/checkout@v4
with:
path: Converseen
- name: Install Dependencies
run: |
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get upgrade
sudo apt install -y git cmake libglx-dev libgl1-mesa-dev qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-base-dev-tools qt6-l10n-tools qt6-multimedia-dev
sudo apt install -y libtool pkg-config build-essential libssl-dev
sudo apt install -y libmagick++-dev libmagickcore-dev libmagickwand-dev imagemagick
- name: Build Converseen
run: |
cd Converseen
mkdir build
cd build
cmake .. -DUSE_QT6=yes
make
snap-build:
name: Converseen Snap Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Snap
uses: snapcore/action-build@v1
id: snapcraft
with:
path: package/Snap
build-windows:
name: Converseen Windows Build
runs-on: windows-2022
strategy:
matrix:
include:
- qt_version: '5.15.2'
qt_arch: 'win32_msvc2019'
imagemagick_arch: 'x86'
vs_arch: 'x86'
bits: '32bit'
cmake_extra_flags: '-DOpenSSL_Win32_Path="..\..\openssl-1.1\x86\bin"'
- qt_version: '6.10.1'
qt_arch: 'win64_msvc2022_64'
imagemagick_arch: 'x64'
vs_arch: 'x64'
bits: '64bit'
cmake_extra_flags: '-DUSE_QT6=yes'
steps:
- name: Download ImageMagick for Windows (${{ matrix.bits }})
shell: powershell
run: |
# Get latest version number from GitHub
$gitTags = git ls-remote --sort="version:refname" --tags https://github.com/ImageMagick/ImageMagick.git
$lastTagLine = $gitTags[-1]
$lastTagVersion = $lastTagLine -replace '.*?(\d+\.\d+\.\d+-\d+).*', '$1'
$latestVersionNumber = $lastTagVersion
Write-Host "Latest ImageMagick Version Found: $latestVersionNumber"
Invoke-WebRequest -Uri "https://imagemagick.org/archive/binaries/ImageMagick-$latestVersionNumber-Q16-HDRI-${{ matrix.imagemagick_arch }}-dll.exe" -OutFile ImageMagick-Installer.exe
- name: Install ImageMagick for Windows (${{ matrix.bits }})
shell: cmd
run: |
ImageMagick-Installer.exe /MERGETASKS=install_devel /VERYSILENT /DIR=ImageMagick
- name: Checkout Converseen
uses: actions/checkout@v4
with:
path: Converseen
- name: Install Qt ${{ matrix.qt_version }} (${{ matrix.bits }})
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt_version }}'
host: 'windows'
target: 'desktop'
arch: '${{ matrix.qt_arch }}'
install-deps: 'true'
set-env: 'true'
- name: Download OpenSSL (32 bit only)
shell: powershell
if: matrix.vs_arch == 'x86'
run: |
Invoke-WebRequest -Uri "https://download.firedaemon.com/FireDaemon-OpenSSL/openssl-1.1.1w.zip" -OutFile "openssl-1.1.1w.zip"
Expand-Archive -Path "openssl-1.1.1w.zip" -DestinationPath . -Force
- name: Build Converseen (Qt ${{ matrix.qt_version }} ${{ matrix.bits }})
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.vs_arch }}
cd Converseen
mkdir build
cd build
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DImageMagick_EXECUTABLE_DIR="${{ github.workspace }}\ImageMagick" ${{ matrix.cmake_extra_flags }} ..
nmake
cpack -B package
- name: Prepare Artifacts (Qt ${{ matrix.qt_version }} ${{ matrix.bits }})
shell: cmd
run: |
mkdir artifacts-qt${{ matrix.qt_version }}-${{ matrix.bits }}
cp Converseen/build/package/*.msi artifacts-qt${{ matrix.qt_version }}-${{ matrix.bits }}/
cp Converseen/build/package/*.zip artifacts-qt${{ matrix.qt_version }}-${{ matrix.bits }}/
- uses: actions/upload-artifact@v4
with:
name: Windows-Qt${{ matrix.qt_version }}-${{ matrix.bits }}
path: 'artifacts-qt${{ matrix.qt_version }}-${{ matrix.bits }}'
build-macos:
name: Converseen macOS Build
runs-on: macos-14
env:
BASE_DIR: ${{ github.workspace }}/im_build
WORKING_DIR: ${{ github.workspace }}
steps:
- name: Install dependencies
run: |
set -e
export HOMEBREW_NO_AUTO_UPDATE=1
brew install pkg-config freetype jpeg-turbo libheif libpng libtiff libtool libzip openexr openjpeg webp libraw ghostscript
- name: Checkout Converseen
uses: actions/checkout@v4
with:
path: Converseen
- name: Set Environment
id: set-env
run: |
file_content=$(tr -d '\r' <converseen/package/macOS/version.txt)
VERSION=$(echo "$file_content" | grep -oE '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')
BUILD=$(echo "$file_content" | grep -oE '[0-9]+$')
export LIB_DIR="${BASE_DIR}/lib"
export LOCAL_LIB="/usr/local/lib"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "BUILD=$BUILD" >> $GITHUB_ENV
echo "LIB_DIR=$LIB_DIR" >> $GITHUB_ENV
echo "LOCAL_LIB=$LOCAL_LIB" >> $GITHUB_ENV
echo "ver=$VERSION" >> "$GITHUB_OUTPUT"
echo "Version: $VERSION"
echo "Build Number: $BUILD"
- name: Download ImageMagick
run: |
wget https://imagemagick.org/archive/ImageMagick.tar.gz
tar -xzvf ImageMagick.tar.gz
- name: Build ImageMagick
run: |
cd ImageMagick-*
export CFLAGS="-O2"
export CXXFLAGS="-O2"
export LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-headerpad,0x2000"
# Fix openmp compile error with libraw
sed -i '' 's/-fopenmp//g' $(brew --prefix libraw)/lib/pkgconfig/libraw.pc
sed -i '' 's/-fopenmp//g' $(brew --prefix libraw)/lib/pkgconfig/libraw_r.pc
./configure --prefix=${{ github.workspace }}/im_build \
--disable-silent-rules \
--disable-dependency-tracking \
--without-perl \
--disable-installed \
--with-quantum-depth=16 \
--disable-opencl \
--enable-shared \
--with-freetype=yes \
--with-gvc=no \
--with-openjp2 \
--with-openexr \
--with-webp=yes \
--with-heic=yes \
--with-raw=yes \
--with-zip=yes \
--with-gslib \
--with-gs-font-dir=/usr/local/share/ghostscript/fonts \
--without-djvu \
--without-fftw \
--without-pango \
--without-wmf \
--without-x \
--disable-openmp
make
make install
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
aqtversion: '==3.1.*'
version: '6.10.*'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
- name: Build Converseen
run: |
cd Converseen
mkdir build
cd build
cmake \
-DUSE_QT6=yes \
-DMACOS_DEPLOY=yes \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/im_build" \
-DCMAKE_INSTALL_PREFIX=install ..
make
- name: Deploy Converseen
run: |
cd Converseen/build
cmake --install .
- name: Compress Converseen
run: |
cd Converseen/build/install
zip -r --symlinks -9 converseen-${{ env.VERSION }}-${{ env.BUILD }}_beta_macos-x86_64.zip converseen.app
pwd
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ConverseenMacOSIntel
path: build/bin/converseen-${{ env.VERSION }}-${{ env.BUILD }}_beta_macos-x86_64.zip