AppVeyor CI
I posted before over my frustrations with Microsoft Azure taking so long to do a Windows+Mac build. The frustration reached a boiling point last week when for no reason the Windows build started generating compile errors in stdlib
headers. I reverted back to the last build that compiled but the errors continued.
I've got to assume something changed in the Azure Windows VM, but there was no mention of it. Maybe it was just a temp glitch.
I decided the time was right to get the game building on AppVeyor if for nothing more than just having a backup.
AppVeyor has some (how to I say this kindly) horrific documentation.
It took me a day to cobble together snippets posted by others on the world wide web but it's finally working (now I just need to get Linux compiling).
The good news is AppVeyor builds both platforms in around 5 mins (running 2 parallel jobs like Azure was).
Big win over Azure.
What's interesting is the Mac builds twice as fast as Windows. I don't know if this is a Visual Studio vs. XCode thing or just the VMs they are running on.
I thought I'd post my appveyor.yml
so others can benefit from my pain. I couldn't get $(configuration)
(and the like) to work, so I ended by hand pasting values like Release
.
If you're a AppVeyor expert, I'm open to suggests on making it better.
version: 1.0.{build}
image:
- macos-mojave
- Visual Studio 2019
platform:
- x64
configuration:
- Release
environment:
game_name: MyGameName
matrix:
fast_finish: true
for:
-
matrix:
only:
- image: macos-mojave
artifacts:
- path: _Build/XCode/build/Release
name: $(game_name)-mac-Release
type: zip
deploy:
provider: S3
access_key_id: [REDACTED]
secret_access_key:
secure: [REDACTED]
bucket: [REDACTED]
region: us-west-2
unzip: true
set_public: false
folder: appveyor/$(game_name)/Mac
artifact: $(game_name)-mac-Release
before_build:
- sh: Bin/cmake.sh --xcode
build_script:
- sh: cmake --build _Build/XCode --config Release
-
matrix:
only:
- image: Visual Studio 2019
artifacts:
- path: _Build/VS16/Release
name: $(game_name)-win-Release
type: zip
deploy:
provider: S3
access_key_id: [REDACTED]
secret_access_key:
secure: [REDACTED]
bucket: [REDACTED]
region: us-west-2
unzip: true
set_public: false
folder: appveyor/$(game_name)/Windows
artifact: $(game_name)-win-Release
before_build:
- cmake -G "Visual Studio 16 2019" -A x64 -S . -B "_Build/VS16"
build:
project: _Build/VS16/$(game_name).sln
parallel: true
verbosity: minimal
notifications:
- provider: Webhook
url: https://[REDACTED].php?build_status_appveyor=Succeeded
method: GET
on_build_success: true
on_build_failure: false
- provider: Webhook
url: https://[REDACTED].php?build_status_appveyor=Failed
method: GET
on_build_success: false
on_build_failure: true