Skip to content

Commit 3a8426e

Browse files
committed
Fix 32-bit Appveyor builds (hopefully)
Also switched to using the env var for the build folder, which is the clone_folder setting.
1 parent 541df04 commit 3a8426e

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

appveyor.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,15 @@ clone_depth: 1
4646

4747
# Generate the .sln file with Cmake before running MSBuild
4848
before_build:
49-
- cmd: mkdir c:\projects\platform_folders\build
50-
- cmd: cd c:\projects\platform_folders\build
49+
- cmd: mkdir "%APPVEYOR_BUILD_FOLDER%"\build
50+
- cmd: cd "%APPVEYOR_BUILD_FOLDER%"\build
5151
# I know this is ugly, but the matrix didn't work, and newlines seem to not be supported
5252
- cmd: IF "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 14 2015" ..) ELSE (cmake -G "Visual Studio 14 2015 Win64" -T host=x64 ..)) ELSE (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 15 2017" ..) ELSE (cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ..))
5353

54-
# Runs MSBuild.exe with logging & some options
55-
build:
56-
# Allows for faster builds
57-
parallel: true
58-
# The solution file is the name of the project() given to Cmake
59-
project: c:\projects\platform_folders\build\platform_folders.sln
60-
# Trust me, you don't want higher than minimal. Even this is spammy
61-
verbosity: minimal
54+
# CMake generates the platform as "Win32" instead of "x86" when building 32-bit
55+
# but 64-bit is "x64"
56+
build_script:
57+
- cmd: IF "%PLATFORM%"=="x86" (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="Win32" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll") ELSE (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
6258

6359
#---------------------------------#
6460
# tests configuration #
@@ -67,12 +63,12 @@ build:
6763
# to run your custom scripts instead of automatic tests
6864
# The %CONFIGURATION% and %PLATFORM% variables are set from Appveyor as env-vars
6965
test_script:
70-
- cmd: MSBuild.exe /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal c:\projects\platform_folders\build\RUN_TESTS.vcxproj
66+
- cmd: MSBuild.exe /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal "%APPVEYOR_BUILD_FOLDER%"\build\RUN_TESTS.vcxproj
7167

7268
#---------------------------------#
7369
# global handlers #
7470
#---------------------------------#
7571

7672
# on build failure dump cmake err log
7773
on_failure:
78-
- cmd: IF exist c:\projects\platform_folders\build\CMakeFiles\CMakeError.log (type c:\projects\platform_folders\build\CMakeFiles\CMakeError.log)
74+
- cmd: IF exist "%APPVEYOR_BUILD_FOLDER%"\build\CMakeFiles\CMakeError.log (type "%APPVEYOR_BUILD_FOLDER%"\build\CMakeFiles\CMakeError.log)

0 commit comments

Comments
 (0)