File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,20 +35,40 @@ jobs:
3535 perl ./list.pl | cut -d/ -f2 | sort > list.pl.out
3636 diff ls.out list.pl.out
3737
38+ dfhack-ref :
39+ runs-on : ubuntu-latest
40+ outputs :
41+ ref : ${{ steps.resolve.outputs.ref }}
42+ steps :
43+ - id : resolve
44+ env :
45+ REPO : ${{ format('{0}/dfhack', github.event_name == 'push' && github.repository_owner || github.event.pull_request.base.repo.owner.login) }}
46+ BRANCH : ${{ github.base_ref || github.ref_name }}
47+ run : |
48+ ref="$BRANCH"
49+ [ "$ref" = master ] && ref=develop
50+ if [ "$ref" != develop ] && ! git ls-remote --exit-code --heads "https://github.com/$REPO" "$ref" >/dev/null 2>&1; then
51+ echo "no '$ref' branch in $REPO; falling back to develop"
52+ ref=develop
53+ fi
54+ echo "ref=$ref" >> "$GITHUB_OUTPUT"
55+
3856 test :
57+ needs : dfhack-ref
3958 uses : DFHack/dfhack/.github/workflows/test.yml@develop
4059 with :
4160 dfhack_repo : ${{ format('{0}/dfhack', github.event_name == 'push' && github.repository_owner || github.event.pull_request.base.repo.owner.login) }}
42- dfhack_ref : ${{ (((github.base_ref || github.ref_name) == 'master') && 'develop' || (github.base_ref || github.ref_name)) }}
61+ dfhack_ref : ${{ needs.dfhack-ref.outputs.ref }}
4362 structures_repo : ${{ github.repository }}
4463 structures_ref : ${{ github.ref }}
4564 secrets : inherit
4665
4766 docs :
67+ needs : dfhack-ref
4868 uses : DFHack/dfhack/.github/workflows/build-linux.yml@develop
4969 with :
5070 dfhack_repo : ${{ format('{0}/dfhack', github.event_name == 'push' && github.repository_owner || github.event.pull_request.base.repo.owner.login) }}
51- dfhack_ref : ${{ (((github.base_ref || github.ref_name) == 'master') && 'develop' || (github.base_ref || github.ref_name)) }}
71+ dfhack_ref : ${{ needs.dfhack-ref.outputs.ref }}
5272 structures_repo : ${{ github.repository }}
5373 structures_ref : ${{ github.ref }}
5474 artifact-name : docs
Original file line number Diff line number Diff line change @@ -13,7 +13,12 @@ if(BUILD_XMLDUMP)
1313 FetchContent_MakeAvailable (fmt)
1414 set (FMTLIB fmt)
1515 add_definitions ("-DUSE_FMTLIB" )
16- add_subdirectory (depends /lua )
16+ if (NOT TARGET lua)
17+ add_subdirectory (${dfhack_SOURCE_DIR } /depends/lua ${CMAKE_BINARY_DIR } /depends/lua )
18+ if (UNIX )
19+ set_target_properties (lua PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion" )
20+ endif ()
21+ endif ()
1722
1823 file (GLOB XML_FILES ../df.*.xml )
1924 set (TYPE_DUMP_GENERATOR "${CMAKE_CURRENT_SOURCE_DIR } /generate-type-dump.py" )
You can’t perform that action at this time.
0 commit comments