Skip to content

Commit

Permalink
ci: adjust windows docker to use vs2022 base
Browse files Browse the repository at this point in the history
- adjust vc redistributables for used VC toolsets (and also adjust sha256 in verification script)
- new base docker with Visual Studio 2022 Community
- fix env vars for new vs2019 lib compatibility
- chocolatey deprecated shims, use proper `choco install`
- use VsDevCmd instead of vsvarall, but don't specify host arch
- drop Win8.1 sdk
  • Loading branch information
ericoporto committed Dec 30, 2024
1 parent 619723a commit 100dcea
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 40 deletions.
54 changes: 26 additions & 28 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ build_windows_task:
dockerfile: ci/windows/Dockerfile
os_version: 2019
env:
AGS_LIBOGG_LIB: C:\Lib\Xiph\x86
AGS_LIBTHEORA_LIB: C:\Lib\Xiph\x86
AGS_LIBVORBIS_LIB: C:\Lib\Xiph\x86
AGS_LIBOGG_LIB_VS19: C:\Lib\Xiph\x86
AGS_LIBTHEORA_LIB_VS19: C:\Lib\Xiph\x86
AGS_LIBVORBIS_LIB_VS19: C:\Lib\Xiph\x86
AGS_SDL_INCLUDE: C:\Lib\SDL2\include
AGS_SDL_SOUND_INCLUDE: C:\Lib\SDL_sound\src
AGS_SDL_LIB: C:\Lib\SDL2\lib\x86
AGS_SDL_SOUND_LIB: C:\Lib\SDL_sound\lib\x86
AGS_SDL_SOUND_LIB_VS19: C:\Lib\SDL_sound\lib\x86
build_debug_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Debug /p:Platform=Win32 /maxcpucount /nologo
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Debug /p:Platform=Win32 /maxcpucount /nologo
build_tools_debug_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Tools.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Debug /p:Platform=x86 /maxcpucount /nologo
msbuild Tools.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Debug /p:Platform=x86 /maxcpucount /nologo
build_release_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
build_tools_release_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Tools.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x86 /maxcpucount /nologo
msbuild Tools.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=x86 /maxcpucount /nologo
engine_pdb_artifacts:
path: Solutions/.build/*/acwin.pdb
delete_engine_pdb_script: >
Expand All @@ -42,9 +42,9 @@ build_windows_task:
cd Solutions/ &&
rd /s /q .build
build_x64_release_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
engine_x64_pdb_artifacts:
path: Solutions/.build/*/acwin.pdb
delete_x64_engine_pdb_script: >
Expand Down Expand Up @@ -310,27 +310,25 @@ build_editor_task:
- type Editor\AGS.Editor.Tests\packages.config
populate_script: nuget restore Solutions\AGS.Editor.Full.sln
build_debug_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
set "UseEnv=true" &&
copy C:\Lib\irrKlang\x86\*.dll Editor\References\ &&
cd Solutions &&
cmd /v:on /c "set "LIB=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x86;!LIB!" &&
set "PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;!PATH!" &&
msbuild AGS.Editor.Full.sln /p:PlatformToolset=v140 /p:Configuration=Debug /p:Platform="Win32" /maxcpucount /nologo"
msbuild AGS.Editor.Full.sln /p:PlatformToolset=v142 /p:VCToolsVersion=14.29.30133 /p:Configuration=Debug /p:Platform="Win32" /maxcpucount /nologo"
test_debug_script: |
curl -fLOJ https://github.com/nunit/nunit-transforms/raw/master/nunit3-junit/nunit3-junit.xslt
pushd Solutions\packages\NUnit.ConsoleRunner.3.*
set RUNNER="%CD%\tools\nunit3-console.exe"
popd
cmd /v:on /c "!RUNNER! Editor\AGS.Editor.Tests\bin\Debug\AGS.Editor.Tests.dll --result=TestResult-junit.xml;transform=nunit3-junit.xslt"
build_release_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
set "UseEnv=true" &&
copy C:\Lib\irrKlang\x86\*.dll Editor\References\ &&
cd Solutions &&
cmd /v:on /c "set "LIB=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x86;!LIB!" &&
set "PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;!PATH!" &&
msbuild AGS.Editor.Full.sln /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform="Win32" /maxcpucount /nologo"
msbuild AGS.Editor.Full.sln /p:PlatformToolset=v142 /p:VCToolsVersion=14.29.30133 /p:Configuration=Release /p:Platform="Win32" /maxcpucount /nologo"
test_release_script: |
curl -fLOJ https://github.com/nunit/nunit-transforms/raw/master/nunit3-junit/nunit3-junit.xslt
pushd Solutions\packages\NUnit.ConsoleRunner.3.*
Expand Down Expand Up @@ -482,28 +480,28 @@ ags_windows_tests_task:
BUILD_CONFIG: Release
get_submodule_script: git submodule update --init Common/libsrc/googletest
build_compiler_test_runner_x86_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Compiler.Lib.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
msbuild Compiler.Lib.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
run_compiler_tests_script: Solutions\.test\Release\Compiler.Lib.Test.exe
build_ags_test_runner_x86_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Tests.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
msbuild Tests.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
run_common_tests_x86_script: Solutions\.test\Release\Common.Lib.Test.exe
run_engine_tests_x86_script: Solutions\.test\Release\Engine.App.Test.exe
cleanup_script: >
cd Solutions/ &&
rd /s /q .test
build_compiler_test_runner_x64_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Compiler.Lib.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
msbuild Compiler.Lib.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
run_compiler_tests_x64_script: Solutions\.test\Release\Compiler.Lib.Test.exe
build_ags_test_runner_x64_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" &&
cd Solutions &&
msbuild Tests.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
msbuild Tests.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
run_common_tests_x64_script: Solutions\.test\Release\Common.Lib.Test.exe
run_engine_tests_x64_script: Solutions\.test\Release\Engine.App.Test.exe

Expand Down
2 changes: 1 addition & 1 deletion Windows/Installer/checksums.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12a69af8623d70026690ba14139bf3793cc76c865759cad301b207c1793063ed Source/Redist/vc_redist.x86.exe
1acd8d5ea1cdc3eb2eb4c87be3ab28722d0825c15449e5c9ceef95d897de52fa Source/Redist/vc_redist.x86.exe
29 changes: 18 additions & 11 deletions ci/windows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# base will already have Chocolatey installed
FROM ericoporto/min-ags-dev-env:1.0.0
FROM ghcr.io/ericoporto/min-ags-dev-env:2.0.13

# if no temp folder exists by default, create it
RUN IF exist %TEMP%\nul ( echo %TEMP% ) ELSE ( mkdir %TEMP% )
Expand All @@ -15,8 +15,8 @@ RUN pushd %TEMP% && \

ARG NUGET_VERSION=5.7.0
ARG INNO_SETUP_VERSION=6.2.2
RUN cinst nuget.commandline --version %NUGET_VERSION% -y && \
cinst innosetup --version %INNO_SETUP_VERSION% -y && \
RUN choco install nuget.commandline --version %NUGET_VERSION% -y && \
choco install innosetup --version %INNO_SETUP_VERSION% -y && \
mkdir empty && \
robocopy empty %TEMP% /MIR > nul & \
rd /s /q empty
Expand Down Expand Up @@ -59,10 +59,13 @@ RUN mkdir Lib\irrKlang && \
move %TEMP%\irrKlang-64bit-%IRRKLANG_VERSION%\bin\dotnet-4-64\*.dll Lib\irrKlang\x64\ && \
rd /s /q %TEMP%\irrKlang-64bit-%IRRKLANG_VERSION%

# from
# https://github.com/microsoft/winget-pkgs/blob/master/manifests/m/Microsoft/VCRedist/2015%2B/x86/14.29.30133.0/Microsoft.VCRedist.2015%2B.x86.installer.yaml
# https://github.com/microsoft/winget-pkgs/blob/master/manifests/m/Microsoft/VCRedist/2015%2B/x64/14.29.30133.0/Microsoft.VCRedist.2015%2B.x64.installer.yaml
RUN mkdir Redist && \
cd Redist && \
curl -fLOJ https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963AEAD48/vc_redist.x86.exe && \
curl -fLOJ https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963AEAD48/vc_redist.x64.exe
curl -fLJ https://download.visualstudio.microsoft.com/download/pr/221ed2ae-1269-497b-a962-e113045001fa/1ACD8D5EA1CDC3EB2EB4C87BE3AB28722D0825C15449E5C9CEEF95D897DE52FA/VC_redist.x86.exe -o vc_redist.x86.exe && \
curl -fLJ https://download.visualstudio.microsoft.com/download/pr/7239cdc3-bd73-4f27-9943-22de059a6267/003063723B2131DA23F40E2063FB79867BAE275F7B5C099DBD1792E25845872B/VC_redist.x64.exe -o vc_redist.x64.exe

ARG SDL_VERSION=release-2.28.5
ARG SDL_VERSION_NUMBER=2.28.5
Expand All @@ -81,16 +84,20 @@ RUN mkdir Lib\SDL2 && \

ARG SDL2_SOUND_VERSION=c5639414c1bb24fb4eef5861c13adb42a4aab950
RUN mkdir Lib\SDL_sound && \
echo "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 ^&^& pushd Lib\SDL_sound\build_x86 ^&^& msbuild SDL_sound.sln /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo ^&^& popd > sdlsoundvcbuild_x86.bat && \
echo "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 ^&^& pushd Lib\SDL_sound\build_x64 ^&^& msbuild SDL_sound.sln /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo ^&^& popd > sdlsoundvcbuild_x64.bat && \
mkdir Lib\SDL_sound\build_x86 && \
mkdir Lib\SDL_sound\build_x64 && \
curl -fLSs "https://github.com/icculus/SDL_sound/archive/%SDL2_SOUND_VERSION%.tar.gz" | tar -f - -xvzC Lib\SDL_sound --strip-components 1 && \
set SDL2_DIR=%cd%\Lib\SDL2 && \
cmake -DCMAKE_SYSTEM_VERSION=8.1 -S Lib\SDL_sound -B Lib\SDL_sound\build_x86 -G "Visual Studio 14 2015" -T"v140" -A"Win32" -DCMAKE_PREFIX_PATH=Lib\SDL2 -DSDLSOUND_DECODER_MIDI=1 && \
sdlsoundvcbuild_x86.bat && \
cmake -DCMAKE_SYSTEM_VERSION=8.1 -S Lib\SDL_sound -B Lib\SDL_sound\build_x64 -G "Visual Studio 14 2015" -T"v140" -A"x64" -DCMAKE_PREFIX_PATH=Lib\SDL2 -DSDLSOUND_DECODER_MIDI=1 && \
sdlsoundvcbuild_x64.bat && \
call "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" && \
cmake -S Lib\SDL_sound -B Lib\SDL_sound\build_x86 -G "Visual Studio 17 2022" -T"v142" -A"Win32" -DCMAKE_PREFIX_PATH=Lib\SDL2 -DSDLSOUND_DECODER_MIDI=1 && \
pushd Lib\SDL_sound\build_x86 && \
msbuild SDL_sound.sln /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo && \
popd && \
call "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat" && \
cmake -S Lib\SDL_sound -B Lib\SDL_sound\build_x64 -G "Visual Studio 17 2022" -T"v142" -A"x64" -DCMAKE_PREFIX_PATH=Lib\SDL2 -DSDLSOUND_DECODER_MIDI=1 && \
pushd Lib\SDL_sound\build_x64 && \
msbuild SDL_sound.sln /p:PlatformToolset=v142 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo && \
popd && \
mkdir Lib\SDL_sound\lib && \
mkdir Lib\SDL_sound\lib\x86 && \
mkdir Lib\SDL_sound\lib\x64 && \
Expand Down

0 comments on commit 100dcea

Please sign in to comment.