-
Notifications
You must be signed in to change notification settings - Fork 48
223 lines (216 loc) · 10.7 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ubuntu-20_04:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
arch: [
"core-avx2",
"core2",
"nocona",
]
steps:
- name: checkout
uses: actions/checkout@v3
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.18.x'
- name: Extract branch name & commit
id: extract_branch
run: |
echo "git_hash=$(git rev-parse --short=7 "$GITHUB_SHA")" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//\./g')" >> $GITHUB_OUTPUT
- name: install apt-get deps
run: |
sudo apt-get update
sudo apt-get install libboost-all-dev libcurl4-openssl-dev
sudo apt-get install libdb++-dev build-essential libtool autotools-dev automake pkg-config bsdmainutils ccache python3 python3-pip python3-setuptools python-setuptools
sudo apt-get install libevent-dev python3-zmq python3-dev libboost-python-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libzmq3-dev
sudo apt install qtcreator qtbase5-dev qt5-qmake cmake
- name: build Dynex
run: |
(
rm -rf build
mkdir build;
cd build;
cmake -DCMAKE_CXX_FLAGS=-march=${{ matrix.arch }} -mtune=generic -DCMAKE_C_FLAGS=-march=${{ matrix.arch }} -mtune=generic ..;
make -j2;
)
- name: create artifacts
if: success()
run: |
mkdir -p ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
mv ./build/src/connectivity_tool ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/connectivity_tool
mv ./build/src/dynexd ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/dynexd
mv ./build/src/simplewallet ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/simplewallet
mv ./build/src/walletd ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/walletd
mv ./release Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
- name: Archive artifacts on GH
if: success()
uses: actions/upload-artifact@v3
with:
name: Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}-ubuntu-20.04-linux-x64-${{ matrix.arch }}
path: Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
ubuntu-22_04:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch: [
"core-avx2",
"core2",
"nocona",
]
steps:
- name: checkout
uses: actions/checkout@v3
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.18.x'
- name: Extract branch name & commit
id: extract_branch
run: |
echo "git_hash=$(git rev-parse --short=7 "$GITHUB_SHA")" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//\./g')" >> $GITHUB_OUTPUT
- name: install apt-get deps
run: |
sudo apt-get update
sudo apt-get install libboost-all-dev libcurl4-openssl-dev
sudo apt-get install libdb++-dev build-essential libtool autotools-dev automake pkg-config bsdmainutils ccache python3 python3-pip python3-setuptools python-setuptools
sudo apt-get install libevent-dev python3-zmq python3-dev libboost-python-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libzmq3-dev
sudo apt install qtcreator qtbase5-dev qt5-qmake cmake
- name: build Dynex
run: |
(
rm -rf build
mkdir build;
cd build;
cmake -DGUI=True -DCMAKE_CXX_FLAGS=-march=${{ matrix.arch }} -mtune=generic -DCMAKE_C_FLAGS=-march=${{ matrix.arch }} -mtune=generic ..;
make -j2;
)
- name: create artifacts
if: success()
run: |
mkdir -p ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
mv ./build/src/connectivity_tool ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/connectivity_tool
mv ./build/src/dynexd ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/dynexd
mv ./build/src/simplewallet ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/simplewallet
mv ./build/src/walletd ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/walletd
mv ./build/src/WalletGui/dynexwallet ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/dynexwallet
mv ./release Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
- name: Archive artifacts on GH
if: success()
uses: actions/upload-artifact@v3
with:
name: Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}-ubuntu-22.04-linux-x64-${{ matrix.arch }}
path: Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
macos_11:
runs-on: macos-11
steps:
- name: checkout
uses: actions/checkout@v3
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.18.x'
- name: Extract branch name & commit
id: extract_branch
run: |
echo "git_hash=$(git rev-parse --short=7 "$GITHUB_SHA")" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//\./g')" >> $GITHUB_OUTPUT
- name: Install boost
uses: MarkusJx/[email protected]
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.79.0
platform_version: 11
- name: build Dynex
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: |
(
rm -rf build
mkdir build;
cd build;
cmake .. -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include\
-DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib;
make -j2;
)
- name: create artifacts
if: success()
run: |
mkdir -p ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
mv ./build/src/connectivity_tool ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/connectivity_tool
mv ./build/src/dynexd ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/dynexd
mv ./build/src/simplewallet ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/simplewallet
mv ./build/src/walletd ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/walletd
mv ./release Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
- name: Archive artifacts on GH
if: success()
uses: actions/upload-artifact@v3
with:
name: Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}-macos-11
path: Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
macos_12:
runs-on: macos-12
steps:
- name: checkout
uses: actions/checkout@v3
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.18.x'
- name: Extract branch name & commit
id: extract_branch
run: |
echo "git_hash=$(git rev-parse --short=7 "$GITHUB_SHA")" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//\./g')" >> $GITHUB_OUTPUT
- name: Install boost
uses: MarkusJx/[email protected]
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.beta1
platform_version: 12
- name: build Dynex
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: |
(
rm -rf build
mkdir build;
cd build;
cmake .. -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include\
-DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib;
make -j2;
)
- name: create artifacts
if: success()
run: |
mkdir -p ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
mv ./build/src/connectivity_tool ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/connectivity_tool
mv ./build/src/dynexd ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/dynexd
mv ./build/src/simplewallet ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/simplewallet
mv ./build/src/walletd ./release/Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}/walletd
mv ./release Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}
- name: Archive artifacts on GH
if: success()
uses: actions/upload-artifact@v3
with:
name: Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}-macos-12
path: Dynex-${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_branch.outputs.git_hash }}