mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 14:37:42 -03:00
Merge bitcoin/bitcoin#31428: ci: Allow build dir on CI host
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
8888ee4403
ci: Allow build dir on CI host (MarcoFalke) Pull request description: This is required to pass cross builds on to a different machine after the build. See for example https://github.com/bitcoin/bitcoin/pull/31176, but this pull will also allow someone to implement it outside this repo. ACKs for top commit: davidgumberg: lgtm ACK8888ee4403
hebasto: re-ACK8888ee4403
. Tree-SHA512: a1e2c32bc1b95efbd0b48287ac5b49e0e1bacbf5a5800845be5352bbdd3e17fa478e90348b2e94e95cf3ae863cdf75ab444089376588f6f8eec438f73a4b5b97
This commit is contained in:
commit
8fa10edcd1
2 changed files with 11 additions and 7 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
@ -270,16 +270,16 @@ jobs:
|
|||
timeout-minutes: 120
|
||||
env:
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
|
||||
DANGER_CI_ON_HOST_CACHE_FOLDERS: 1
|
||||
DANGER_CI_ON_HOST_FOLDERS: 1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set Ccache directory
|
||||
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Set base root directory
|
||||
run: echo "BASE_ROOT_DIR=${RUNNER_TEMP}" >> "$GITHUB_ENV"
|
||||
- name: Set CI directories
|
||||
run: |
|
||||
echo "CCACHE_DIR=${{ runner.temp }}/ccache_dir" >> "$GITHUB_ENV"
|
||||
echo "BASE_ROOT_DIR=${{ runner.temp }}" >> "$GITHUB_ENV"
|
||||
echo "BASE_BUILD_DIR=${{ runner.temp }}/build-asan" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Restore Ccache cache
|
||||
id: ccache-cache
|
||||
|
|
|
@ -78,18 +78,21 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
|||
CI_DEPENDS_MOUNT="type=volume,src=${CONTAINER_NAME}_depends,dst=$DEPENDS_DIR/built"
|
||||
CI_DEPENDS_SOURCES_MOUNT="type=volume,src=${CONTAINER_NAME}_depends_sources,dst=$DEPENDS_DIR/sources"
|
||||
CI_PREVIOUS_RELEASES_MOUNT="type=volume,src=${CONTAINER_NAME}_previous_releases,dst=$PREVIOUS_RELEASES_DIR"
|
||||
CI_BUILD_MOUNT=""
|
||||
|
||||
if [ "$DANGER_CI_ON_HOST_CACHE_FOLDERS" ]; then
|
||||
if [ "$DANGER_CI_ON_HOST_FOLDERS" ]; then
|
||||
# ensure the directories exist
|
||||
mkdir -p "${CCACHE_DIR}"
|
||||
mkdir -p "${DEPENDS_DIR}/built"
|
||||
mkdir -p "${DEPENDS_DIR}/sources"
|
||||
mkdir -p "${PREVIOUS_RELEASES_DIR}"
|
||||
mkdir -p "${BASE_BUILD_DIR}" # Unset by default, must be defined externally
|
||||
|
||||
CI_CCACHE_MOUNT="type=bind,src=${CCACHE_DIR},dst=$CCACHE_DIR"
|
||||
CI_DEPENDS_MOUNT="type=bind,src=${DEPENDS_DIR}/built,dst=$DEPENDS_DIR/built"
|
||||
CI_DEPENDS_SOURCES_MOUNT="type=bind,src=${DEPENDS_DIR}/sources,dst=$DEPENDS_DIR/sources"
|
||||
CI_PREVIOUS_RELEASES_MOUNT="type=bind,src=${PREVIOUS_RELEASES_DIR},dst=$PREVIOUS_RELEASES_DIR"
|
||||
CI_BUILD_MOUNT="--mount type=bind,src=${BASE_BUILD_DIR},dst=${BASE_BUILD_DIR}"
|
||||
fi
|
||||
|
||||
if [ "$DANGER_CI_ON_HOST_CCACHE_FOLDER" ]; then
|
||||
|
@ -131,6 +134,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
|||
--mount "${CI_DEPENDS_MOUNT}" \
|
||||
--mount "${CI_DEPENDS_SOURCES_MOUNT}" \
|
||||
--mount "${CI_PREVIOUS_RELEASES_MOUNT}" \
|
||||
${CI_BUILD_MOUNT} \
|
||||
--env-file /tmp/env-$USER-$CONTAINER_NAME \
|
||||
--name "$CONTAINER_NAME" \
|
||||
--network ci-ip6net \
|
||||
|
|
Loading…
Add table
Reference in a new issue