14
14
env :
15
15
REMOVE_BUNDLED_PACKAGES : sudo rm -rf /usr/local
16
16
BUILD_DEFAULT_LINUX : |
17
- cmake -S . -B build -D ARCH="default" -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Release && cmake --build build --parallel 4
17
+ cmake -S . -B build -D ARCH="default" -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Release && cmake --build build
18
18
APT_INSTALL_LINUX : ' apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler ccache git'
19
19
APT_SET_CONF : |
20
20
tee -a /etc/apt/apt.conf.d/80-custom << EOF
@@ -41,14 +41,15 @@ jobs:
41
41
path : /Users/runner/Library/Caches/ccache
42
42
key : ccache-${{ runner.os }}-build-${{ github.sha }}
43
43
restore-keys : ccache-${{ runner.os }}-build-
44
+ - uses : ./.github/actions/set-make-job-count
44
45
- name : install dependencies
45
46
run : |
46
47
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost@1.85 hidapi openssl zmq miniupnpc expat libunwind-headers protobuf@21 ccache
47
48
brew link protobuf@21 boost@1.85
48
49
- name : build
49
50
run : |
50
51
${{env.CCACHE_SETTINGS}}
51
- make -j3
52
+ make -j${{env.MAKE_JOB_COUNT}}
52
53
53
54
build-windows :
54
55
runs-on : windows-latest
@@ -78,10 +79,11 @@ jobs:
78
79
curl -O https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-libs-1.86.0-7-any.pkg.tar.zst
79
80
echo "4cb1d1066fffa6a5788b212ccb920c6d8cc93a8ecbbc633565bfc9b2ebc6feb5 mingw-w64-x86_64-boost-libs-1.86.0-7-any.pkg.tar.zst" | sha256sum -c
80
81
pacman --noconfirm -U mingw-w64-x86_64-boost-1.86.0-7-any.pkg.tar.zst mingw-w64-x86_64-boost-libs-1.86.0-7-any.pkg.tar.zst
82
+ - uses : ./.github/actions/set-make-job-count
81
83
- name : build
82
84
run : |
83
85
${{env.CCACHE_SETTINGS}}
84
- make release-static-win64 -j4
86
+ make release-static-win64 -j${{env.MAKE_JOB_COUNT}}
85
87
86
88
build-debian :
87
89
name : ' build-debian (debian-10)'
@@ -102,8 +104,9 @@ jobs:
102
104
- uses : actions/checkout@v4
103
105
with :
104
106
submodules : recursive
107
+ - uses : ./.github/actions/set-make-job-count
105
108
- name : build
106
- run : ${{env.BUILD_DEFAULT_LINUX}}
109
+ run : ${{env.BUILD_DEFAULT_LINUX}} --parallel ${{env.MAKE_JOB_COUNT}}
107
110
108
111
# See the OS labels and monitor deprecations here:
109
112
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
@@ -125,6 +128,7 @@ jobs:
125
128
path : ~/.ccache
126
129
key : ccache-${{ runner.os }}-build-${{ matrix.os }}-${{ github.sha }}
127
130
restore-keys : ccache-${{ runner.os }}-build-${{ matrix.os }}
131
+ - uses : ./.github/actions/set-make-job-count
128
132
- name : remove bundled packages
129
133
run : ${{env.REMOVE_BUNDLED_PACKAGES}}
130
134
- name : set apt conf
@@ -136,7 +140,7 @@ jobs:
136
140
- name : build
137
141
run : |
138
142
${{env.CCACHE_SETTINGS}}
139
- ${{env.BUILD_DEFAULT_LINUX}}
143
+ ${{env.BUILD_DEFAULT_LINUX}} --parallel ${{env.MAKE_JOB_COUNT}}
140
144
141
145
libwallet-ubuntu :
142
146
runs-on : ubuntu-20.04
@@ -151,6 +155,7 @@ jobs:
151
155
path : ~/.ccache
152
156
key : ccache-${{ runner.os }}-libwallet-${{ github.sha }}
153
157
restore-keys : ccache-${{ runner.os }}-libwallet-
158
+ - uses : ./.github/actions/set-make-job-count
154
159
- name : remove bundled packages
155
160
run : ${{env.REMOVE_BUNDLED_PACKAGES}}
156
161
- name : set apt conf
@@ -163,7 +168,7 @@ jobs:
163
168
run : |
164
169
${{env.CCACHE_SETTINGS}}
165
170
cmake .
166
- make wallet_api -j4
171
+ make wallet_api -j${{env.MAKE_JOB_COUNT}}
167
172
168
173
test-ubuntu :
169
174
needs : build-ubuntu
@@ -180,6 +185,7 @@ jobs:
180
185
path : ~/.ccache
181
186
key : ccache-${{ runner.os }}-build-ubuntu-latest-${{ github.sha }}
182
187
restore-keys : ccache-${{ runner.os }}-build-ubuntu-latest
188
+ - uses : ./.github/actions/set-make-job-count
183
189
- name : remove bundled packages
184
190
run : ${{env.REMOVE_BUNDLED_PACKAGES}}
185
191
- name : set apt conf
@@ -196,7 +202,7 @@ jobs:
196
202
DNS_PUBLIC : tcp://9.9.9.9
197
203
run : |
198
204
${{env.CCACHE_SETTINGS}}
199
- ${{env.BUILD_DEFAULT_LINUX}}
205
+ ${{env.BUILD_DEFAULT_LINUX}} --parallel ${{env.MAKE_JOB_COUNT}}
200
206
cmake --build build --target test
201
207
202
208
# ARCH="default" (not "native") ensures, that a different execution host can execute binaries compiled elsewhere.
0 commit comments