From 9913681f5d46b3d1382b3a54e47e98894df7bbad Mon Sep 17 00:00:00 2001 From: Andrew Krieger Date: Sat, 11 Sep 2021 11:43:50 -0700 Subject: [PATCH] [WIP] Try to fix @jbtw's windows CI for object creator --- .github/workflows/object_creator.yml | 113 ++++++++++++++++++ .../Cataclysm-lib-vcpkg-static.vcxproj | 4 +- .../Cataclysm-test-vcpkg-static.vcxproj | 4 +- .../Cataclysm-vcpkg-static.vcxproj | 4 +- .../JsonFormatter-lib-vcpkg-static.vcxproj | 4 +- .../JsonFormatter-vcpkg-static.vcxproj | 4 +- msvc-full-features/vcpkg.json | 3 +- .../ObjectCreator-vcpkg-static.vcxproj | 6 +- msvc-object_creator/vcpkg.json | 11 +- 9 files changed, 131 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/object_creator.yml diff --git a/.github/workflows/object_creator.yml b/.github/workflows/object_creator.yml new file mode 100644 index 0000000000000..251ade9c23998 --- /dev/null +++ b/.github/workflows/object_creator.yml @@ -0,0 +1,113 @@ +name: ObjectCreator Windows build + +on: + push: + branches: + - master + - 0.F-dev + paths-ignore: + - 'android/**' + - 'build-data/osx/**' + - 'doc/**' + - 'doxygen_doc/**' + - 'lgtm/**' + - 'tools/**' + - 'utilities/**' + pull_request: + branches: + - master + - 0.F-dev + paths-ignore: + - 'android/**' + - 'build-data/osx/**' + - 'doc/**' + - 'doxygen_doc/**' + - 'lgtm/**' + - 'tools/**' + - 'utilities/**' + +jobs: + build_object_creator: + name: Build + runs-on: windows-2019 + + steps: + - name: checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + + # We have to use at least this version of vcpkg to include fixes for yasm-tool's + # availability only as an x86 host tool. Keep it in sync with the builtin-baseline + # field in vcpkg.json + - name: Restore artifacts, or run vcpkg, build and cache artifacts + uses: lukka/run-vcpkg@main + id: runvcpkg + with: + additionalCachedPaths: '${{ runner.workspace }}/Cataclysm-DDA/msvc-object_creator/vcpkg_installed' + vcpkgArguments: '--x-manifest-root=${{ runner.workspace }}/Cataclysm-DDA/msvc-object_creator/ --x-install-root=${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed/' + vcpkgTriplet: 'x64-windows-static' + vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' + vcpkgGitCommitId: '49b67d9cb856424ff69f10e7721aec5299624268' + + # There's not enough disk space to build both release and debug versions of + # our dependencies, so we hack the triplet file to build only release + # versions + - name: Disable debug builds for vcpkg + run: | + Get-ChildItem "${{ runner.workspace }}/b/vcpkg/triplets" -File | + Foreach-Object { + Add-Content $_.FullName "set(VCPKG_BUILD_TYPE release)`n" + } + + - name: Integrate vcpkg + run: | + vcpkg integrate install + + - name: Dump vcpkg logs if vcpkg build failed + if: failure() + run: | + Get-ChildItem "${{ runner.workspace }}/b/vcpkg/buildtrees" | + Foreach-Object { + Get-ChildItem $_.FullName -Filter *.log | + Foreach-Object { + echo ================================================= + echo $_.FullName + echo ================================================= + type $_.FullName + } + } + + - name: Check for yasm + run: | + echo ================================================= + Get-ChildItem "${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed" + echo ================================================= + + - name: Build + run: | + cd msvc-object_creator + msbuild -m -p:Configuration=Release -p:Platform=x64 ObjectCreator-vcpkg-static.sln + + - name: Dump vcpkg logs if vcpkg build failed + if: failure() + run: | + echo ================================================= + Get-ChildItem "${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed" -Recurse + echo ================================================= + echo "${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed/x64-windows-static/share/yasm-tool-helper/yasm-tool-helper.cmake" + echo ================================================= + type "${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed/x64-windows-static/share/yasm-tool-helper/yasm-tool-helper.cmake" + Get-ChildItem "${{ runner.workspace }}/b/vcpkg/buildtrees" | + Foreach-Object { + Get-ChildItem $_.FullName -Filter *.log | + Foreach-Object { + echo ================================================= + echo $_.FullName + echo ================================================= + type $_.FullName + } + } diff --git a/msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj b/msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj index e37e834a2f336..36ba9f2fd8884 100644 --- a/msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj +++ b/msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj @@ -33,8 +33,8 @@ true true true - x86-windows - x64-windows + x86-windows-static + x64-windows-static $(Configuration) diff --git a/msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj b/msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj index a4f9feef51f62..59c79d81a2841 100644 --- a/msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj +++ b/msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj @@ -33,8 +33,8 @@ false true true - x86-windows - x64-windows + x86-windows-static + x64-windows-static $(Configuration) diff --git a/msvc-full-features/Cataclysm-vcpkg-static.vcxproj b/msvc-full-features/Cataclysm-vcpkg-static.vcxproj index bd0dd4a506962..f98e74873964e 100644 --- a/msvc-full-features/Cataclysm-vcpkg-static.vcxproj +++ b/msvc-full-features/Cataclysm-vcpkg-static.vcxproj @@ -33,8 +33,8 @@ false true true - x86-windows - x64-windows + x86-windows-static + x64-windows-static $(Configuration) diff --git a/msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj b/msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj index 5201f5fee95d3..be41ffcb476a1 100644 --- a/msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj +++ b/msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj @@ -33,8 +33,8 @@ false true true - x86-windows - x64-windows + x86-windows-static + x64-windows-static $(Configuration) diff --git a/msvc-full-features/JsonFormatter-vcpkg-static.vcxproj b/msvc-full-features/JsonFormatter-vcpkg-static.vcxproj index 284def1dbe416..701cb1c8650c1 100644 --- a/msvc-full-features/JsonFormatter-vcpkg-static.vcxproj +++ b/msvc-full-features/JsonFormatter-vcpkg-static.vcxproj @@ -33,8 +33,8 @@ false true true - x86-windows - x64-windows + x86-windows-static + x64-windows-static $(Configuration) diff --git a/msvc-full-features/vcpkg.json b/msvc-full-features/vcpkg.json index 7f3b25de574bc..5f77f8a645bc5 100644 --- a/msvc-full-features/vcpkg.json +++ b/msvc-full-features/vcpkg.json @@ -10,5 +10,6 @@ }, "sdl2-ttf", "gettext" - ] + ], + "builtin-baseline": "49b67d9cb856424ff69f10e7721aec5299624268" } diff --git a/msvc-object_creator/ObjectCreator-vcpkg-static.vcxproj b/msvc-object_creator/ObjectCreator-vcpkg-static.vcxproj index 12fcb1637ecdf..309a5d1c5481a 100644 --- a/msvc-object_creator/ObjectCreator-vcpkg-static.vcxproj +++ b/msvc-object_creator/ObjectCreator-vcpkg-static.vcxproj @@ -33,9 +33,11 @@ true true true - x86-windows - x64-windows + x86-windows-static + x64-windows-static $(Configuration) + + false diff --git a/msvc-object_creator/vcpkg.json b/msvc-object_creator/vcpkg.json index 03a1e75919863..f095e00d2c740 100644 --- a/msvc-object_creator/vcpkg.json +++ b/msvc-object_creator/vcpkg.json @@ -2,14 +2,7 @@ "name": "object-creator-vcpkg-dependencies", "version-string": "0.F", "dependencies": [ - "sdl2", - "sdl2-image", - { - "name": "sdl2-mixer", - "features": [ "libflac", "mpg123", "libmodplug", "libvorbis" ] - }, - "sdl2-ttf", - "gettext", "qt5-base" - ] + ], + "builtin-baseline": "49b67d9cb856424ff69f10e7721aec5299624268" }