AppVeyor CI

Dec 12, 2020

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

Ignacio Dec 13, 2020
Did you try the new aws ec2 osx instances?

Oh ho! Dec 15, 2020
'game_name: MyGameName'

/eagerly awaits MyGameName

Coming 2021! XD

Faulty game_name parameter Dec 16, 2020
A bad game_name value might slow down it's build process (really, Azure is funny that way, special characters in the name etc...) - If you reveal the real game name we can validate if it's a problem that can effect the build times. MyGameName usualy fails as it's a default value reserved for Microsoft games. Also a providing the game description might be helpfull for us to understand what is being built and if it's content may cause errors in underlying Azure content-filter processes.

Hi Dec 17, 2020
Yeah!

Mariposa Dec 17, 2020
Can I still help with this?

Pete Dec 18, 2020
Faulty makes some great points. To be fair.

Johan Windh Dec 18, 2020
I concur with Mr. Fawlty.

-Basil!

Mo Dec 21, 2020
It's a Visual Studio thing! Or, more accurately, a VC++ compiler thing. Clang/Xcode are just plain faster. VS2019 actually supports Clang, you could try switching over and seeing if it makes a difference?

Add your comment:


Here are the rules for commenting.