Avocado/.appveyor.yml

89 lines
2.7 KiB
YAML
Raw Permalink Normal View History

2017-09-07 09:13:54 -04:00
version: '{branch}-{build}'
2018-06-03 11:29:02 -04:00
clone_depth: 1
2017-03-10 14:55:17 -05:00
environment:
2021-11-15 21:22:23 -05:00
PREMAKE_VERSION: 5.0.0-beta1
SDL_VERSION: 2.0.16
2017-03-10 14:55:17 -05:00
matrix:
2020-11-05 21:49:19 -05:00
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
2019-08-14 19:44:08 -04:00
TOOLSET: vs2019
2019-06-20 07:46:37 -04:00
platform: x64
2020-11-05 21:49:19 -05:00
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
2019-08-14 19:44:08 -04:00
TOOLSET: vs2019
2019-06-20 07:46:37 -04:00
platform: Win32
2019-07-31 16:10:36 -04:00
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2019-06-20 07:58:30 -04:00
TOOLSET: vs2017
2018-06-03 11:29:02 -04:00
platform: x64
2019-07-31 16:10:36 -04:00
SKIP_DEPLOY: skip
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: vs2017
platform: Win32
SKIP_DEPLOY: skip
2017-03-10 14:55:17 -05:00
# TODO: Move to PowerShell script
2017-03-10 14:55:17 -05:00
before_build:
- git submodule update --init --recursive
# premake
2018-06-03 11:29:02 -04:00
- ps: Start-FileDownload "https://github.com/premake/premake-core/releases/download/v$($env:PREMAKE_VERSION)/premake-$($env:PREMAKE_VERSION)-windows.zip" "premake.zip"
2017-03-10 14:55:17 -05:00
- 7z x premake.zip
# generate solution
2017-03-30 16:36:54 -04:00
- premake5.exe %TOOLSET%
2017-03-10 14:55:17 -05:00
configuration:
2018-06-03 11:29:02 -04:00
- release
2017-03-10 14:55:17 -05:00
build:
2017-09-12 07:12:23 -04:00
project: avocado.sln
# TODO: Move to PowerShell script
2017-09-07 09:13:54 -04:00
after_build:
- ps: if ($env:platform -eq "Win32") { $env:OS = "windows32" }
- ps: if ($env:platform -eq "x64") { $env:OS = "windows64" }
- ps: $env:DATE=date +%Y%m%d
- ps: $env:COMMIT=git rev-parse --short=7 HEAD
- ps: $env:ARTIFACT="avocado-$($env:OS)-$($env:DATE)-$($env:COMMIT).zip"
2018-06-03 11:29:02 -04:00
2017-09-07 09:13:54 -04:00
- mkdir artifact
# Premake renames x86 to Win32 - undo that
- ps: if ($env:platform -eq "Win32") { $env:platform = "x86" }
# copy avocado.exe and data directory
- ps: $env:TARGETDIR = "build\$($env:CONFIGURATION)"
- ps: if ($env:platform -ne "x86") { $env:TARGETDIR = $env:TARGETDIR + "_" + $env:platform }
- ps: Copy-Item $env:TARGETDIR\avocado.exe artifact\avocado.exe
2017-09-07 09:13:54 -04:00
- ps: Copy-Item data artifact\ -recurse
# remove .gitignore
2017-09-07 09:13:54 -04:00
- ps: Get-ChildItem -Path artifact\data -Include *.gitignore -Recurse | foreach { $_.Delete()}
# make zip archive
- 7z a avocado.zip %APPVEYOR_BUILD_FOLDER%\artifact\.
- mkdir upload
- ps: Copy-Item avocado.zip -Destination upload/$env:ARTIFACT
test_script:
2019-01-13 05:27:37 -05:00
- .\%TARGETDIR%\avocado_test.exe --success -r junit > test-result.xml || ver > nul
- ps: Start-FileDownload 'https://gist.github.com/JaCzekanski/d7a6e06295729a3f81bd9bd488e9d37d/raw/d5bc41278fd198ef5e4afceb35e0587aca7f2f60/gte_valid_0xc0ffee_50.log'
2019-01-13 05:27:37 -05:00
- .\%TARGETDIR%\avocado_autotest.exe gte_valid_0xc0ffee_50.log || ver > nul
after_test:
- ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test-result.xml))
2018-07-29 06:32:10 -04:00
on_success:
- ps: .ci/windows/notify-discord.ps1 success $env:WEBHOOK_URL
2018-07-29 06:32:10 -04:00
on_failure:
- ps: .ci/windows/notify-discord.ps1 failure $env:WEBHOOK_URL
2017-09-07 09:13:54 -04:00
artifacts:
- path: avocado.zip
2017-09-12 07:12:23 -04:00
name: avocado
deploy_script:
2020-11-05 21:49:19 -05:00
- bash ./.ci/deploy.sh %DEPLOY_KEY% upload/