forked from hyle-team/zano
-
Notifications
You must be signed in to change notification settings - Fork 2
254 lines (251 loc) · 8.71 KB
/
cli-testnet.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
name: cli-testnet
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
env:
CMAKE_OSX_SYSROOT: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.2.1.sdk"
CCACHE_SETTINGS: |
ccache --max-size=150M
ccache --set-config=compression=true
jobs:
compile:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest]
include:
- os: ubuntu-latest
target: linux-amd64
net: testnet
# - os: macos-11
# target: macos-amd64
# net: testnet
# - os: macos-12
# target: macos-amd64
# net: testnet
# - os: windows-2019
# target: windows-amd64
# net: testnet
env:
CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
CONAN_HOME: "${{ github.workspace }}/build/"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
if: ${{ matrix.os == 'windows-2019' }}
name: setup msvc vcvars
- name: install dependencies
run: |
sudo apt update
sudo apt-get install -y git ccache
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install autotools on macOS
run: brew install automake
if: ${{ matrix.os == 'macos-13' }}
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ccache-${{ runner.os }}-${{ matrix.target }}-build-testnet-cli
- name: Cache Conan
id: github-cache-conan
uses: actions/cache@v4
env:
cache-name: cache-conan-modules
with:
save-always: true
path: ${{ github.workspace }}/build/p
key: host-${{ runner.os }}-target-${{ matrix.target }}-${{ hashFiles('contrib/cmake/conanfile.py') }}
- name: Install Conan
run: pip install conan pytest && conan --version
- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.25.0"
ninjaVersion: "^1.11.1"
- name: Call make release-testnet
run: |
make ci-${{ matrix.target }}-testnet
- name: Release Tag
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: '*ethean-${{ matrix.target }}-cli.*'
- name: Release Branch
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/heads/iTw3')
with:
tag_name: canary
prerelease: true
files: '*ethean-${{ matrix.target }}-cli.*'
# linux-amd64:
# runs-on: ubuntu-20.04
# env:
# CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
# steps:
# - name: Cancel Previous Runs
# uses: styfle/cancel-workflow-action@0.9.1
# with:
# access_token: ${{ github.token }}
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# submodules: recursive
# - uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/ccache
# key: ccache-${{ runner.os }}-build-testnet-cli
# restore-keys: ccache-${{ runner.os }}-build-testnet-cli
# - name: update apt
# run: sudo apt update
# - name: install dependencies
# run: sudo apt-get install -y python-dev autotools-dev libboost-all-dev libicu-dev libbz2-dev git screen checkinstall zlib1g-dev ccache miniupnpc
# - name: build server
# run: |
# ${{env.CCACHE_SETTINGS}}
# ./utils/build/testnet_linux_cli.sh
# - name: Move Tarball
# run: cd build/release && mv lethean-linux-cli-*.tar.bz2 ../../
# - uses: actions/upload-artifact@v3
# with:
# name: lethean-linux-cli
# if-no-files-found: error
# path: lethean-linux-cli-*.tar.bz2
# - name: Release
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: ${{ github.workspace }}/testnet-lethean-linux-cli-*.tar.bz2
# - name: Release Tag
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: '*ethean-${{ matrix.target }}-cli.*'
# - name: Release Branch
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/heads/iTw3')
# with:
# tag_name: canary
# prerelease: true
# files: '*ethean-${{ matrix.target }}-cli.*'
# macos-amd64:
# runs-on: macos-latest
# env:
# CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
# steps:
# - name: Cancel Previous Runs
# uses: styfle/cancel-workflow-action@0.9.1
# with:
# access_token: ${{ github.token }}
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# submodules: recursive
# - uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/ccache
# key: ccache-${{ runner.os }}-build-testnet-cli
# restore-keys: ccache-${{ runner.os }}-build-testnet-cli
# - name: install dependencies
# run: HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl boost icu4c ccache miniupnpc
# - name: build server
# env:
# PKG_CONFIG_PATH: "/usr/local/opt/openssl@3/lib/pkgconfig"
# OPENSSL_ROOT_DIR: "/usr/local/opt/openssl@3"
# ZANO_BOOST_ROOT: "/opt/homebrew/opt/boost"
# ZANO_BOOST_LIBS_PATH: "/opt/homebrew/opt/boost/lib"
# CMAKE_OSX_SYSROOT: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk"
# run: |
# ${{env.CCACHE_SETTINGS}}
# export LIBRARY_PATH=${LIBRARY_PATH}:/usr/local/opt/icu4c/lib
# ./utils/build/testnet_mac_osx_cli.sh
# - name: Move Tarball
# run: cd build/release && mv lethean-macos-cli-*.tar.bz2 ../../
# - uses: actions/upload-artifact@v3
# with:
# name: lethean-macos-cli
# if-no-files-found: error
# path: lethean-macos-cli-*.tar.bz2
# - name: Release
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: ${{ github.workspace }}/lethean-macos-cli-*.tar.bz2
windows-amd64:
runs-on: windows-latest
env:
CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ccache-${{ runner.os }}-build-testnet-cli
restore-keys: ccache-${{ runner.os }}-build-testnet-cli
- name: Eat the Choco
run: |
choco install openssl --version 1.1.1.1500 -y
choco install ccache -y
choco install zip -y
- name: install msvc toolset
uses: ilammy/msvc-dev-cmd@v1
- name: Install boost
uses: MarkusJx/install-boost@v2.4.1
id: install-boost
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
boost_version: 1.80.0
platform_version: 2022
toolset: msvc
link: static
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- name: build server
env:
QT_PREFIX_PATH: C:\ProgramData\chocolatey\lib\Qt5.11.2\5.11.2
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
LOCAL_BOOST_PATH: ${{ steps.install-boost.outputs.BOOST_ROOT }}
OPENSSL_ROOT_DIR: "C:\\Program Files\\OpenSSL-Win64"
CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
run: |
refreshenv
${{env.CCACHE_SETTINGS}}
.\utils\build\testnet_windows_cli.bat
- uses: actions/upload-artifact@v3
with:
name: lethean-windows-cli
if-no-files-found: error
path: ${{ github.workspace }}\lethean-win-cli-*.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
lethean-win-cli-*