forked from KomodoPlatform/komodo-wallet
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.gitlab-ci.yml
112 lines (99 loc) · 3.21 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
109
110
111
112
image: smk762/qt-ci:latest
stages:
- build
- upload_linux_zip
- upload_linux_tar
- upload_linux_appimage
- test
variables:
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_DRIVER: overlay2
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
VCPKG_DEFAULT_BINARY_CACHE: "$CI_PROJECT_DIR/.cache/vcpkg"
QT_VERSION: "5.15.2"
CMAKE_VERSION: "3.20.5"
cache:
- key: $CI_COMMIT_REF_SLUG
paths:
- atomicdex-desktop-linux-${CI_COMMIT_SHA::9}.zip
- atomicdex-desktop-linux-${CI_COMMIT_SHA::9}.tar.zst
- atomicdex-desktop-${CI_COMMIT_SHA::9}-x86_64.AppImage
- key: $CI_PROJECT_NAME
paths:
- "$CI_PROJECT_DIR/.cache/vcpkg"
linux:build:
stage: build
before_script:
- cd $CI_PROJECT_DIR
- mkdir -p .cache/pip
- mkdir -p .cache/vcpkg
script:
# Job Variables
- echo $CI_COMMIT_REF_SLUG
- echo $CI_COMMIT_AUTHOR
- echo $CI_COMMIT_BRANCH
- echo $CI_COMMIT_SHA
- echo $CI_COMMIT_SHORT_SHA
- echo $CI_PROJECT_PATH
- echo $CI_PROJECT_NAME
- echo $QT_VERSION
- echo $CMAKE_VERSION
# Job Path/Env variables
- export DEBIAN_FRONTEND=noninteractive
- export QT_INSTALL_CMAKE_PATH=/opt/Qt/$QT_VERSION/gcc_64/lib/cmake
- export QT_ROOT=/opt/Qt/$QT_VERSION
- export Qt5_DIR=/opt/Qt/$QT_VERSION/gcc_64/lib/cmake/Qt5
- export PATH=/opt/Qt/$QT_VERSION/gcc_64/bin:$PATH
- export PATH=${PATH}:/cmake-$CMAKE_VERSION-linux-x86_64/bin;
- export APPIMAGE_EXTRACT_AND_RUN=1
# Update tar
- export FORCE_UNSAFE_CONFIGURE=1
- wget https://ftp.wayne.edu/gnu/tar/tar-1.34.tar.gz && tar -xvf tar-1.34.tar.gz
- cd tar-1.34 && ./configure && make && make install
- cp src/tar $(which tar)
# Bootstrap Vcpkg
- cd $CI_PROJECT_DIR; ./ci_tools_atomic_dex/vcpkg-repo/bootstrap-vcpkg.sh
# NINJA
- cd $CI_PROJECT_DIR
- rm -rf build_ninja || echo "no build_ninja folder to rm"
- mkdir build_ninja && cd $_
- cmake -DCMAKE_BUILD_TYPE=Release -GNinja ../
- ninja atomicdex-desktop
- ninja install
- cd $CI_PROJECT_DIR
- cp $CI_PROJECT_DIR/bundled/linux/atomicdex-desktop-linux-${CI_COMMIT_SHA::9}.zip .
- cp $CI_PROJECT_DIR/bundled/linux/atomicdex-desktop-linux-${CI_COMMIT_SHA::9}.tar.zst .
- cp $CI_PROJECT_DIR/bundled/linux/atomicdex-desktop-${CI_COMMIT_SHA::9}-x86_64.AppImage .
AtomicDex-linux-zip:
stage: upload_linux_zip
allow_failure: true
script:
- echo "Uploading AppImage..."
artifacts:
name: "AtomicDex-linux-${CI_COMMIT_SHA::9}.zip"
paths:
- $CI_PROJECT_DIR/atomicdex-desktop-linux-${CI_COMMIT_SHA::9}.zip
when: always
expire_in: 3 days
AtomicDex-linux-AppImage:
stage: upload_linux_appimage
allow_failure: true
script:
- echo "Uploading AppImage..."
artifacts:
name: "AtomicDex-linux-${CI_COMMIT_SHA::9}-AppImage"
paths:
- $CI_PROJECT_DIR/atomicdex-desktop-${CI_COMMIT_SHA::9}-x86_64.AppImage
when: always
expire_in: 3 days
AtomicDex-linux-tar:
stage: upload_linux_tar
allow_failure: true
script:
- echo "Uploading tar..."
artifacts:
name: "AtomicDex-linux-${CI_COMMIT_SHA::9}.tar.zst"
paths:
- $CI_PROJECT_DIR/atomicdex-desktop-linux-${CI_COMMIT_SHA::9}.tar.zst
when: always
expire_in: 3 days