forked from ConcealNetwork/conceal-desktop
-
Notifications
You must be signed in to change notification settings - Fork 3
246 lines (205 loc) · 7.84 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
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:/tools/boost/x86_64
steps:
- uses: actions/checkout@v2
- name: Setup msbuild
uses: microsoft/[email protected]
- name: Install Boost
shell: powershell
run: |
echo "${env:BOOST_ROOT}"
$Url = "https://sourceforge.net/projects/boost/files/boost-binaries/1.72.0/boost_1_72_0-msvc-14.2-64.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${env:BOOST_ROOT}"
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
host: "windows"
target: "desktop"
modules: "qttools5 qtcharts"
install-deps: "true"
- name: Clone fuego
shell: powershell
run: |
Remove-Item cryptonote -Recurse -Force -ErrorAction Ignore
git clone -b master https://github.com/usexfg/fuego.git cryptonote
- name: Pre-build setup
shell: powershell
run: |
$search = "set\(CN_VERSION "
$xfg_version = ((Get-Content CryptoNoteWallet.cmake | Select-String $search) | %{$_ -replace $search, ""}) | %{$_ -replace "\)", ""}
$xfg_version = $xfg_version + ".0"
# Update "CMakeLists.txt" with cmake dir
$qt5_cmake = "${{ env.Qt5_Dir }}/lib/cmake" -replace '[/]', '\\'
$file = "CMakeLists.txt"
$find = '^set\(CMAKE_PREFIX_PATH.+'
$replace = "set(CMAKE_PREFIX_PATH `"$($qt5_cmake)`")"
(Get-Content $file) | %{$_ -replace $find, $replace} | Set-Content $file
# Update FuegoWallet.nsi with the current version
$file = "FuegoWallet.nsi"
$find = "^!define VERSION.+"
$replace = "!define VERSION '$xfg_version.0'"
(Get-Content $file) | %{$_ -replace $find, $replace} | Set-Content $file
- name: Build
shell: powershell
id: build
run: |
$build_folder = "build"
$release_folder = "Release"
$sha = "${{ github.sha }}"
$xfg_version = $sha.SubString(0,7)
$release_name = "fuego-desktop-win64-dev-$xfg_version"
New-Item "$build_folder\$release_folder" -ItemType Directory
cd "$build_folder"
cmake -G "Visual Studio 16 2019" ..
msbuild Fuego-Wallet.sln /p:Configuration=Release /m:2
echo "build_folder=${build_folder}" >> $env:GITHUB_OUTPUT
echo "release_folder=${release_folder}" >> $env:GITHUB_OUTPUT
echo "release_name=${release_name}" >> $env:GITHUB_OUTPUT
- name: Pack
shell: powershell
id: pack
run: |
$build_folder = "${{ steps.build.outputs.build_folder }}"
$release_name = "${{ steps.build.outputs.release_name }}"
$release_folder = "${{ steps.build.outputs.release_folder }}"
cd "$build_folder/$release_folder"
mkdir "Final"
choco install openssl -y
cp "C:\Program Files\OpenSSL-Win64\libcrypto*.dll" "Final/"
cp "C:\Program Files\OpenSSL-Win64\libssl*.dll" "Final/"
windeployqt --release Fuego-Wallet.exe --dir "Final/" --no-translations --no-opengl-sw
cd ../../
makensis FuegoWallet.nsi
cd "$build_folder/$release_folder"
Compress-Archive -Path FUEGO-Setup.exe -DestinationPath "$release_name.zip"
$artifact_path = "$build_folder/$release_folder/$release_name.zip"
echo "artifact_path=${artifact_path}" >> $env:GITHUB_OUTPUT
- name: Upload To GH Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.build.outputs.release_name }}
path: ${{ steps.pack.outputs.artifact_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-ubuntu20:
name: Ubuntu 20.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y qt5-default qttools5-dev qttools5-dev-tools libqt5charts5-dev libboost-all-dev git
- name: Clone fuego
run: |
rm -rf cryptonote
git clone -b master https://github.com/usexfg/fuego.git cryptonote
- name: Build
id: build
run: |
xfg_version=${GITHUB_SHA::7}
release_name=fuego-desktop-ubuntu-2004-dev-"$xfg_version"
make -j4 build-release
mkdir $release_name
mkdir -p $release_name/icon
mv build/release/Fuego-Wallet $release_name
cp fuego-desktop.desktop $release_name
cp src/images/fuego.png $release_name/icon
tar -czf "$release_name".tar.gz "$release_name"
echo "release_name=${release_name}" >> $GITHUB_OUTPUT
echo "artifact_path=${release_name}.tar.gz" >> $GITHUB_OUTPUT
- name: Upload To GH Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.build.outputs.release_name }}
path: ${{ steps.build.outputs.artifact_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
name: macOS
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
modules: "qtcharts"
- name: Install dependencies
run: |
brew install boost
- name: Clone fuego
run: |
rm -rf cryptonote
git clone -b master https://github.com/usexfg/fuego.git cryptonote
- name: Build
id: build
run: |
build_folder="build/release"
xfg_ver=${GITHUB_SHA::7}
release_name="fuego-desktop-macOS-dev-$xfg_ver"
app_name="Fuego-Wallet.app"
make -j4 build-release
cd "$build_folder"
macdeployqt "$app_name"
cpack
mkdir "$release_name"
mv *.dmg "$release_name".dmg
mv "$release_name".dmg "$release_name"
echo "release_name::${release_name}" >> $GITHUB_OUTPUT
echo "artifact_path=${build_folder}/${release_name}" >> $GITHUB_OUTPUT
- name: Upload To GH Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.build.outputs.release_name }}
path: ${{ steps.build.outputs.artifact_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos-11:
name: macOS-11
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
brew install boost qt@5
- name: Clone fuego
run: |
rm -rf cryptonote
git clone -b master https://github.com/usexfg/fuego.git cryptonote
- name: Build
id: build
run: |
export PATH="/usr/local/opt/qt@5/bin:$PATH"
build_folder="build/release"
xfg_ver=${GITHUB_SHA::7}
release_name="fuego-desktop-macOS11-$xfg_ver"
app_name="Fuego-Wallet.app"
make -j4 build-release
cd "$build_folder"
macdeployqt "$app_name"
cpack
mkdir "$release_name"
mv *.dmg "$release_name".dmg
mv "$release_name".dmg "$release_name"
echo "release_name=${release_name}" >> $GITHUB_OUTPUT
echo "artifact_path=${build_folder}/${release_name}" >> $GITHUB_OUTPUT
- name: Upload To GH Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.build.outputs.release_name }}
path: ${{ steps.build.outputs.artifact_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}