forked from KomodoPlatform/komodo-wallet
-
Notifications
You must be signed in to change notification settings - Fork 11
291 lines (252 loc) · 11.1 KB
/
atomicdex-desktop-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
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
name: AtomicDex-Desktop CI
on:
push:
branches:
- nogeo
env:
DEX_PROJECT_NAME: "atomicdex-desktop"
DEX_DISPLAY_NAME: "AtomicDex Desktop"
DEX_COMPANY: "KomodoPlatform"
DEX_WEBSITE: "https://atomicdex.io/"
jobs:
ci-flow:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [
ubuntu-qt-5-15-2
]
include:
- name: ubuntu-qt-5-15-2
os: ubuntu-18.04
qt: '5.15.2'
type: 'release'
# - name: osx-qt-5-15-2
# os: macos-latest
# qt: '5.15.2'
# type: 'release'
# - name: windows-10-qt-5-15-2
# os: windows-latest
# qt: '5.15.2'
# type: 'release'
#- name: osx-qt-5-15-2-dbg
# os: macos-latest
# qt: '5.15.2'
# type: 'debug'
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: 'true'
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install QT (Linux)
if: runner.os == 'Linux'
uses: KomodoPlatform/[email protected]
with:
version: ${{ matrix.qt }}
host: 'linux'
target: 'desktop'
dir: '${{ github.workspace }}'
#mirror: 'http://mirrors.ocf.berkeley.edu/qt'
mirror: https://qt-mirror.dannhauer.de
#mirror: https://www.funet.fi/pub/mirrors/download.qt-project.org
#mirror: https://ftp.fau.de/qtproject
modules: 'qtcharts qtwidgets debug_info qtwebengine qtwebview'
aqtversion: '==0.8'
py7zrversion: '==0.6'
- name: Install QT (MacOS)
if: runner.os == 'macOS'
uses: KomodoPlatform/[email protected]
with:
version: ${{ matrix.qt }}
host: 'mac'
target: 'desktop'
#mirror: 'http://mirrors.ocf.berkeley.edu/qt'
mirror: https://qt-mirror.dannhauer.de
#mirror: https://www.funet.fi/pub/mirrors/download.qt-project.org
#mirror: https://ftp.fau.de/qtproject
dir: '${{ github.workspace }}'
modules: 'qtcharts qtwidgets debug_info qtwebview qtwebengine'
- name: Install QT IFW (MacOS)
if: runner.os == 'macOS'
run: |
python3 -m aqt tool mac tools_ifw 4.2.0-0-202111080927 qt.tools.ifw.42 --outputdir ${{ github.workspace }}/Qt
echo "${{ github.workspace }}/Qt/Tools/QtInstallerFramework/4.0/bin" >> $GITHUB_PATH
echo "${{ github.workspace }}/Qt/Tools/QtInstallerFramework/4.1/bin" >> $GITHUB_PATH
echo "${{ github.workspace }}/Qt/Tools/QtInstallerFramework/4.2/bin" >> $GITHUB_PATH
- name: Install QT (Windows)
if: runner.os == 'Windows'
uses: KomodoPlatform/[email protected]
with:
version: ${{ matrix.qt }}
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
#mirror: 'http://mirrors.ocf.berkeley.edu/qt'
mirror: https://qt-mirror.dannhauer.de
#mirror: https://www.funet.fi/pub/mirrors/download.qt-project.org
#mirror: https://ftp.fau.de/qtproject
dir: 'C:\'
modules: 'qtcharts qtwidgets debug_info qtwebview qtwebengine'
- name: Install QT IFW (Windows)
if: runner.os == 'Windows'
run: |
python -m pip install --upgrade pip
python -m aqt tool windows tools_ifw 4.2.0-0-202111080926 qt.tools.ifw.42 --outputdir C:/Qt
echo "C:/Qt/Tools/QtInstallerFramework/4.0/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:/Qt/Tools/QtInstallerFramework/4.1/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:/Qt/Tools/QtInstallerFramework/4.2/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo $env:GITHUB_PATH
echo $env:PATH
- name: Install nim (Linux)
if: runner.os == 'Linux'
run: |
export DEBIAN_FRONTEND=noninteractive
export SHELL=/bin/bash
echo "CHOOSENIM_CHOOSE_VERSION=1.4.8" >> $GITHUB_ENV
export CHOOSENIM_CHOOSE_VERSION=1.4.8
curl https://nim-lang.org/choosenim/init.sh > choosenim.sh
chmod +x choosenim.sh
./choosenim.sh -y
export PATH=/home/runner/.nimble/bin:$PATH
ls /home/runner/.choosenim/toolchains
chmod +x /home/runner/.choosenim/toolchains/nim-1.4.8/bin/*
- name: Install deps (Linux)
if: runner.os == 'Linux'
run: |
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
echo ${{ github.sha }}
sudo ./ci_tools_atomic_dex/ci_scripts/linux_script.sh
- name: Upload env variable for vpkg (Linux)
if: runner.os == 'Linux'
run: |
#echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
#echo "LDFLAGS=-stdlib=libc++" >> $GITHUB_ENV
echo "CXX=clang++-12" >> $GITHUB_ENV
echo "CC=clang-12" >> $GITHUB_ENV
- name: vcpkg deps (All)
uses: KomodoPlatform/run-vcpkg@v7
with:
vcpkgDirectory: '${{ github.workspace }}/ci_tools_atomic_dex/vcpkg-repo'
setupOnly: true
appendedCacheKey: ${{ hashFiles('vcpkg.json') }}
- name: Install deps (MacOS)
if: runner.os == 'macOS'
run: |
./ci_tools_atomic_dex/ci_scripts/osx_script.sh
- name: Upload env variable for vpkg (MacOS)
if: runner.os == 'macOS'
run: |
echo "CXX=/usr/local/opt/llvm/bin/clang++" >> $GITHUB_ENV
echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV
- name: Build AtomicDEX (Linux)
if: runner.os == 'Linux'
run: |
export QT_INSTALL_CMAKE_PATH=${{ github.workspace }}/Qt/${{ matrix.qt }}/gcc_64/lib/cmake
export QT_ROOT=${{ github.workspace }}/Qt/${{ matrix.qt }}
export PATH=${{ github.workspace }}/Qt/${{ matrix.qt }}/gcc_64/bin:$PATH
export PATH=$HOME/.nimble/bin:$PATH
#export CXXFLAGS=-stdlib=libc++
#export LDFLAGS=-stdlib=libc++
export CXX=clang++-12
export CC=clang-12
cd ci_tools_atomic_dex
nimble build -y
./ci_tools_atomic_dex build release
./ci_tools_atomic_dex bundle release
- name: Build AtomicDEX (MacOS)
if: runner.os == 'macOS'
run: |
export MAC_SIGN_IDENTITY="${{ secrets.MAC_SIGN_IDENTITY }}"
export INSTALLER_MAC_SIGN_IDENTITY="${{ secrets.INSTALLER_MAC_SIGN_IDENTITY }}"
export APPLE_ATOMICDEX_PASSWORD="${{ secrets.APPLE_ATOMICDEX_PASSWORD }}"
export APPLE_ID="${{ secrets.APPLE_ID }}"
export QT_INSTALL_CMAKE_PATH=${{ github.workspace }}/Qt/${{ matrix.qt }}/clang_64/lib/cmake
export QT_ROOT=${{ github.workspace }}/Qt/${{ matrix.qt }}
export MACOSX_DEPLOYMENT_TARGET=10.13
export CC=clang
export CXX=clang++
cd ci_tools_atomic_dex
nimble build -y
./ci_tools_atomic_dex bundle ${{ matrix.type }} --osx_sdk=$HOME/sdk/MacOSX10.14.sdk --compiler=clang++
- name: Build AtomicDEX (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
$Env:QT_VERSION = "${{ matrix.qt }}"
.\ci_tools_atomic_dex\ci_scripts\windows_script.ps1
- name: Upload env variable for artifacts (Linux)
if: runner.os == 'Linux'
run: |
ls ./bundled/linux/
echo "artifact_name_zstd=${{ env.DEX_PROJECT_NAME }}-${{ matrix.name }}-$(git rev-parse --short HEAD).tar.zst" >> $GITHUB_ENV
echo "artifact_name_zip=${{ env.DEX_PROJECT_NAME }}-${{ matrix.name }}-$(git rev-parse --short HEAD).zip" >> $GITHUB_ENV
echo "artifact_name_appimage=${{ env.DEX_PROJECT_NAME }}-${{ matrix.name }}-$(git rev-parse --short HEAD)-x86_64.AppImage" >> $GITHUB_ENV
echo "target_name_zstd=${{ env.DEX_PROJECT_NAME }}-linux-$(git rev-parse --short HEAD).tar.zst" >> $GITHUB_ENV
echo "target_name_zip=${{ env.DEX_PROJECT_NAME }}-linux-$(git rev-parse --short HEAD).zip" >> $GITHUB_ENV
echo "target_name_appimage=${{ env.DEX_PROJECT_NAME }}-$(git rev-parse --short HEAD)-x86_64.AppImage" >> $GITHUB_ENV
- name: Upload bundle artifact (Linux ZSTD)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v2
with:
name: ${{ env.artifact_name_zstd }}
path: ./bundled/linux/${{ env.target_name_zstd }}
retention-days: 7
- name: Upload bundle artifact (Linux ZIP)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v2
with:
name: ${{ env.artifact_name_zip }}
path: ./bundled/linux/${{ env.target_name_zip }}
retention-days: 7
- name: Upload bundle artifact (Linux AppImage)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v2
with:
name: ${{ env.artifact_name_appimage }}
path: ./bundled/linux/${{ env.target_name_appimage }}
retention-days: 7
- name: Upload env variable for artifacts (macOS)
if: runner.os == 'macOS'
run: |
ls ./bundled/osx/
echo "artifact_name_dmg=${{ env.DEX_PROJECT_NAME }}-${{ matrix.name }}-$(git rev-parse --short HEAD).dmg" >> $GITHUB_ENV
echo "artifact_name_installer=${{ env.DEX_PROJECT_NAME }}-installer-${{ matrix.name }}-$(git rev-parse --short HEAD).7z" >> $GITHUB_ENV
- name: Upload artifacts (MacOS dmg)
if: runner.os == 'macOS'
uses: actions/upload-artifact@v2
with:
name: ${{ env.artifact_name_dmg }}
path: ./bundled/osx/${{ env.DEX_PROJECT_NAME }}.dmg
retention-days: 7
- name: Upload artifacts (MacOS installer)
if: runner.os == 'macOS'
uses: actions/upload-artifact@v2
with:
name: ${{ env.artifact_name_installer }}
path: ./bundled/osx/${{ env.DEX_PROJECT_NAME }}_installer.7z
retention-days: 7
- name: Upload env variable for artifacts (Windows)
if: runner.os == 'Windows'
run: |
echo "on_windows"
echo "artifact_name_zip=${{ env.DEX_PROJECT_NAME }}-${{ matrix.name }}-$(git rev-parse --short HEAD).zip" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "artifact_name_installer=${{ env.DEX_PROJECT_NAME }}-installer-${{ matrix.name }}-$(git rev-parse --short HEAD).exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Upload artifacts (Windows zip)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v2
with:
name: ${{ env.artifact_name_zip }}
path: ./bundled/windows/bin.zip
retention-days: 7
- name: Upload artifacts (Windows installer)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v2
with:
name: ${{ env.artifact_name_installer }}
path: ./bundled/windows/${{ env.DEX_PROJECT_NAME }}_installer.exe
retention-days: 7