ci: three platform lanes with matching test and package stages
VoidBuildSystem CI / 1 · Requirements (push) Successful in 11s
VoidBuildSystem CI / 2C · Windows native build (debug) (push) Failing after 13s
VoidBuildSystem CI / 2C · Windows native build (sanitizers) (push) Failing after 13s
VoidBuildSystem CI / 2C · Windows native build (relwithdebinfo) (push) Failing after 12s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 3m38s
VoidBuildSystem CI / 3C · Windows native test (debug) (push) Failing after 3m15s
VoidBuildSystem CI / 3C · Windows native test (sanitizers) (push) Failing after 10s
VoidBuildSystem CI / 3C · Windows native test (relwithdebinfo) (push) Failing after 10s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 4m42s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 2m57s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m57s
VoidBuildSystem CI / 2B · Windows Wine build (sanitizers) (push) Successful in 3m33s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m55s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 5m4s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Canceled after 0s
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (sanitizers) (push) Canceled after 0s
VoidBuildSystem CI / 5 · Release (push) Canceled after 0s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Canceled after 7m22s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Canceled after 7m22s
VoidBuildSystem CI / 1 · Requirements (push) Successful in 11s
VoidBuildSystem CI / 2C · Windows native build (debug) (push) Failing after 13s
VoidBuildSystem CI / 2C · Windows native build (sanitizers) (push) Failing after 13s
VoidBuildSystem CI / 2C · Windows native build (relwithdebinfo) (push) Failing after 12s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 3m38s
VoidBuildSystem CI / 3C · Windows native test (debug) (push) Failing after 3m15s
VoidBuildSystem CI / 3C · Windows native test (sanitizers) (push) Failing after 10s
VoidBuildSystem CI / 3C · Windows native test (relwithdebinfo) (push) Failing after 10s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 4m42s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 2m57s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m57s
VoidBuildSystem CI / 2B · Windows Wine build (sanitizers) (push) Successful in 3m33s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m55s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 5m4s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Canceled after 0s
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (sanitizers) (push) Canceled after 0s
VoidBuildSystem CI / 5 · Release (push) Canceled after 0s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Canceled after 7m22s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Canceled after 7m22s
Graph: 1 Requirements -> 2A/2B/2C builds (Linux native, Windows Wine, Windows native; each with Debug, RelWithDebInfo, Sanitizers) -> 3A/3B/3C matching tests -> 4A/4B/4C packages -> 5 Release. The MSYS2 lane is split into build and test/package jobs so the downloadable Windows packages come from the test stage.
This commit is contained in:
1 parent
6129762cc6
commit
6fa70fb788
2 files changed
+170
-64
No files matched your search
@@ -1,22 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# Native Windows build, test and package for one variant.
|
||||
# Native Windows lane for one variant, driven inside MSYS2 UCRT64.
|
||||
#
|
||||
# Runs inside MSYS2 UCRT64 (invoked from the ci.yml windows-native job):
|
||||
# windows-native.sh <variant> <build_type>
|
||||
# windows-native.sh build <variant> <build_type> configure + build
|
||||
# windows-native.sh test <variant> <build_type> test + package
|
||||
#
|
||||
# Track C3 caveat: the VBS platform backends are Linux-only today and
|
||||
# VoidLibrary does not qualify Archive/Configuration/Crypto/System for Windows
|
||||
# yet (Void/Library issue #65), so this lane fails until that port lands.
|
||||
set -euo pipefail
|
||||
|
||||
variant="${1:?variant}"
|
||||
build_type="${2:?build type}"
|
||||
phase="${1:?phase (build or test)}"
|
||||
variant="${2:?variant}"
|
||||
build_type="${3:?build type}"
|
||||
|
||||
root="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
cd "${root}"
|
||||
|
||||
build="build/windows-${variant}"
|
||||
out="dist-windows-${variant}"
|
||||
|
||||
# Make sure the UCRT64 environment provides the build tools.
|
||||
if ! command -v cmake >/dev/null 2>&1 || ! command -v ninja >/dev/null 2>&1; then
|
||||
@@ -28,26 +28,37 @@ if ! command -v cmake >/dev/null 2>&1 || ! command -v ninja >/dev/null 2>&1; the
|
||||
fi
|
||||
fi
|
||||
|
||||
cmake -S . -B "${build}" -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE="${build_type}" \
|
||||
-DCMAKE_CXX_COMPILER=g++ \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
cmake --build "${build}" --parallel 4
|
||||
ctest --test-dir "${build}" --output-on-failure
|
||||
case "${phase}" in
|
||||
build)
|
||||
cmake -S . -B "${build}" -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE="${build_type}" \
|
||||
-DCMAKE_CXX_COMPILER=g++ \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
cmake --build "${build}" --parallel 4
|
||||
;;
|
||||
test)
|
||||
ctest --test-dir "${build}" --output-on-failure --no-tests=error
|
||||
|
||||
label="${VBS_RELEASE_TAG:-}"
|
||||
if [ -z "${label}" ]; then
|
||||
case "${GITHUB_REF_NAME:-}" in
|
||||
v*) label="${GITHUB_REF_NAME}" ;;
|
||||
*) label="dev-$(printf '%s' "${GITHUB_SHA:-local}" | cut -c1-7)" ;;
|
||||
esac
|
||||
fi
|
||||
out="dist-windows-${variant}"
|
||||
label="${VBS_RELEASE_TAG:-}"
|
||||
if [ -z "${label}" ]; then
|
||||
case "${GITHUB_REF_NAME:-}" in
|
||||
v*) label="${GITHUB_REF_NAME}" ;;
|
||||
*) label="dev-$(printf '%s' "${GITHUB_SHA:-local}" | cut -c1-7)" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
stage="$(mktemp -d)"
|
||||
mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" "${out}"
|
||||
cp "${build}"/bin/*.exe "${stage}/bin/" 2>/dev/null || true
|
||||
cp -r include/Void "${stage}/include/"
|
||||
find "${build}" -maxdepth 1 -name 'libVoidBuild_Sdk.a' -exec cp {} "${stage}/lib/" \;
|
||||
cp README.md LICENSE "${stage}/"
|
||||
tar -czf "${out}/vbs-${label}-windows-x86_64-${variant}.tar.gz" -C "${stage}" .
|
||||
ls -l "${out}/"
|
||||
stage="$(mktemp -d)"
|
||||
mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" "${out}"
|
||||
cp "${build}"/bin/*.exe "${stage}/bin/" 2>/dev/null || true
|
||||
cp -r include/Void "${stage}/include/"
|
||||
find "${build}" -maxdepth 1 -name 'libVoidBuild_Sdk.a' -exec cp {} "${stage}/lib/" \;
|
||||
cp README.md LICENSE "${stage}/"
|
||||
tar -czf "${out}/vbs-${label}-windows-x86_64-${variant}.tar.gz" -C "${stage}" .
|
||||
ls -l "${out}/"
|
||||
;;
|
||||
*)
|
||||
echo "unknown phase '${phase}' (expected build or test)" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
Reference in new issue
Block a user