-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
94 lines (78 loc) · 5.54 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
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 git@gitlab.com: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 software-properties-common build-essential libgl1-mesa-dev cmake wget extra-cmake-modules apt-transport-https curl
- 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
- apt-get -y install libarchive-dev libraw-dev libfreeimage-dev libfreeimageplus-dev libdevil-dev libpugixml-dev gstreamer1.0-tools libexiv2-dev libmagick++-6.q16-dev libmagick++-6.q16-8 libmpv-dev python-is-python3 python3-pychromecast python3-requests libvips-dev ffmpegthumbnailer gstreamer1.0-libav libopenh264-6 libzxingcore-dev
- qtchooser -install qt6 $(which qmake6)
- 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_MPV=ON -DLIBVIPS=ON -DPOPPLER=OFF -DEXIV2_ENABLE_BMFF=ON -DRESVG=OFF -DMOTIONPHOTO=OFF -DZXING=ON -DLCMS2=ON -DLOCATION=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
- QML_SOURCES_PATHS=./qml ./squashfs-root/AppRun --appdir ./appdir/ --plugin=qt --output appimage
- mv ./PhotoQt*.AppImage PhotoQt-nightly.AppImage
- curl --data-binary @PhotoQt-nightly.AppImage ${UPLOAD_URL}
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 software-properties-common build-essential libgl1-mesa-dev cmake wget extra-cmake-modules apt-transport-https curl
- 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
- apt-get -y install libarchive-dev libraw-dev libfreeimage-dev libfreeimageplus-dev libdevil-dev libpugixml-dev gstreamer1.0-tools libexiv2-dev libmagick++-6.q16-dev libmagick++-6.q16-8 libmpv-dev python-is-python3 python3-pychromecast python3-requests libvips-dev ffmpegthumbnailer gstreamer1.0-libav libopenh264-6 libzxingcore-dev
- qtchooser -install qt6 $(which qmake6)
- 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_MPV=ON -DLIBVIPS=ON -DPOPPLER=OFF -DEXIV2_ENABLE_BMFF=ON -DRESVG=OFF -DMOTIONPHOTO=OFF -DZXING=ON -DLCMS2=ON -DLOCATION=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
- QML_SOURCES_PATHS=./qml ./squashfs-root/AppRun --appdir ./appdir/ --plugin=qt --output appimage
- mv ./PhotoQt*.AppImage PhotoQt-latesttag.AppImage
- curl --data-binary @PhotoQt-latesttag.AppImage ${UPLOAD_URL}
artifacts:
paths:
- PhotoQt-latesttag.AppImage