-
Notifications
You must be signed in to change notification settings - Fork 10
269 lines (246 loc) · 9.63 KB
/
check.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
name: Build check
on:
push:
branches:
- '**'
tags-ignore:
- '*' # We don't want this to run on release
pull_request:
jobs:
build-windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.12.2'
host: 'windows'
target: 'desktop'
modules: 'qttools5'
install-deps: 'true'
- name: Install NSIS
uses: joncloud/makensis-action@v1
with:
just-include: true
- name: Build
shell: powershell
id: build
env:
BOOST_ROOT: ${{ env.BOOST_ROOT }}
GIT_REDIRECT_STDERR: '2>&1'
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\'
run: |
$build_folder = "build"
$qwc_ver = git describe --tags --abbrev=0
$release_name = "Qwertycoin-wallet-win64-${qwc_ver}"
$release_folder = "Release"
echo "$release_name"
set CMAKE_PREFIX_PATH="$($qt5_cmake)"
$qt5_cmake = "${{ env.Qt5_Dir }}/lib/cmake" -replace '[/]', '\\'
mkdir "$build_folder"
cd "$build_folder"
Start-Process cmake -ArgumentList "-DBOOST_ROOT=""$env:BOOST_ROOT_1_69_0"" -G ""Visual Studio 16 2019"" -DBUILD_ALL:BOOL=""TRUE"" -A x64",".." -NoNewWindow -Wait
Start-Process msbuild -ArgumentList "Qwertycoin-GUI.sln","/p:Configuration=Release" -NoNewWindow -Wait
$build_path = "./$build_folder"
mkdir "$release_folder/$release_name"
cd "$release_folder"
cp Qwertycoin-GUI.exe "$release_name/"
cp "../../LICENSE.txt" "$release_name/LICENSE.txt"
windeployqt --release Qwertycoin-GUI.exe --dir "$release_name/"
Compress-Archive -Path "$release_name/" -DestinationPath "$release_name.zip"
$sha256a = (Get-FileHash "$release_name.zip").Hash
$asset_path_archive = "./$build_folder/$release_folder/$release_name.zip"
echo "::set-output name=sha256a::${sha256a}"
echo "::set-output name=release_name_archive::${release_name}.zip"
echo "::set-output name=asset_path_archive::${asset_path_archive}"
cd ../
makensis WindowsInstall.nsi
cd "$release_folder"
Compress-Archive -Path "Qwertycoin-GUI-Setup.exe" -DestinationPath "$release_name-install.zip"
$sha256i = (Get-FileHash "$release_name-install.zip").Hash
$asset_path_install = "./$build_folder/$release_folder/$release_name-install.zip"
echo "::set-output name=sha256i::${sha256i}"
echo "::set-output name=release_name_install::${release_name}-install.zip"
echo "::set-output name=asset_path_install::${asset_path_install}"
echo "::set-output name=qwc_ver::${qwc_ver}"
- name: Create Archive Artifact
uses: actions/[email protected]
with:
path: ${{ steps.build.outputs.asset_path_archive }}
name: ${{ steps.build.outputs.release_name_archive }}
body: |
**${{ steps.build.outputs.release_name_archive }}**
${{ steps.build.outputs.sha256a }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Installer Artifact
uses: actions/[email protected]
with:
path: ${{ steps.build.outputs.asset_path_install }}
name: ${{ steps.build.outputs.release_name_install }}
body: |
**${{ steps.build.outputs.release_name_install }}**
${{ steps.build.outputs.sha256i }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '10'
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.12.2'
modules: 'qttools5'
install-deps: 'true'
- name: Find Tag
id: tagger
uses: jimschubert/query-tag-action@v1
with:
include: 'v*'
exclude: '*-rc*'
commit-ish: 'HEAD~'
skip-unshallow: 'true'
- name: Build
id: build
run: |
build_folder="build/release"
qwc_ver="${{steps.tagger.outputs.tag}}"
release_name="Qwertycoin-wallet-macOS-$qwc_ver"
app_name="Qwertycoin-GUI.app"
lang_folder="/Contents/Resources/languages"
brew install gcc boost
brew link boost --force
mkdir -p "$build_folder"
cd "$build_folder"
cmake -DCMAKE_C_FLAGS="-mmacosx-version-min=10.12" -DBUILD_ALL:BOOL=TRUE -DCMAKE_CXX_FLAGS="-mmacosx-version-min=10.12" -D CMAKE_BUILD_TYPE=Release ../..
make
mkdir "$app_name$lang_folder"
cp languages/*.qm "$app_name$lang_folder"
macdeployqt "$app_name"
cpack
mv *.dmg "$release_name".dmg
sha256=$(shasum -a 256 "$release_name".dmg | awk '{ print toupper($1) }')
asset_path="./$build_folder/$release_name.dmg"
echo "::set-output name=sha256::${sha256}"
echo "::set-output name=release_name::${release_name}.zip"
echo "::set-output name=asset_path::${asset_path}"
echo "::set-output name=qwc_ver::${qwc_ver}"
- name: Create Artifact
uses: actions/[email protected]
with:
path: ${{ steps.build.outputs.asset_path }}
name: ${{ steps.build.outputs.release_name }}
body: |
**${{ steps.build.outputs.release_name }}**
${{ steps.build.outputs.sha256 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-ubuntu20:
name: Ubuntu 20.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Find Tag
id: tagger
uses: jimschubert/query-tag-action@v1
with:
include: 'v*'
exclude: '*-rc*'
commit-ish: 'HEAD~'
skip-unshallow: 'true'
- name: Build
id: build
run: |
sudo apt update -y
sudo apt install -y qt5-default qttools5-dev qttools5-dev-tools libboost-all-dev
build_folder="build/release"
qwc_ver="${{ steps.build.outputs.qwc_ver }}"
release_name=Qwertycoin-wallet-ubuntu-20.04-"qwc_ver"
app_name="Qwertycoin-GUI"
mkdir -p "$build_folder"
cd "$build_folder"
cmake -D ARCH=default -D CMAKE_BUILD_TYPE=Release -D BUILD_ALL:BOOL=TRUE -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON -D BOOST_ROOT=/usr ../..
make
cpack
ls -al
tar -czf "$release_name".tar.gz *.deb
sha256=$(shasum -a 256 "$release_name".tar.gz | awk '{print toupper($1)}')
asset_path="./$build_folder/$release_name".tar.gz
echo "::set-output name=sha256::${sha256}"
echo "::set-output name=release_name::${release_name}.tar.gz"
echo "::set-output name=asset_path::${asset_path}"
echo "::set-output name=qwc_ver::${qwc_ver}"
- name: Create Artifact
uses: actions/[email protected]
with:
path: ${{ steps.build.outputs.asset_path }}
name: ${{ steps.build.outputs.release_name }}
body: |
**${{ steps.build.outputs.release_name }}**
${{ steps.build.outputs.sha256 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-ubuntu18:
name: Ubuntu 18.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Find Tag
id: tagger
uses: jimschubert/query-tag-action@v1
with:
include: 'v*'
exclude: '*-rc*'
commit-ish: 'HEAD~'
skip-unshallow: 'true'
- name: Build
id: build
run: |
sudo apt-get purge '*boost*'
sudo apt update -y
sudo apt install -y qt5-default qttools5-dev qttools5-dev-tools libboost1.62-all-dev
build_folder="build/release"
qwc_ver="${{ steps.build.outputs.qwc_ver }}"
release_name=Qwertycoin-wallet-ubuntu-18.04-"qwc_ver"
app_name="Qwertycoin-GUI"
mkdir -p "$build_folder"
cd "$build_folder"
cmake -D ARCH=default -D CMAKE_BUILD_TYPE=Release -D BUILD_ALL:BOOL=TRUE -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON -D BOOST_ROOT=/usr ../..
make
cpack
ls -al
tar -czf "$release_name".tar.gz *.deb
sha256=$(shasum -a 256 "$release_name".tar.gz | awk '{print toupper($1)}')
asset_path="./$build_folder/$release_name".tar.gz
echo "::set-output name=sha256::${sha256}"
echo "::set-output name=release_name::${release_name}.tar.gz"
echo "::set-output name=asset_path::${asset_path}"
echo "::set-output name=qwc_ver::${qwc_ver}"
- name: Create Artifact
uses: actions/[email protected]
with:
path: ${{ steps.build.outputs.asset_path }}
name: ${{ steps.build.outputs.release_name }}
body: |
**${{ steps.build.outputs.release_name }}**
${{ steps.build.outputs.sha256 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}