ci: add a tag input for manual releases and a Windows job
VoidBuildSystem CI / 1 · Requirements (push) Successful in 8s
VoidBuildSystem CI / 2 · Build (debug) (push) Successful in 2m32s
VoidBuildSystem CI / 2 · Build (asan) (push) Successful in 2m23s
VoidBuildSystem CI / 2 · Build (ubsan) (push) Successful in 4m38s
VoidBuildSystem CI / 2 · Build (relwithdebinfo) (push) Successful in 4m38s
VoidBuildSystem CI / 3 · Test (asan) (push) Successful in 2m8s
VoidBuildSystem CI / 3 · Test (ubsan) (push) Successful in 1m55s
VoidBuildSystem CI / 3b · Windows (MinGW-w64 + Wine) (push) Failing after 1m54s
VoidBuildSystem CI / 3 · Test (debug) (push) Failing after 6m44s
VoidBuildSystem CI / 3 · Test (relwithdebinfo) (push) Failing after 6m59s
VoidBuildSystem CI / 4 · Package (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped
VoidBuildSystem CI / 1 · Requirements (push) Successful in 8s
VoidBuildSystem CI / 2 · Build (debug) (push) Successful in 2m32s
VoidBuildSystem CI / 2 · Build (asan) (push) Successful in 2m23s
VoidBuildSystem CI / 2 · Build (ubsan) (push) Successful in 4m38s
VoidBuildSystem CI / 2 · Build (relwithdebinfo) (push) Successful in 4m38s
VoidBuildSystem CI / 3 · Test (asan) (push) Successful in 2m8s
VoidBuildSystem CI / 3 · Test (ubsan) (push) Successful in 1m55s
VoidBuildSystem CI / 3b · Windows (MinGW-w64 + Wine) (push) Failing after 1m54s
VoidBuildSystem CI / 3 · Test (debug) (push) Failing after 6m44s
VoidBuildSystem CI / 3 · Test (relwithdebinfo) (push) Failing after 6m59s
VoidBuildSystem CI / 4 · Package (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped
The manual dispatch can now publish a release for a given tag (the packages and the release use it), so existing releases can receive their assets without cutting a new tag. Add a MinGW-w64 + Wine job that cross-builds a Windows target from the debug build and runs its test under Wine. Note that VBS itself still only builds on Linux hosts; Windows is a target platform (Track C).
This commit is contained in:
1 parent
d95fb0d2f8
commit
c4d0783366
1 file changed
+75
-13
+75
-13
@@ -29,6 +29,10 @@ on:
|
|||||||
description: "Create/publish the Gitea release (only for a v* tag ref)"
|
description: "Create/publish the Gitea release (only for a v* tag ref)"
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
tag:
|
||||||
|
description: "Release tag to publish (empty: the pushed tag)"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -106,7 +110,7 @@ jobs:
|
|||||||
linker_flags: "-fsanitize=undefined"
|
linker_flags: "-fsanitize=undefined"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Configure (${{ matrix.name }}, ${{ matrix.build_type }})
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B "build/${{ matrix.name }}" -G Ninja \
|
cmake -S . -B "build/${{ matrix.name }}" -G Ninja \
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||||
@@ -114,9 +118,9 @@ jobs:
|
|||||||
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \
|
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.linker_flags }}" \
|
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.linker_flags }}" \
|
||||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||||
- name: Build (${{ matrix.name }})
|
- name: Build
|
||||||
run: cmake --build "build/${{ matrix.name }}" --parallel 4
|
run: cmake --build "build/${{ matrix.name }}" --parallel 4
|
||||||
- name: Upload the build (${{ matrix.name }})
|
- name: Upload the build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: vbs-build-${{ matrix.name }}
|
name: vbs-build-${{ matrix.name }}
|
||||||
@@ -151,14 +155,14 @@ jobs:
|
|||||||
UBSAN_OPTIONS: print_stacktrace=1
|
UBSAN_OPTIONS: print_stacktrace=1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Download the build (${{ matrix.name }})
|
- name: Download the build
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: vbs-build-${{ matrix.name }}
|
name: vbs-build-${{ matrix.name }}
|
||||||
path: build/${{ matrix.name }}
|
path: build/${{ matrix.name }}
|
||||||
- name: Make the restored binaries executable
|
- name: Make the restored binaries executable
|
||||||
run: chmod +x "build/${{ matrix.name }}/bin/"*
|
run: chmod +x "build/${{ matrix.name }}/bin/"*
|
||||||
- name: Run CTest (${{ matrix.name }})
|
- name: Run CTest
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
if [ -n "${{ matrix.test_regex }}" ]; then
|
if [ -n "${{ matrix.test_regex }}" ]; then
|
||||||
@@ -171,7 +175,7 @@ jobs:
|
|||||||
- name: Benchmark smoke run
|
- name: Benchmark smoke run
|
||||||
if: matrix.name == 'debug'
|
if: matrix.name == 'debug'
|
||||||
run: build/debug/bin/vbs_benchmarks --files 15
|
run: build/debug/bin/vbs_benchmarks --files 15
|
||||||
- name: Upload the test log (${{ matrix.name }})
|
- name: Upload the test log
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -179,6 +183,60 @@ jobs:
|
|||||||
path: ctest-${{ matrix.name }}.log
|
path: ctest-${{ matrix.name }}.log
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
|
windows:
|
||||||
|
name: "3b · Windows (MinGW-w64 + Wine)"
|
||||||
|
needs: build
|
||||||
|
runs-on: echoion-release-serial
|
||||||
|
env:
|
||||||
|
WINEDEBUG: "-all"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Download the debug build
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: vbs-build-debug
|
||||||
|
path: build/debug
|
||||||
|
- name: Make the restored binaries executable
|
||||||
|
run: chmod +x build/debug/bin/*
|
||||||
|
- name: Install the MinGW-w64 cross toolchain and Wine
|
||||||
|
run: |
|
||||||
|
sudo=""
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then sudo="sudo"; fi
|
||||||
|
if ! command -v x86_64-w64-mingw32-g++ >/dev/null 2>&1 ||
|
||||||
|
! command -v wine >/dev/null 2>&1; then
|
||||||
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
|
${sudo} apt-get update
|
||||||
|
${sudo} apt-get install -y mingw-w64 wine64 ||
|
||||||
|
${sudo} apt-get install -y mingw-w64 wine
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! command -v x86_64-w64-mingw32-g++ >/dev/null 2>&1; then
|
||||||
|
echo "x86_64-w64-mingw32-g++ is required for the Windows target build" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! command -v wine >/dev/null 2>&1 && command -v wine64 >/dev/null 2>&1; then
|
||||||
|
${sudo} ln -sf "$(command -v wine64)" /usr/local/bin/wine
|
||||||
|
fi
|
||||||
|
if ! command -v wine >/dev/null 2>&1; then
|
||||||
|
echo "wine is required to run the Windows test binaries" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
x86_64-w64-mingw32-g++ --version | head -1
|
||||||
|
wine --version
|
||||||
|
- name: Cross-build a Windows target and run it under Wine
|
||||||
|
run: |
|
||||||
|
set -o pipefail
|
||||||
|
build/debug/bin/vbs_v1_tests --no-color \
|
||||||
|
--filter track_c_windows_target_cross_build_and_wine_test \
|
||||||
|
2>&1 | tee ctest-windows.log
|
||||||
|
- name: Upload the Windows log
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: vbs-test-windows
|
||||||
|
path: ctest-windows.log
|
||||||
|
retention-days: 14
|
||||||
|
|
||||||
package:
|
package:
|
||||||
name: "4 · Package"
|
name: "4 · Package"
|
||||||
needs: test
|
needs: test
|
||||||
@@ -195,11 +253,13 @@ jobs:
|
|||||||
- name: Package the binaries, the SDK and the source
|
- name: Package the binaries, the SDK and the source
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
ref="${GITHUB_REF_NAME}"
|
label="${{ github.event.inputs.tag }}"
|
||||||
case "${ref}" in
|
if [ -z "${label}" ]; then
|
||||||
v*) label="${ref}" ;;
|
case "${GITHUB_REF_NAME}" in
|
||||||
*) label="dev-$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)" ;;
|
v*) label="${GITHUB_REF_NAME}" ;;
|
||||||
esac
|
*) label="dev-$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
stage="$(mktemp -d)"
|
stage="$(mktemp -d)"
|
||||||
mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" dist
|
mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" dist
|
||||||
cp build/relwithdebinfo/bin/vbs build/relwithdebinfo/bin/vbs-registry "${stage}/bin/"
|
cp build/relwithdebinfo/bin/vbs build/relwithdebinfo/bin/vbs-registry "${stage}/bin/"
|
||||||
@@ -233,7 +293,8 @@ jobs:
|
|||||||
path: dist
|
path: dist
|
||||||
- name: Verify the tag matches the project version
|
- name: Verify the tag matches the project version
|
||||||
run: |
|
run: |
|
||||||
tag="${GITHUB_REF_NAME}"
|
tag="${{ github.event.inputs.tag }}"
|
||||||
|
if [ -z "${tag}" ]; then tag="${GITHUB_REF_NAME}"; fi
|
||||||
version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)"
|
version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)"
|
||||||
echo "tag=${tag} project version=${version}"
|
echo "tag=${tag} project version=${version}"
|
||||||
case "${tag}" in
|
case "${tag}" in
|
||||||
@@ -249,7 +310,8 @@ jobs:
|
|||||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
tag="${GITHUB_REF_NAME}"
|
tag="${{ github.event.inputs.tag }}"
|
||||||
|
if [ -z "${tag}" ]; then tag="${GITHUB_REF_NAME}"; fi
|
||||||
case "${tag}" in
|
case "${tag}" in
|
||||||
v*) ;;
|
v*) ;;
|
||||||
*) echo "not a release tag (${tag}); skipping the release upload" ; exit 0 ;;
|
*) echo "not a release tag (${tag}); skipping the release upload" ; exit 0 ;;
|
||||||
|
|||||||
Reference in new issue
Block a user