forked from monero-project/monero-gui
-
Notifications
You must be signed in to change notification settings - Fork 9
225 lines (215 loc) · 9.02 KB
/
build.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
name: continuous-integration/gh-actions/gui
on: [push, pull_request]
jobs:
build-macos:
runs-on: macOS-11
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: install dependencies
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf
- name: install qt
uses: jurplel/install-qt-action@v2
with:
version: '5.14.2'
- name: add qt to path
run: echo "$Qt5_Dir/bin" >> $GITHUB_PATH
- name: check qt version
run: qmake --version
- name: fetch zmq.hpp
run: brew tap osrf/simulation && brew install cppzmq
- name: build
run: ./build.sh
- name: test qml
run: build/release/bin/aeon-wallet-gui.app/Contents/MacOS/aeon-wallet-gui --test-qml
- name: deploy
run: make deploy
working-directory: build
- name: build CLI
run: |
rm -rf build/
USE_SINGLE_BUILDDIR=1 make release-static -j3
cp build/release/bin/* ../build/release/bin/
cp build/release/bin/aeond ../build/release/bin/aeon-wallet-gui.app/Contents/MacOS/aeond
working-directory: monero
- name: archive
run: |
export ARTIFACT_NAME="aeon-gui-mac-x64-$(git describe --tags)"
mkdir $ARTIFACT_NAME
cp -rf bin/* $ARTIFACT_NAME
tar cvzf $ARTIFACT_NAME.tar.bz2 $ARTIFACT_NAME
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
working-directory: build/release
- name: SHA256 checksum
run: openssl sha256 ${{ env.ARTIFACT_NAME }}.tar.bz2
working-directory: build/release
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/release/${{ env.ARTIFACT_NAME }}.tar.bz2
- uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}.tar.bz2
path: build/release/${{ env.ARTIFACT_NAME }}.tar.bz2
- name: upload to transfer.sh
run: curl --upload-file build/release/${{ env.ARTIFACT_NAME }}.tar.bz2 https://transfer.sh/${{ env.ARTIFACT_NAME }}.tar.bz2
build-ubuntu:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: remove bundled boost
run: sudo rm -rf /usr/local/share/boost
- name: set apt conf
run: |
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
- name: update apt
run: sudo apt update
- name: install aeon dependencies
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libsodium-dev
- name: build & install static zmq
run: |
git clone https://github.com/zeromq/libzmq
cd libzmq
git checkout v4.3.2
mkdir build && cd build
cmake -D WITH_PERF_TOOL=OFF -D ZMQ_BUILD_TESTS=OFF -D ENABLE_CPACK=OFF -D CMAKE_BUILD_TYPE=Release ..
make -j3
sudo make install
sudo curl -L https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp --output /usr/local/include/zmq.hpp
working-directory: ..
- name: install dependencies for deployment
run: sudo apt -y install libgstreamer-plugins-base1.0-dev icnsutils
- name: install qt
uses: jurplel/install-qt-action@v2
with:
version: '5.14.2'
- name: add qt to path
run: echo "$Qt5_Dir/bin" >> $GITHUB_PATH
- name: qt check version
run: qmake --version
- name: build
run: ./build.sh debug
- name: check size of aeon-wallet-gui
run: ls -l build/debug/bin/aeon-wallet-gui
- name: test qml
run: xvfb-run -a build/debug/bin/aeon-wallet-gui --test-qml
- name: build CLI
run: |
rm -rf build/
USE_SINGLE_BUILDDIR=1 make release-static -j3
cp build/release/bin/* ../build/debug/bin/
working-directory: monero
- name: deploy - create directory structure, copy files
run: |
mkdir -p AppDir/usr/{bin,lib,share}
mkdir -p AppDir/usr/share/{applications,icons}
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
mv bin/aeon-wallet-gui AppDir/usr/bin
cp bin/aeond AppDir/usr/bin
icns2png -x ../../images/appicon.icns
mv appicon_256x256x32.png AppDir/usr/share/icons/hicolor/256x256/apps/aeon-wallet-gui.png
working-directory: build/debug
- name: deploy - create desktop file
run: |
echo "[Desktop Entry]" >> aeon-wallet-gui.desktop
echo "Type=Application" >> aeon-wallet-gui.desktop
echo "Name=aeon-wallet-gui" >> aeon-wallet-gui.desktop
echo "Comment=GUI wallet for AEON cryptocurrency" >> aeon-wallet-gui.desktop
echo "Exec=aeon-wallet-gui" >> aeon-wallet-gui.desktop
echo "Icon=aeon-wallet-gui" >> aeon-wallet-gui.desktop
echo "Categories=Finance;" >> aeon-wallet-gui.desktop
working-directory: build/debug/AppDir/usr/share/applications
- name: deploy - run linuxdeployqt
run: |
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/8/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
./linuxdeployqt-continuous-x86_64.AppImage AppDir/usr/share/applications/aeon-wallet-gui.desktop -appimage -qmldir=../..
mv aeon-wallet-gui-*.AppImage bin/aeon-wallet-gui.AppImage
working-directory: build/debug
- name: archive
run: |
export ARTIFACT_NAME="aeon-gui-linux-x64-$(git describe --tags)"
mkdir $ARTIFACT_NAME
cp -rf bin/* $ARTIFACT_NAME
tar cvzf $ARTIFACT_NAME.tar.bz2 $ARTIFACT_NAME
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
working-directory: build/debug
- name: SHA256 checksum
run: openssl sha256 ${{ env.ARTIFACT_NAME }}.tar.bz2
working-directory: build/debug
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/debug/${{ env.ARTIFACT_NAME }}.tar.bz2
- uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}.tar.bz2
path: build/debug/${{ env.ARTIFACT_NAME }}.tar.bz2
- name: upload to transfer.sh
run: curl --upload-file build/debug/${{ env.ARTIFACT_NAME }}.tar.bz2 https://transfer.sh/${{ env.ARTIFACT_NAME }}.tar.bz2
build-windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: eine/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-protobuf-c git mingw-w64-x86_64-hidapi zip curl mingw-w64-x86_64-libtiff mingw-w64-x86_64-libpng mingw-w64-x86_64-pcre mingw-w64-x86_64-pcre2 mingw-w64-x86_64-libmng mingw-w64-x86_64-lcms2 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libiconv mingw-w64-x86_64-harfbuzz mingw-w64-x86_64-graphite2 mingw-w64-x86_64-glib2 mingw-w64-x86_64-freetype mingw-w64-x86_64-double-conversion mingw-w64-x86_64-md4c
- name: install qt
uses: jurplel/install-qt-action@v2
with:
version: '5.14.2'
arch: 'win64_mingw73'
- name: copy qt to /usr/local # because $GITHUB_PATH doesn't seem to work on msys somehow
run: |
mkdir -p /usr/local
cp -rf $Qt5_Dir/* /usr/local
- name: check qt version
run: qmake --version
- name: build
run: |
sed -i 's/CONFIG\ +=\ qtquickcompiler//' aeon-wallet-gui.pro
./build.sh release
- name: test qml
run: build/release/bin/aeon-wallet-gui --test-qml
- name: deploy
run: make deploy
working-directory: build
- name: build CLI
run: |
rm -rf build/
USE_SINGLE_BUILDDIR=1 make release-static-win64 -j2
cp build/release/bin/* ../build/release/bin/
working-directory: monero
- name: archive
run: |
export ARTIFACT_NAME="aeon-gui-win-x64-$(git describe --tags)"
mkdir $ARTIFACT_NAME
cp -rf bin/* $ARTIFACT_NAME
zip -r9 $ARTIFACT_NAME.zip $ARTIFACT_NAME
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
working-directory: build/release
- name: SHA256 checksum
run: openssl sha256 ${{ env.ARTIFACT_NAME }}.zip
working-directory: build/release
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/release/${{ env.ARTIFACT_NAME }}.zip
- uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}.zip
path: build/release/${{ env.ARTIFACT_NAME }}.zip
- name: upload to transfer.sh
run: curl --upload-file build/release/${{ env.ARTIFACT_NAME }}.zip https://transfer.sh/${{ env.ARTIFACT_NAME }}.zip