From 4c22f736ec0aa53c190179be741ffc190a560f78 Mon Sep 17 00:00:00 2001 From: Steve Cotton Date: Fri, 3 Feb 2023 04:50:15 +0100 Subject: [PATCH] Store glib build log on build failure The Windows CI builds are intermittently failing. Even though a prebuilt vcpkg is already cached, it will sometimes choose to rebuild lots of packages anyway. On some of those rebuilds, there's a failure when building glib. On the times that it does fail, the failure is often enough glib that checking the build log manually seems more reasonable than checking what failed. An alternative would be to look at why it sometimes chooses to rebuild, but that would mean remotely debugging a CMake config. I'm hoping the build log will have a clear compiler error pointing to a race condition in the order that packages are built. --- .github/workflows/ci-main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 6afe3e73b7d..bf014b20ad7 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -287,6 +287,15 @@ jobs: run: | cmake -DCMAKE_BUILD_TYPE=%CFG% -DENABLE_GAME=true -DENABLE_SERVER=true -DENABLE_CAMPAIGN_SERVER=true -DENABLE_TESTS=true -DENABLE_MYSQL=false -DENABLE_NLS=false -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=D:/a/wesnoth/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 16 2019" . +# Trying to find the cause of the intermittent build failures. This assumes that the failure was during building glib, +# but that seems regular enough that I'll check manually to see if it was. + - name: Store glib build log + uses: actions/upload-artifact@v3 + if: failure() + with: + name: glib-log + path: D:/a/wesnoth/vcpkg/buildtrees/glib/package-x64-windows-*-out.log + # delete buildtrees directory to free up space after cmake invokes vcpkg to build the dependencies # otherwise the job was failing when trying to write a .obj file # building vcpkg on the more spacious C drive didn't work since for some reason vcpkg decides to not create the pango/cairo pkgconfig files there