File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 6
6
7
7
export LC_ALL=C.UTF-8
8
8
9
+ CFG_DONE=" ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice
10
+
11
+ if [ " $( git config --global ${CFG_DONE} ) " == " true" ]; then
12
+ echo " Skip base install"
13
+ exit 0
14
+ fi
9
15
10
16
if [ -n " $DPKG_ADD_ARCH " ]; then
11
17
dpkg --add-architecture " $DPKG_ADD_ARCH "
@@ -51,11 +57,9 @@ if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
51
57
fi
52
58
53
59
if [[ " ${RUN_TIDY} " == " true" ]]; then
54
- if [ ! -d " ${DIR_IWYU} " ]; then
55
- git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_16 " ${DIR_IWYU} " /include-what-you-use
56
- cmake -B " ${DIR_IWYU} " /build/ -G ' Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-16 -S " ${DIR_IWYU} " /include-what-you-use
57
- make -C " ${DIR_IWYU} " /build/ install " $MAKEJOBS "
58
- fi
60
+ git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_16 " ${DIR_IWYU} " /include-what-you-use
61
+ cmake -B " ${DIR_IWYU} " /build/ -G ' Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-16 -S " ${DIR_IWYU} " /include-what-you-use
62
+ make -C " ${DIR_IWYU} " /build/ install " $MAKEJOBS "
59
63
fi
60
64
61
65
mkdir -p " ${DEPENDS_DIR} /SDKs" " ${DEPENDS_DIR} /sdk-sources"
@@ -80,3 +84,5 @@ if [ -n "$ANDROID_HOME" ] && [ ! -d "$ANDROID_HOME" ]; then
80
84
unzip -o " $ANDROID_TOOLS_PATH " -d " $ANDROID_HOME "
81
85
yes | " ${ANDROID_HOME} " /cmdline-tools/bin/sdkmanager --sdk_root=" ${ANDROID_HOME} " --install " build-tools;${ANDROID_BUILD_TOOLS_VERSION} " " platform-tools" " platforms;android-${ANDROID_API_LEVEL} " " ndk;${ANDROID_NDK_VERSION} "
82
86
fi
87
+
88
+ git config --global ${CFG_DONE} " true"
Original file line number Diff line number Diff line change @@ -55,21 +55,22 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
55
55
$CONTAINER_NAME )
56
56
export CI_CONTAINER_ID
57
57
export CI_EXEC_CMD_PREFIX=" docker exec ${CI_CONTAINER_ID} "
58
- $CI_EXEC_CMD_PREFIX rsync --archive --stats --human-readable /ci_base_install/ " ${BASE_ROOT_DIR} "
59
- $CI_EXEC_CMD_PREFIX rsync --archive --stats --human-readable /ro_base/ " $BASE_ROOT_DIR "
60
- # Fixes permission issues when there is a container UID/GID mismatch with the owner
61
- # of the mounted bitcoin src dir.
62
- $CI_EXEC_CMD_PREFIX git config --global --add safe.directory " *"
63
58
else
64
59
echo " Running on host system without docker wrapper"
65
- " ${BASE_ROOT_DIR} /ci/test/01_base_install.sh"
66
60
fi
67
61
68
62
CI_EXEC () {
69
63
$CI_EXEC_CMD_PREFIX bash -c " export PATH=${BINS_SCRATCH_DIR} :\$ PATH && cd \" $P_CI_DIR \" && $* "
70
64
}
71
65
export -f CI_EXEC
72
66
67
+ CI_EXEC rsync --archive --stats --human-readable /ci_base_install/ " ${BASE_ROOT_DIR} " || echo " /ci_base_install/ missing"
68
+ CI_EXEC " ${BASE_ROOT_DIR} /ci/test/01_base_install.sh"
69
+ CI_EXEC rsync --archive --stats --human-readable /ro_base/ " ${BASE_ROOT_DIR} " || echo " Nothing to copy from ro_base"
70
+ # Fixes permission issues when there is a container UID/GID mismatch with the owner
71
+ # of the git source code directory.
72
+ CI_EXEC git config --global --add safe.directory \" * \"
73
+
73
74
CI_EXEC mkdir -p " ${BINS_SCRATCH_DIR} "
74
75
75
76
if [ " $CI_OS_NAME " == " macos" ]; then
You can’t perform that action at this time.
0 commit comments