ci: package only the VBS installers
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Canceled after 4m39s
VoidBuildSystem CI / 1 · Requirements (push) Successful in 8s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m30s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 3m17s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Canceled after 0s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Canceled after 0s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m42s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m9s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Canceled after 0s
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Canceled after 0s
VoidBuildSystem CI / 5 · Release (push) Canceled after 0s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Canceled after 4m39s
VoidBuildSystem CI / 1 · Requirements (push) Successful in 8s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m30s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 3m17s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Canceled after 0s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Canceled after 0s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m42s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m9s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Canceled after 0s
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Canceled after 0s
VoidBuildSystem CI / 5 · Release (push) Canceled after 0s
Drop the regular Linux/Windows binary package jobs and restore the dedicated installer stage: 4A2 builds every installer format with VBS (linux target) and the windows-target formats, and the release publishes those installers (the Windows set when available).
This commit is contained in:
1 parent
ed6b5dfdd3
commit
ac5a7bf267
1 file changed
+119
-209
+119
-209
@@ -100,73 +100,6 @@ jobs:
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
- name: Build
|
||||
run: cmake --build "build/linux-${{ matrix.variant }}" --parallel 4
|
||||
- name: Create the Linux installers with VBS
|
||||
id: installers
|
||||
if: matrix.variant == 'relwithdebinfo'
|
||||
# The self-hosted install is still being stabilized: never fail the build job.
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set -eu
|
||||
vbs="build/linux-${{ matrix.variant }}/bin/vbs"
|
||||
version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)"
|
||||
label="${{ github.event.inputs.tag }}"
|
||||
if [ -z "${label}" ]; then
|
||||
case "${GITHUB_REF_NAME}" in
|
||||
v*) label="${GITHUB_REF_NAME}" ;;
|
||||
*) label="dev-$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)" ;;
|
||||
esac
|
||||
fi
|
||||
out=dist-installers
|
||||
prefix="$(mktemp -d)"
|
||||
mkdir -p "${out}"
|
||||
build_dir="build/selfhost-${GITHUB_RUN_ID}"
|
||||
install_archive() {
|
||||
local fmt="$1" ext="$2"
|
||||
local attempt=1
|
||||
while true; do
|
||||
if "${vbs}" install --project . --build-dir "${build_dir}" --profile release \
|
||||
--prefix "${prefix}" --package-name VoidBuildSystem \
|
||||
--package-version "${version}" \
|
||||
--archive "${out}/vbs-${label}-linux-x86_64-${fmt}.${ext}" \
|
||||
--archive-format "${fmt}"; then
|
||||
return 0
|
||||
fi
|
||||
if [ "${attempt}" -ge 2 ]; then
|
||||
echo "vbs install (${fmt}) failed after retry" >&2
|
||||
return 1
|
||||
fi
|
||||
attempt=$((attempt + 1))
|
||||
build_dir="${build_dir}-retry${attempt}"
|
||||
echo "retrying vbs install (${fmt}) in '${build_dir}'..." >&2
|
||||
done
|
||||
}
|
||||
for fmt in tar sh zip deb rpm wix dmg nuget; do
|
||||
case "${fmt}" in
|
||||
tar) ext=tar ;;
|
||||
wix) ext=wxs ;;
|
||||
nuget) ext=nupkg ;;
|
||||
*) ext="${fmt}" ;;
|
||||
esac
|
||||
install_archive "${fmt}" "${ext}"
|
||||
done
|
||||
ls -l "${out}/"
|
||||
- name: Collect installer diagnostics
|
||||
if: steps.installers.outcome == 'failure'
|
||||
run: |
|
||||
df -h . || true
|
||||
for tree in $(find build/selfhost-* -type d -path '*snapshots/trees/*' \
|
||||
-not -name '*.staging_*' 2>/dev/null); do
|
||||
echo "== ${tree}"
|
||||
echo "files on disk: $(find "${tree}" -type f | wc -l)"
|
||||
ls "${tree}/src/Log" 2>/dev/null | head -5
|
||||
done
|
||||
- name: Upload the installers
|
||||
if: steps.installers.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: vbs-installers-linux-${{ matrix.variant }}
|
||||
path: dist-installers/
|
||||
retention-days: 30
|
||||
- name: Upload the build
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -231,62 +164,6 @@ jobs:
|
||||
path: ctest-linux-${{ matrix.variant }}.log
|
||||
retention-days: 14
|
||||
|
||||
linux-package:
|
||||
name: "4A · Linux package (${{ matrix.variant }})"
|
||||
needs: linux-test
|
||||
runs-on: vulkan
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- variant: debug
|
||||
- variant: relwithdebinfo
|
||||
- variant: sanitizers
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download the build
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: vbs-linux-build-${{ matrix.variant }}
|
||||
path: build/linux-${{ matrix.variant }}
|
||||
- name: Make the restored binaries executable
|
||||
run: chmod +x "build/linux-${{ matrix.variant }}/bin/"*
|
||||
- name: Package the binaries, the SDK and the headers
|
||||
run: |
|
||||
set -eu
|
||||
label="${{ github.event.inputs.tag }}"
|
||||
if [ -z "${label}" ]; then
|
||||
case "${GITHUB_REF_NAME}" in
|
||||
v*) label="${GITHUB_REF_NAME}" ;;
|
||||
*) label="dev-$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)" ;;
|
||||
esac
|
||||
fi
|
||||
stage="$(mktemp -d)"
|
||||
out="dist-linux-${{ matrix.variant }}"
|
||||
mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" "${out}"
|
||||
cp "build/linux-${{ matrix.variant }}/bin/vbs" \
|
||||
"build/linux-${{ matrix.variant }}/bin/vbs-registry" "${stage}/bin/"
|
||||
cp -r include/Void "${stage}/include/"
|
||||
cp "build/linux-${{ matrix.variant }}/libVoidBuild_Sdk.a" "${stage}/lib/"
|
||||
cp README.md LICENSE "${stage}/"
|
||||
tar --sort=name --mtime='@0' --owner=0 --group=0 --numeric-owner \
|
||||
-czf "${out}/vbs-${label}-linux-x86_64-${{ matrix.variant }}.tar.gz" -C "${stage}" .
|
||||
if [ "${{ matrix.variant }}" = "relwithdebinfo" ]; then
|
||||
"build/linux-${{ matrix.variant }}/bin/vbs" pack --project . \
|
||||
--output "${out}/vbs-${label}-source.tar"
|
||||
fi
|
||||
ls -l "${out}/"
|
||||
- name: Upload the package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: vbs-linux-package-${{ matrix.variant }}
|
||||
path: dist-linux-${{ matrix.variant }}/
|
||||
retention-days: 30
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 2B / 3B / 4B - Windows via Wine: VBS is cross-compiled with MinGW-w64, its
|
||||
# test executables run under Wine, and the Windows binaries are packaged.
|
||||
# ---------------------------------------------------------------------------
|
||||
wine-build:
|
||||
name: "2B · Windows Wine build (${{ matrix.variant }})"
|
||||
needs: requirements
|
||||
@@ -309,48 +186,6 @@ jobs:
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
- name: Build
|
||||
run: cmake --build "build/wine-${{ matrix.variant }}" --parallel 4
|
||||
- name: Create the Windows installers with VBS
|
||||
id: win_installers
|
||||
if: matrix.variant == 'relwithdebinfo'
|
||||
# Cross-installing for Windows is new: never fail the build job.
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set -eu
|
||||
vbs="build/wine-${{ matrix.variant }}/bin/vbs"
|
||||
version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)"
|
||||
label="${{ github.event.inputs.tag }}"
|
||||
if [ -z "${label}" ]; then
|
||||
case "${GITHUB_REF_NAME}" in
|
||||
v*) label="${GITHUB_REF_NAME}" ;;
|
||||
*) label="dev-$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)" ;;
|
||||
esac
|
||||
fi
|
||||
out=dist-installers-windows
|
||||
prefix="$(mktemp -d)"
|
||||
mkdir -p "${out}"
|
||||
build_dir="build/selfhost-windows-${GITHUB_RUN_ID}"
|
||||
for fmt in tar zip nuget wix; do
|
||||
case "${fmt}" in
|
||||
tar) ext=tar ;;
|
||||
wix) ext=wxs ;;
|
||||
nuget) ext=nupkg ;;
|
||||
*) ext="${fmt}" ;;
|
||||
esac
|
||||
"${vbs}" install --project . --build-dir "${build_dir}" --profile release \
|
||||
--target-os windows --target-arch x86_64 \
|
||||
--prefix "${prefix}" --package-name VoidBuildSystem \
|
||||
--package-version "${version}" \
|
||||
--archive "${out}/vbs-${label}-windows-x86_64-${fmt}.${ext}" \
|
||||
--archive-format "${fmt}"
|
||||
done
|
||||
ls -l "${out}/"
|
||||
- name: Upload the Windows installers
|
||||
if: steps.win_installers.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: vbs-installers-windows-${{ matrix.variant }}
|
||||
path: dist-installers-windows/
|
||||
retention-days: 30
|
||||
- name: Stage the MinGW runtime DLLs
|
||||
run: |
|
||||
for lib in libstdc++-6.dll libgcc_s_seh-1.dll libwinpthread-1.dll; do
|
||||
@@ -429,26 +264,27 @@ jobs:
|
||||
path: ctest-wine-${{ matrix.variant }}.log
|
||||
retention-days: 14
|
||||
|
||||
wine-package:
|
||||
name: "4B · Windows package (${{ matrix.variant }})"
|
||||
needs: wine-test
|
||||
runs-on: windows-gcc
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- variant: debug
|
||||
- variant: relwithdebinfo
|
||||
# ---------------------------------------------------------------------------
|
||||
# 4A2 - the release installers, built and packaged by VBS itself
|
||||
# ---------------------------------------------------------------------------
|
||||
vbs-installers:
|
||||
name: "4A2 · VBS installers (linux target)"
|
||||
needs: linux-test
|
||||
runs-on: vulkan
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download the build
|
||||
- name: Download the RelWithDebInfo build
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: vbs-wine-build-${{ matrix.variant }}
|
||||
path: build/wine-${{ matrix.variant }}
|
||||
- name: Package the Windows binaries, the SDK and the headers
|
||||
name: vbs-linux-build-relwithdebinfo
|
||||
path: build/linux-relwithdebinfo
|
||||
- name: Make the restored binaries executable
|
||||
run: chmod +x build/linux-relwithdebinfo/bin/*
|
||||
- name: Build and package every installer format with VBS
|
||||
run: |
|
||||
set -eu
|
||||
vbs=build/linux-relwithdebinfo/bin/vbs
|
||||
version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)"
|
||||
label="${{ github.event.inputs.tag }}"
|
||||
if [ -z "${label}" ]; then
|
||||
case "${GITHUB_REF_NAME}" in
|
||||
@@ -456,49 +292,123 @@ jobs:
|
||||
*) label="dev-$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)" ;;
|
||||
esac
|
||||
fi
|
||||
stage="$(mktemp -d)"
|
||||
out="dist-windows-${{ matrix.variant }}"
|
||||
mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" "${out}"
|
||||
cp "build/wine-${{ matrix.variant }}/bin/"*.exe "${stage}/bin/"
|
||||
cp "build/wine-${{ matrix.variant }}/bin/"*.dll "${stage}/bin/" 2>/dev/null || true
|
||||
cp -r include/Void "${stage}/include/"
|
||||
cp "build/wine-${{ matrix.variant }}/libVoidBuild_Sdk.a" "${stage}/lib/"
|
||||
cp README.md LICENSE "${stage}/"
|
||||
tar --sort=name --mtime='@0' --owner=0 --group=0 --numeric-owner \
|
||||
-czf "${out}/vbs-${label}-windows-x86_64-${{ matrix.variant }}.tar.gz" -C "${stage}" .
|
||||
out=dist-installers
|
||||
prefix="$(mktemp -d)"
|
||||
mkdir -p "${out}"
|
||||
build_dir="build/selfhost-${GITHUB_RUN_ID}"
|
||||
install_archive() {
|
||||
local fmt="$1" ext="$2"
|
||||
local attempt=1
|
||||
while true; do
|
||||
if "${vbs}" install --project . --build-dir "${build_dir}" --profile release \
|
||||
--prefix "${prefix}" --package-name VoidBuildSystem \
|
||||
--package-version "${version}" \
|
||||
--archive "${out}/vbs-${label}-linux-x86_64-${fmt}.${ext}" \
|
||||
--archive-format "${fmt}"; then
|
||||
return 0
|
||||
fi
|
||||
if [ "${attempt}" -ge 2 ]; then
|
||||
echo "vbs install (${fmt}) failed after retry" >&2
|
||||
return 1
|
||||
fi
|
||||
attempt=$((attempt + 1))
|
||||
build_dir="${build_dir}-retry${attempt}"
|
||||
echo "retrying vbs install (${fmt}) in '${build_dir}'..." >&2
|
||||
done
|
||||
}
|
||||
for fmt in tar sh zip deb rpm wix dmg nuget; do
|
||||
case "${fmt}" in
|
||||
tar) ext=tar ;;
|
||||
wix) ext=wxs ;;
|
||||
nuget) ext=nupkg ;;
|
||||
*) ext="${fmt}" ;;
|
||||
esac
|
||||
install_archive "${fmt}" "${ext}"
|
||||
done
|
||||
ls -l "${out}/"
|
||||
- name: Upload the Windows package
|
||||
- name: Collect installer diagnostics
|
||||
if: failure()
|
||||
run: |
|
||||
df -h . || true
|
||||
for tree in $(find build/selfhost-* -type d -path '*snapshots/trees/*' \
|
||||
-not -name '*.staging_*' 2>/dev/null); do
|
||||
echo "== ${tree}"
|
||||
echo "files on disk: $(find "${tree}" -type f | wc -l)"
|
||||
ls "${tree}/src/Log" 2>/dev/null | head -5
|
||||
done
|
||||
- name: Upload the installers
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: vbs-windows-package-${{ matrix.variant }}
|
||||
path: dist-windows-${{ matrix.variant }}/
|
||||
name: vbs-installers-linux-relwithdebinfo
|
||||
path: dist-installers/
|
||||
retention-days: 30
|
||||
|
||||
vbs-installers-windows:
|
||||
name: "4A2 · VBS installers (windows target)"
|
||||
needs: linux-test
|
||||
runs-on: windows-gcc
|
||||
# Cross-installing for Windows through VBS is new: report it without
|
||||
# blocking the release until it is proven.
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download the RelWithDebInfo build
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: vbs-linux-build-relwithdebinfo
|
||||
path: build/linux-relwithdebinfo
|
||||
- name: Make the restored binaries executable
|
||||
run: chmod +x build/linux-relwithdebinfo/bin/*
|
||||
- name: Build and package the Windows installers with VBS
|
||||
run: |
|
||||
set -eu
|
||||
vbs=build/linux-relwithdebinfo/bin/vbs
|
||||
version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)"
|
||||
label="${{ github.event.inputs.tag }}"
|
||||
if [ -z "${label}" ]; then
|
||||
case "${GITHUB_REF_NAME}" in
|
||||
v*) label="${GITHUB_REF_NAME}" ;;
|
||||
*) label="dev-$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)" ;;
|
||||
esac
|
||||
fi
|
||||
out=dist-installers-windows
|
||||
prefix="$(mktemp -d)"
|
||||
mkdir -p "${out}"
|
||||
build_dir="build/selfhost-windows-${GITHUB_RUN_ID}"
|
||||
for fmt in tar zip nuget wix; do
|
||||
case "${fmt}" in
|
||||
tar) ext=tar ;;
|
||||
wix) ext=wxs ;;
|
||||
nuget) ext=nupkg ;;
|
||||
*) ext="${fmt}" ;;
|
||||
esac
|
||||
"${vbs}" install --project . --build-dir "${build_dir}" --profile release \
|
||||
--target-os windows --target-arch x86_64 \
|
||||
--prefix "${prefix}" --package-name VoidBuildSystem \
|
||||
--package-version "${version}" \
|
||||
--archive "${out}/vbs-${label}-windows-x86_64-${fmt}.${ext}" \
|
||||
--archive-format "${fmt}"
|
||||
done
|
||||
ls -l "${out}/"
|
||||
- name: Upload the Windows installers
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: vbs-installers-windows-relwithdebinfo
|
||||
path: dist-installers-windows/
|
||||
if-no-files-found: ignore
|
||||
retention-days: 30
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 5 - Release
|
||||
# ---------------------------------------------------------------------------
|
||||
release:
|
||||
name: "5 · Release"
|
||||
# Linked to every package lane and only dispatched for a release tag or an
|
||||
# explicit publish dispatch (always() would queue the job on every push).
|
||||
needs: [linux-package, wine-package]
|
||||
needs: [vbs-installers, vbs-installers-windows]
|
||||
if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.publish == 'true'
|
||||
runs-on: vulkan
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download the RelWithDebInfo Linux package
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: vbs-linux-package-relwithdebinfo
|
||||
path: dist
|
||||
- name: Download the RelWithDebInfo Windows package (when available)
|
||||
continue-on-error: true
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: vbs-windows-package-relwithdebinfo
|
||||
path: dist
|
||||
- name: Download the Linux installers (when available)
|
||||
continue-on-error: true
|
||||
- name: Download the Linux installers
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: vbs-installers-linux-relwithdebinfo
|
||||
|
||||
Reference in new issue
Block a user