Skip to content

Commit

Permalink
[WIP] Try to fix @JBTW's windows CI for object creator
Browse files Browse the repository at this point in the history
  • Loading branch information
akrieger committed Sep 11, 2021
1 parent ace0efb commit 9913681
Show file tree
Hide file tree
Showing 9 changed files with 131 additions and 22 deletions.
113 changes: 113 additions & 0 deletions .github/workflows/object_creator.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

# 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
}
}
4 changes: 2 additions & 2 deletions msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<VcpkgManifestInstall>true</VcpkgManifestInstall>
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgAutoLink>true</VcpkgAutoLink>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgUserTriplet>
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down
4 changes: 2 additions & 2 deletions msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<VcpkgManifestInstall>false</VcpkgManifestInstall>
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgAutoLink>true</VcpkgAutoLink>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgUserTriplet>
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down
4 changes: 2 additions & 2 deletions msvc-full-features/Cataclysm-vcpkg-static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<VcpkgManifestInstall>false</VcpkgManifestInstall>
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgAutoLink>true</VcpkgAutoLink>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgUserTriplet>
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down
4 changes: 2 additions & 2 deletions msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<VcpkgManifestInstall>false</VcpkgManifestInstall>
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgAutoLink>true</VcpkgAutoLink>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgUserTriplet>
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down
4 changes: 2 additions & 2 deletions msvc-full-features/JsonFormatter-vcpkg-static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<VcpkgManifestInstall>false</VcpkgManifestInstall>
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgAutoLink>true</VcpkgAutoLink>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgUserTriplet>
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down
3 changes: 2 additions & 1 deletion msvc-full-features/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"sdl2-ttf",
"gettext"
]
],
"builtin-baseline": "49b67d9cb856424ff69f10e7721aec5299624268"
}
6 changes: 4 additions & 2 deletions msvc-object_creator/ObjectCreator-vcpkg-static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@
<VcpkgManifestInstall>true</VcpkgManifestInstall>
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgAutoLink>true</VcpkgAutoLink>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgUserTriplet>
<VcpkgUserTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgUserTriplet>
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
<!-- force using global vcpkg install instead of subdir install -->
<VcpkgManifestInstall>false</VcpkgManifestInstall>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
Expand Down
11 changes: 2 additions & 9 deletions msvc-object_creator/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 9913681

Please sign in to comment.