forked from cryptonotefoundation/cryptonotewallet
-
Notifications
You must be signed in to change notification settings - Fork 38
244 lines (223 loc) · 9.11 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
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-2019
env:
BOOST_ROOT: C:\thirdparties\boost-1.72.0
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
ref: ${{ github.ref }}
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Install Boost
shell: cmd
run: |
choco install wget --no-progress
wget -nv -O boost-installer.exe "https://sourceforge.net/projects/boost/files/boost-binaries/1.72.0/boost_1_72_0-msvc-14.2-64.exe/download"
boost-installer.exe /dir=%BOOST_ROOT% /sp- /verysilent /suppressmsgboxes /norestart
- name: Install OpenSSL
run: choco install openssl
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
host: 'windows'
target: 'desktop'
install-deps: 'true'
- name: Build
shell: powershell
id: build
env:
GIT_REDIRECT_STDERR: '2>&1'
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\'
run: |
$build_folder = "build"
$krb_ver = git describe --tags --abbrev=0
$release_name = "Karbo-wallet-win64-${krb_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"" -DBOOST_INCLUDE_DIRS=""$env:BOOST_ROOT/include"" -G ""Visual Studio 16 2019"" -A x64 -DARCH=default",".." -NoNewWindow -Wait
Start-Process msbuild -ArgumentList "KarbowanecWallet.sln","/p:Configuration=Release" -NoNewWindow -Wait
$build_path = "./$build_folder"
mkdir "$release_folder/$release_name"
mkdir "$release_folder/$release_name/languages"
cp languages/*.qm "$release_folder/$release_name/languages/"
cd "$release_folder"
cp KarbowanecWallet.exe "$release_name/"
cp "C:/Program Files/OpenSSL/bin/libssl*.dll" "$release_name/"
cp "C:/Program Files/OpenSSL/bin/libcrypto*.dll" "$release_name/"
cp "../../COPYING" "$release_name/LICENSE.txt"
cp "../../*.bat" "$release_name/"
windeployqt --release KarbowanecWallet.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 "sha256a=${sha256a}" >> $env:GITHUB_OUTPUT
echo "release_name_archive=${release_name}.zip" >> $env:GITHUB_OUTPUT
echo "asset_path_archive=${asset_path_archive}" >> $env:GITHUB_OUTPUT
cd ../
makensis WindowsInstall.nsi
cd "$release_folder"
Compress-Archive -Path "KarbowanecWallet-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 "sha256i=${sha256i}" >> $env:GITHUB_OUTPUT
echo "release_name_install=${release_name}-install.zip" >> $env:GITHUB_OUTPUT
echo "asset_path_install=${asset_path_install}" >> $env:GITHUB_OUTPUT
- name: Create Archive Artifact
uses: actions/upload-artifact@v3
with:
path: ${{ steps.build.outputs.asset_path_archive }}
name: ${{ steps.build.outputs.release_name_archive }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Installer Artifact
uses: actions/upload-artifact@v3
with:
path: ${{ steps.build.outputs.asset_path_install }}
name: ${{ steps.build.outputs.release_name_install }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
name: macOS
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
ref: ${{ github.ref }}
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
install-deps: 'true'
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Install other deps
run: |
brew install gcc boost openssl
brew link boost --force
- name: Build
id: build
run: |
build_folder="build/release"
krb_ver=$(git describe --tags --abbrev=0)
release_name="Karbo-wallet-macOS-$krb_ver"
app_name="KarbowanecWallet.app"
lang_folder="/Contents/Resources/languages"
mkdir -p "$build_folder"
cd "$build_folder"
cmake -D ARCH=default -D CMAKE_C_FLAGS="-mmacosx-version-min=10.12" -D CMAKE_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 "sha256=${sha256}" >> $GITHUB_OUTPUT
echo "release_name=${release_name}.zip" >> $GITHUB_OUTPUT
echo "asset_path=${asset_path}" >> $GITHUB_OUTPUT
echo "krb_ver=${krb_ver}" >> $GITHUB_OUTPUT
env:
MACOSX_DEPLOYMENT_TARGET: '10.12'
- name: Create Artifact
uses: actions/upload-artifact@v3
with:
path: ${{ steps.build.outputs.asset_path }}
name: ${{ steps.build.outputs.release_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-ubuntu22:
name: Ubuntu 22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
ref: ${{ github.ref }}
- name: Build
id: build
run: |
sudo apt update -y
sudo apt install -y qtbase5-dev qttools5-dev qttools5-dev-tools libboost-all-dev
build_folder="build/release"
krb_ver=$(git describe --tags --abbrev=0)
release_name=Karbo-wallet-ubuntu-22.04-$krb_ver
app_name="KarbowanecWallet"
mkdir -p "$build_folder"
cd "$build_folder"
cmake -D ARCH=default -D CMAKE_BUILD_TYPE=Release -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON -D BOOST_ROOT=/usr ../..
make
cpack
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 "sha256=${sha256}" >> $GITHUB_OUTPUT
echo "release_name=${release_name}.tar.gz" >> $GITHUB_OUTPUT
echo "asset_path=${asset_path}" >> $GITHUB_OUTPUT
echo "krb_ver=${krb_ver}" >> $GITHUB_OUTPUT
- name: Create Artifact
uses: actions/upload-artifact@v3
with:
path: ${{ steps.build.outputs.asset_path }}
name: ${{ steps.build.outputs.release_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-ubuntu20:
name: Ubuntu 20.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
ref: ${{ github.ref }}
- 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"
krb_ver=$(git describe --tags --abbrev=0)
release_name=Karbo-wallet-ubuntu-20.04-$krb_ver
app_name="KarbowanecWallet"
mkdir -p "$build_folder"
cd "$build_folder"
cmake -D ARCH=default -D CMAKE_BUILD_TYPE=Release -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON -D BOOST_ROOT=/usr ../..
make
cpack
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 "sha256=${sha256}" >> $GITHUB_OUTPUT
echo "release_name=${release_name}.tar.gz" >> $GITHUB_OUTPUT
echo "asset_path=${asset_path}" >> $GITHUB_OUTPUT
echo "krb_ver=${krb_ver}" >> $GITHUB_OUTPUT
- name: Create Artifact
uses: actions/upload-artifact@v3
with:
path: ${{ steps.build.outputs.asset_path }}
name: ${{ steps.build.outputs.release_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}