From 1c8912da44536b3988ba3f0166d8abf259fe696d Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 22 Sep 2026 19:08:19 -0500 Subject: [PATCH 1/7] fix lua dependency for check-type-sizes workflow --- tools/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 711bd520e..11249b492 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -13,7 +13,7 @@ if(BUILD_XMLDUMP) FetchContent_MakeAvailable(fmt) set(FMTLIB fmt) add_definitions("-DUSE_FMTLIB") - add_subdirectory(depends/lua) + add_subdirectory(${dfhack_SOURCE_DIR}/depends/lua) file(GLOB XML_FILES ../df.*.xml) set(TYPE_DUMP_GENERATOR "${CMAKE_CURRENT_SOURCE_DIR}/generate-type-dump.py") From c01b22b330d87f086a5a86eaf121870b5651e2e5 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 22 Sep 2026 19:09:21 -0500 Subject: [PATCH 2/7] remove trailing whitespace (doh) --- tools/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 11249b492..333759e77 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -13,7 +13,7 @@ if(BUILD_XMLDUMP) FetchContent_MakeAvailable(fmt) set(FMTLIB fmt) add_definitions("-DUSE_FMTLIB") - add_subdirectory(${dfhack_SOURCE_DIR}/depends/lua) + add_subdirectory(${dfhack_SOURCE_DIR}/depends/lua) file(GLOB XML_FILES ../df.*.xml) set(TYPE_DUMP_GENERATOR "${CMAKE_CURRENT_SOURCE_DIR}/generate-type-dump.py") From f747bfab120a34681fd25fa57fb41f614506bde1 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 22 Sep 2026 19:20:17 -0500 Subject: [PATCH 3/7] more tweak --- tools/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 333759e77..633d73f38 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -13,7 +13,9 @@ if(BUILD_XMLDUMP) FetchContent_MakeAvailable(fmt) set(FMTLIB fmt) add_definitions("-DUSE_FMTLIB") - add_subdirectory(${dfhack_SOURCE_DIR}/depends/lua) + if(NOT TARGET lua) + add_subdirectory(${dfhack_SOURCE_DIR}/depends/lua ${CMAKE_BINARY_DIR}/depends/lua) + endif() file(GLOB XML_FILES ../df.*.xml) set(TYPE_DUMP_GENERATOR "${CMAKE_CURRENT_SOURCE_DIR}/generate-type-dump.py") From ce75110c17f7665a1f0ac795d2e3c33ed7c7f9d6 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 22 Sep 2026 19:26:43 -0500 Subject: [PATCH 4/7] fix collateral branch inference logic --- .github/workflows/build.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3945bff1e..9da4c3d1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,11 +35,30 @@ jobs: perl ./list.pl | cut -d/ -f2 | sort > list.pl.out diff ls.out list.pl.out + dfhack-ref: + runs-on: ubuntu-latest + outputs: + ref: ${{ steps.resolve.outputs.ref }} + steps: + - id: resolve + env: + REPO: ${{ format('{0}/dfhack', github.event_name == 'push' && github.repository_owner || github.event.pull_request.base.repo.owner.login) }} + BRANCH: ${{ github.base_ref || github.ref_name }} + run: | + ref="$BRANCH" + [ "$ref" = master ] && ref=develop + if [ "$ref" != develop ] && ! git ls-remote --exit-code --heads "https://github.com/$REPO" "$ref" >/dev/null 2>&1; then + echo "no '$ref' branch in $REPO; falling back to develop" + ref=develop + fi + echo "ref=$ref" >> "$GITHUB_OUTPUT" + test: + needs: dfhack-ref uses: DFHack/dfhack/.github/workflows/test.yml@develop with: dfhack_repo: ${{ format('{0}/dfhack', github.event_name == 'push' && github.repository_owner || github.event.pull_request.base.repo.owner.login) }} - dfhack_ref: ${{ (((github.base_ref || github.ref_name) == 'master') && 'develop' || (github.base_ref || github.ref_name)) }} + dfhack_ref: ${{ needs.dfhack-ref.outputs.ref }} structures_repo: ${{ github.repository }} structures_ref: ${{ github.ref }} secrets: inherit From d668a57d0c31ef8d07742cf9cb04471bd78561b4 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 22 Sep 2026 19:27:59 -0500 Subject: [PATCH 5/7] fix whitespace --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9da4c3d1a..e288038c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,7 @@ jobs: ref=develop fi echo "ref=$ref" >> "$GITHUB_OUTPUT" - + test: needs: dfhack-ref uses: DFHack/dfhack/.github/workflows/test.yml@develop From 53683bccac023b78f329497ad2d890d315be7c3a Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 22 Sep 2026 19:36:21 -0500 Subject: [PATCH 6/7] missed the docs branch --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e288038c0..c27809525 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,10 +64,11 @@ jobs: secrets: inherit docs: + needs: dfhack-ref uses: DFHack/dfhack/.github/workflows/build-linux.yml@develop with: dfhack_repo: ${{ format('{0}/dfhack', github.event_name == 'push' && github.repository_owner || github.event.pull_request.base.repo.owner.login) }} - dfhack_ref: ${{ (((github.base_ref || github.ref_name) == 'master') && 'develop' || (github.base_ref || github.ref_name)) }} + dfhack_ref: ${{ needs.dfhack-ref.outputs.ref }} structures_repo: ${{ github.repository }} structures_ref: ${{ github.ref }} artifact-name: docs From 268bba4843dfe8cc8a471a84c4243f13dadcb700 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 22 Sep 2026 19:42:14 -0500 Subject: [PATCH 7/7] add gcc-specific flags --- tools/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 633d73f38..bd89b6a72 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -15,6 +15,9 @@ if(BUILD_XMLDUMP) add_definitions("-DUSE_FMTLIB") if(NOT TARGET lua) add_subdirectory(${dfhack_SOURCE_DIR}/depends/lua ${CMAKE_BINARY_DIR}/depends/lua) + if (UNIX) + set_target_properties(lua PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion") + endif() endif() file(GLOB XML_FILES ../df.*.xml)