forked from luspi/photoqt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
92 lines (76 loc) · 5.24 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 qttools5-dev-tools openssh-client git wget
- 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.ts
- git add photoqt.ts
- git diff-index --quiet HEAD || git commit -m "updating translation source files from CI"
- git push
appimage:
image: ubuntu:focal
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 qt5-image-formats-plugins libqt5svg5 libqt5script5 libqt5qml5 libqt5quick5 libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 qtbase5-dev qtdeclarative5-dev libqt5svg5-dev qtmultimedia5-dev qttools5-dev qt5-default qml-module-qtquick2 qml-module-qtquick-window2 qml-module-qtquick-layouts qml-module-qtquick-controls2 qml-module-qtquick-controls qml-module-qt-labs-platform qml-module-qtquick-dialogs qml-module-qtmultimedia qtdeclarative5-dev-tools qml-module-qtlocation qml-module-qtpositioning qml-module-qt-labs-location
- apt-get -y install libarchive-dev libraw-dev libfreeimage-dev libfreeimageplus-dev libdevil-dev libpugixml-dev gstreamer1.0-tools libexiv2-dev libpython3.8-dev libmagick++-6.q16-dev libmagick++-6.q16-8 libmpv-dev
- rm -rf lang/
- git clone -b l10n_master https://gitlab.com/luspi/photoqt-lang
- mv photoqt-lang/localized lang
- mkdir -p build && cd build/ # build PhotoQt
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DEXIV2=ON -DGRAPHICSMAGICK=OFF -DIMAGEMAGICK=ON -DCHROMECAST=OFF -DVIDEO_MPV=ON -DLIBVIPS=OFF -DPOPPLER=OFF -DEXIV2_ENABLE_BMFF=OFF
- make -j$(nproc)
- 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 linuxdeploy-plugin-qt-x86_64.AppImage
- chmod a+x linuxdeploy-x86_64.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:focal
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 qt5-image-formats-plugins libqt5svg5 libqt5script5 libqt5qml5 libqt5quick5 libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 qtbase5-dev qtdeclarative5-dev libqt5svg5-dev qtmultimedia5-dev qttools5-dev qt5-default qml-module-qtquick2 qml-module-qtquick-window2 qml-module-qtquick-layouts qml-module-qtquick-controls2 qml-module-qtquick-controls qml-module-qt-labs-platform qml-module-qtquick-dialogs qml-module-qtmultimedia qtdeclarative5-dev-tools qml-module-qtlocation qml-module-qtpositioning qml-module-qt-labs-location
- apt-get -y install libarchive-dev libraw-dev libfreeimage-dev libfreeimageplus-dev libdevil-dev libpugixml-dev gstreamer1.0-tools libexiv2-dev libpython3.8-dev libmagick++-6.q16-dev libmagick++-6.q16-8 libmpv-dev
- mkdir -p build && cd build/ # build PhotoQt
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DEXIV2=ON -DGRAPHICSMAGICK=OFF -DIMAGEMAGICK=ON -DCHROMECAST=OFF -DVIDEO_MPV=ON -DLIBVIPS=OFF -DPOPPLER=OFF -DEXIV2_ENABLE_BMFF=OFF
- make -j$(nproc)
- 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 linuxdeploy-plugin-qt-x86_64.AppImage
- chmod a+x linuxdeploy-x86_64.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