ci(windows): locate the checkout via GITHUB_WORKSPACE
VoidBuildSystem CI / 1 · Requirements (push) Successful in 12s
VoidBuildSystem CI / 2C · Windows native build (debug) (push) Failing after 1m7s
VoidBuildSystem CI / 2C · Windows native build (sanitizers) (push) Failing after 17s
VoidBuildSystem CI / 2C · Windows native build (relwithdebinfo) (push) Failing after 37s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m35s
VoidBuildSystem CI / 3C · Windows native test (debug) (push) Failing after 21s
VoidBuildSystem CI / 3C · Windows native test (sanitizers) (push) Failing after 17s
VoidBuildSystem CI / 3C · Windows native test (relwithdebinfo) (push) Failing after 1m53s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 6m4s
VoidBuildSystem CI / 4B · Windows package (debug) (push) Successful in 1m23s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 6m29s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 4m16s
VoidBuildSystem CI / 4B · Windows package (sanitizers) (push) Successful in 22s
VoidBuildSystem CI / 4B · Windows package (relwithdebinfo) (push) Successful in 1m23s
VoidBuildSystem CI / 2B · Windows Wine build (sanitizers) (push) Successful in 4m32s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 4m18s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m41s
VoidBuildSystem CI / 3B · Windows Wine test (sanitizers) (push) Successful in 2m45s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 2m55s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 2m59s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Failing after 6m29s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Failing after 6m35s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Skipped
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Skipped
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped
VoidBuildSystem CI / 1 · Requirements (push) Successful in 12s
VoidBuildSystem CI / 2C · Windows native build (debug) (push) Failing after 1m7s
VoidBuildSystem CI / 2C · Windows native build (sanitizers) (push) Failing after 17s
VoidBuildSystem CI / 2C · Windows native build (relwithdebinfo) (push) Failing after 37s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m35s
VoidBuildSystem CI / 3C · Windows native test (debug) (push) Failing after 21s
VoidBuildSystem CI / 3C · Windows native test (sanitizers) (push) Failing after 17s
VoidBuildSystem CI / 3C · Windows native test (relwithdebinfo) (push) Failing after 1m53s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 6m4s
VoidBuildSystem CI / 4B · Windows package (debug) (push) Successful in 1m23s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 6m29s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 4m16s
VoidBuildSystem CI / 4B · Windows package (sanitizers) (push) Successful in 22s
VoidBuildSystem CI / 4B · Windows package (relwithdebinfo) (push) Successful in 1m23s
VoidBuildSystem CI / 2B · Windows Wine build (sanitizers) (push) Successful in 4m32s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 4m18s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m41s
VoidBuildSystem CI / 3B · Windows Wine test (sanitizers) (push) Successful in 2m45s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 2m55s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 2m59s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Failing after 6m29s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Failing after 6m35s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Skipped
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Skipped
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped
With `bash -s` the script's $0 is 'bash', so $(dirname $0)/../.. walked out of the checkout and cmake ran in the runner cache directory. Use the runner-provided GITHUB_WORKSPACE instead, and pass the sanitizer flags for the sanitizers variant.
This commit is contained in:
1 parent
95801ccfd7
commit
8768720e54
1 file changed
+16
-1
@@ -14,7 +14,13 @@ phase="${1:?phase (build or test)}"
|
||||
variant="${2:?variant}"
|
||||
build_type="${3:?build type}"
|
||||
|
||||
root="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
# The script is piped through `bash -s`, so $0 is "bash": locate the checkout
|
||||
# through GITHUB_WORKSPACE (set by the runner) instead of the script path.
|
||||
if [ -n "${GITHUB_WORKSPACE:-}" ]; then
|
||||
root="$(cygpath -u "${GITHUB_WORKSPACE}" 2>/dev/null || printf '%s' "${GITHUB_WORKSPACE}")"
|
||||
else
|
||||
root="$(pwd)"
|
||||
fi
|
||||
cd "${root}"
|
||||
echo "workspace: $(pwd)"
|
||||
|
||||
@@ -30,11 +36,20 @@ if ! command -v cmake >/dev/null 2>&1 || ! command -v ninja >/dev/null 2>&1; the
|
||||
fi
|
||||
fi
|
||||
|
||||
cxx_flags=""
|
||||
linker_flags=""
|
||||
if [ "${variant}" = "sanitizers" ]; then
|
||||
cxx_flags="-fsanitize=address,undefined -fno-omit-frame-pointer"
|
||||
linker_flags="-fsanitize=address,undefined"
|
||||
fi
|
||||
|
||||
case "${phase}" in
|
||||
build)
|
||||
cmake -S . -B "${build}" -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE="${build_type}" \
|
||||
-DCMAKE_CXX_COMPILER=g++ \
|
||||
-DCMAKE_CXX_FLAGS="${cxx_flags}" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${linker_flags}" \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
cmake --build "${build}" --parallel 4
|
||||
;;
|
||||
|
||||
Reference in new issue
Block a user