Skip to content

Commit c83efa8

Browse files
kwvgUdjinM6
andcommitted
ci: start respecting DEP_OPTS, unify with GitLab
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
1 parent f41efa4 commit c83efa8

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

.github/workflows/build-depends.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ jobs:
3636
run: |
3737
BUILD_TARGET="${{ inputs.build-target }}"
3838
source ./ci/dash/matrix.sh
39-
echo "HOST=${HOST}" >> $GITHUB_OUTPUT
39+
echo "DEP_OPTS=${DEP_OPTS}" >> "${GITHUB_OUTPUT}"
40+
echo "HOST=${HOST}" >> "${GITHUB_OUTPUT}"
41+
DEP_HASH="$(echo -n "${BUILD_TARGET}" "${DEP_OPTS}" "${HOST}" | sha256sum | head -c 64)"
42+
echo "\"${BUILD_TARGET}\" has HOST=\"${HOST}\" and DEP_OPTS=\"${DEP_OPTS}\" with hash \"${DEP_HASH}\""
43+
echo "DEP_HASH=${DEP_HASH}" >> "${GITHUB_OUTPUT}"
44+
4045
shell: bash
4146

4247
- name: Cache depends sources
@@ -56,13 +61,13 @@ jobs:
5661
path: |
5762
depends/built
5863
depends/${{ steps.setup.outputs.HOST }}
59-
key: ${{ runner.os }}-depends-${{ inputs.build-target }}-${{ hashFiles('depends/packages/*') }}
64+
key: ${{ runner.os }}-depends-${{ inputs.build-target }}-${{ steps.setup.outputs.DEP_HASH }}-${{ hashFiles('depends/packages/*') }}
6065
restore-keys: |
6166
${{ runner.os }}-depends-${{ inputs.build-target }}-${{ hashFiles('depends/packages/*') }}
6267
${{ runner.os }}-depends-${{ inputs.build-target }}
6368
6469
- name: Build depends
65-
run: env HOST=${{ steps.setup.outputs.HOST }} make -j$(nproc) -C depends
70+
run: env ${{ steps.setup.outputs.DEP_OPTS }} HOST=${{ steps.setup.outputs.HOST }} make -j$(nproc) -C depends
6671

6772
- name: Save depends cache
6873
uses: actions/cache/save@v4

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
container-path: ${{ needs.container.outputs.path }}
2727

2828
depends-linux64:
29-
name: x86_64-pc-linux-gnu
29+
name: x86_64-pc-linux-gnu_debug
3030
uses: ./.github/workflows/build-depends.yml
3131
needs: [container]
3232
with:

.gitlab-ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ builder-image:
4343
image: $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG
4444
before_script:
4545
- |
46-
echo HOST=${HOST}
46+
echo BUILD_TARGET="${BUILD_TARGET}"
47+
source ./ci/dash/matrix.sh
48+
echo HOST="${HOST}"
49+
echo DEP_OPTS="${DEP_OPTS}"
4750
if [[ "${HOST}" == "x86_64-apple-darwin" ]]; then
4851
./contrib/containers/guix/scripts/setup-sdk
4952
fi
@@ -73,6 +76,8 @@ builder-image:
7376
- export CACHE_DIR=$CI_PROJECT_DIR/cache
7477
- echo BUILD_TARGET=$BUILD_TARGET
7578
- source ./ci/dash/matrix.sh
79+
- echo HOST=${HOST}
80+
- echo DEP_OPTS=${DEP_OPTS}
7681

7782
# Setup some environment variables
7883
- |
@@ -170,43 +175,40 @@ builder-image:
170175
arm-linux-gnueabihf:
171176
extends: .build-depends-template
172177
variables:
173-
HOST: arm-linux-gnueabihf
178+
BUILD_TARGET: arm-linux
174179

175180
x86_64-w64-mingw32:
176181
extends:
177182
- .build-depends-template
178183
- .skip-in-fast-mode-template
179184
variables:
180-
HOST: x86_64-w64-mingw32
185+
BUILD_TARGET: win64
181186

182187
x86_64-pc-linux-gnu_debug:
183188
extends: .build-depends-template
184189
variables:
185-
HOST: x86_64-pc-linux-gnu
186-
DEP_OPTS: "DEBUG=1"
190+
BUILD_TARGET: linux64
187191

188192
x86_64-pc-linux-gnu_nowallet:
189193
extends:
190194
- .build-depends-template
191195
- .skip-in-fast-mode-template
192196
variables:
193-
HOST: x86_64-pc-linux-gnu
194-
DEP_OPTS: "NO_WALLET=1"
197+
BUILD_TARGET: linux64_nowallet
195198

196199
x86_64-pc-linux-gnu_multiprocess:
197200
extends:
198201
- .build-depends-template
199202
- .skip-in-fast-mode-template
200203
variables:
201-
HOST: x86_64-pc-linux-gnu
202-
DEP_OPTS: "DEBUG=1 MULTIPROCESS=1"
204+
BUILD_TARGET: linux64_multiprocess
203205

204206
x86_64-apple-darwin:
205207
extends:
206208
- .build-depends-template
207209
- .skip-in-fast-mode-template
208210
variables:
209-
HOST: x86_64-apple-darwin
211+
BUILD_TARGET: mac
210212

211213
###
212214

ci/test/00_setup_env_native_multiprocess.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_multiprocess
10+
export HOST=x86_64-pc-linux-gnu
1011
export PACKAGES="cmake python3 llvm clang"
1112
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
1213
export GOAL="install"

ci/test/00_setup_env_native_nowallet.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_nowallet
10+
export HOST=x86_64-pc-linux-gnu
1011
export PACKAGES="python3-zmq"
1112
export DEP_OPTS="NO_WALLET=1"
1213
export GOAL="install"

ci/test/00_setup_env_native_qt5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
99
export CONTAINER_NAME=ci_native_qt5
1010
export HOST=x86_64-pc-linux-gnu
1111
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
12-
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
12+
export DEP_OPTS="DEBUG=1"
1313
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_pruning,feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
1414
export RUN_UNIT_TESTS_SEQUENTIAL="true"
1515
export RUN_UNIT_TESTS="false"

0 commit comments

Comments
 (0)