-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
110 lines (94 loc) · 7.03 KB
/
.gitlab-ci.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
localization:
image: ubuntu:jammy
only:
- schedules
script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update && apt-get install -y qt6-base-dev qt6-l10n-tools openssh-client git wget
- qtchooser -install qt6 $(which qmake6)
- export QT_SELECT=qt6
- eval `ssh-agent -s`
- echo "${SSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null # add ssh key
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- echo "${SSH_PUBLIC_KEY}" >> ~/.ssh/id_rsa.pub
- echo "StrictHostKeyChecking no" > ~/.ssh/config
- git config --global user.email "${CI_EMAIL}"
- git config --global user.name "${CI_USERNAME}"
- git clone [email protected]:luspi/photoqt-lang.git && cd photoqt-lang
- lupdate -no-obsolete ../qml/ ../cplusplus/ -ts photoqt-qt6.ts
- git add photoqt-qt6.ts
- git diff-index --quiet HEAD || git commit -m "updating translation source files from CI - Qt6 version"
- git push
appimage:
image: ubuntu:jammy
only:
- schedules
script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update -qq && apt-get -y install git build-essential libgl1-mesa-dev cmake wget extra-cmake-modules apt-transport-https curl software-properties-common wget file
- echo "deb http://archive.neon.kde.org/user jammy main" | tee /etc/apt/sources.list.d/neon.list # add Neon PPA
- wget -qO - http://archive.neon.kde.org/public.key | apt-key add -
- apt-get update -qq && apt-get -y upgrade
- apt-get -y install qt6-base-dev qt6-positioning-dev qt6-image-formats-plugins qt6-image-formats-plugin-pdf libqt6svg6-dev libqt6chartsqml6 qml6-module-qt-labs-platform qml6-module-qtcharts qml6-module-qtcore qml6-module-qtmultimedia qml6-module-qtpositioning qml6-module-qtqml qml6-module-qtquick-controls qml6-module-qtquick-layouts qml6-module-qtquick-window qt6-multimedia-dev qml6-module-qtqml-workerscript qml6-module-qtquick-templates qml6-module-qtquick-dialogs qt6-tools-dev qt6-l10n-tools qt6-tools-dev-tools qt6-pdf-dev
- apt-get -y install libarchive-dev libraw-dev libfreeimage-dev libfreeimageplus-dev libdevil-dev libpugixml-dev gstreamer1.0-tools libexiv2-dev libmpv-dev python-is-python3 python3-pychromecast python3-requests ffmpegthumbnailer gstreamer1.0-libav libopenh264-6 libzxingcore-dev libdjvulibre-dev libheif-dev libjxl-dev liblqr-1-0-dev libopenexr-dev libopenjp2-7-dev libraqm-dev libwebp-dev libxml2-dev libzip-dev libbz2-dev libgraphviz-dev
- git clone https://github.com/ImageMagick/ImageMagick # Install up-to-date ImageMagick
- cd ImageMagick
- git checkout $(git describe --tags --abbrev=0)
- ./configure --prefix=/usr --with-bzlib --with-fontconfig --with-freetype=yes --with-gslib --with-gvc --with-jpeg --with-png --with-tiff --with-xml --with-gs-font-dir --enable-hdri --disable-docs
- make -j$(nproc) install
- cd ..
- export QT_SELECT=qt6
- rm -rf lang/
- git clone -b l10n_master https://gitlab.com/luspi/photoqt-lang
- mv photoqt-lang/localized lang
- cd build/
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DEXIV2=ON -DGRAPHICSMAGICK=OFF -DIMAGEMAGICK=ON -DCHROMECAST=ON -DVIDEO_QT=ON -DPOPPLER=OFF -DQTPDF=ON -DEXIV2_ENABLE_BMFF=ON -DRESVG=OFF -DMOTIONPHOTO=ON -DZXING=ON -DLCMS2=ON -DLOCATION=ON -DLIBVIPS=OFF
- make DESTDIR=../appdir -j$(nproc) install
- cd ..
- wget -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
- wget -c https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
- chmod a+x *.AppImage
- ./linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract
- ./linuxdeploy-x86_64.AppImage --appimage-extract
- rm ./linuxdeploy-plugin-qt-x86_64.AppImage
- cp /usr/bin/qmake6 /usr/bin/qmake # This file is needed for the next run to succeed
- QML_SOURCES_PATHS=./qml ./squashfs-root/AppRun --appdir ./appdir/ --plugin=qt --output appimage
- mv ./PhotoQt*.AppImage PhotoQt-nightly.AppImage
artifacts:
paths:
- PhotoQt-nightly.AppImage
releaseappimage:
image: ubuntu:jammy
only:
- tags
script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update -qq && apt-get -y install git build-essential libgl1-mesa-dev cmake wget extra-cmake-modules apt-transport-https curl software-properties-common wget file
- echo "deb http://archive.neon.kde.org/user jammy main" | tee /etc/apt/sources.list.d/neon.list # add Neon PPA
- wget -qO - http://archive.neon.kde.org/public.key | apt-key add -
- apt-get update -qq && apt-get -y upgrade
- apt-get -y install qt6-base-dev qt6-positioning-dev qt6-image-formats-plugins qt6-image-formats-plugin-pdf libqt6svg6-dev libqt6chartsqml6 qml6-module-qt-labs-platform qml6-module-qtcharts qml6-module-qtcore qml6-module-qtmultimedia qml6-module-qtpositioning qml6-module-qtqml qml6-module-qtquick-controls qml6-module-qtquick-layouts qml6-module-qtquick-window qt6-multimedia-dev qml6-module-qtqml-workerscript qml6-module-qtquick-templates qml6-module-qtquick-dialogs qt6-tools-dev qt6-l10n-tools qt6-tools-dev-tools qt6-pdf-dev
- apt-get -y install libarchive-dev libraw-dev libfreeimage-dev libfreeimageplus-dev libdevil-dev libpugixml-dev gstreamer1.0-tools libexiv2-dev libmpv-dev python-is-python3 python3-pychromecast python3-requests ffmpegthumbnailer gstreamer1.0-libav libopenh264-6 libzxingcore-dev libdjvulibre-dev libheif-dev libjxl-dev liblqr-1-0-dev libopenexr-dev libopenjp2-7-dev libraqm-dev libwebp-dev libxml2-dev libzip-dev libbz2-dev libgraphviz-dev
- git clone https://github.com/ImageMagick/ImageMagick # Install up-to-date ImageMagick
- cd ImageMagick
- git checkout $(git describe --tags --abbrev=0)
- ./configure --prefix=/usr --with-bzlib --with-fontconfig --with-freetype=yes --with-gslib --with-gvc --with-jpeg --with-png --with-tiff --with-xml --with-gs-font-dir --enable-hdri --disable-docs
- make -j$(nproc) install
- cd ..
- export QT_SELECT=qt6
- mkdir -p build && cd build/ # build PhotoQt
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DEXIV2=ON -DGRAPHICSMAGICK=OFF -DIMAGEMAGICK=ON -DCHROMECAST=ON -DVIDEO_QT=ON -DPOPPLER=OFF -DQTPDF=ON -DEXIV2_ENABLE_BMFF=ON -DRESVG=OFF -DMOTIONPHOTO=ON -DZXING=ON -DLCMS2=ON -DLOCATION=ON -DLIBVIPS=OFF
- make DESTDIR=../appdir -j$(nproc) install
- cd ..
- wget -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
- wget -c https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
- chmod a+x *.AppImage
- ./linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract
- ./linuxdeploy-x86_64.AppImage --appimage-extract
- rm ./linuxdeploy-plugin-qt-x86_64.AppImage
- cp /usr/bin/qmake6 /usr/bin/qmake # This file is needed for the next run to succeed
- QML_SOURCES_PATHS=./qml ./squashfs-root/AppRun --appdir ./appdir/ --plugin=qt --output appimage
- mv ./PhotoQt*.AppImage PhotoQt-latesttag.AppImage
artifacts:
paths:
- PhotoQt-latesttag.AppImage