diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-07-19 14:54:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-19 14:54:32 -0700 |
| commit | a2b8b4c20632d79721052abd232fe2d1bdf2700d (patch) | |
| tree | d2197a4db151d91899eb26c7687963293d657884 /appveyor.yml | |
| parent | 019bc0d1507afcc6b12f3dd097040d664d9c1d50 (diff) | |
| parent | 6c71681364ac892108c275b8e46d39c9ff77a395 (diff) | |
Merge pull request #127 from tfoleyNV/deployment
Use AppVeyor to deploy to GitHub Releases
Diffstat (limited to 'appveyor.yml')
| -rw-r--r-- | appveyor.yml | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/appveyor.yml b/appveyor.yml index 132bffb6b..5b6596b8d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,18 @@ # Our solution file is currently set up for VS2015 image: Visual Studio 2015 +init: + # Construct a version number suitable for using as a release name + - ps: >- + if ($env:APPVEYOR_REPO_TAG -eq "true") + { + $env:SLANG_VERSION = "$($env:APPVEYOR_REPO_TAG_NAME.TrimStart("v"))" + } + else + { + $env:SLANG_VERSION = "dev-$($env:APPVEYOR_REPO_COMMIT.Substring(0, 7))" + } + # The project uses a submodule for the "glslang" dependency, # so we need to make sure to pull that before building. install: @@ -8,9 +20,11 @@ install: # We want to build the full matrix of platforms and configurations # that we support on Windows. +# +# Put Release|x64 first since that is the target which runs the most tests. platform: - - Win32 - x64 + - Win32 configuration: - Release @@ -54,6 +68,49 @@ test_script: } .\test.bat -platform %PLATFORM% -configuration %CONFIGURATION% -appveyor -category $testCategory -# TODO: need to figure out what we want to package for deployment +# Package up the stuff we want to deploy into a single .zip file + +after_build: + - ps: | + if ($env:PLATFORM -eq "x64") + { + $env:SLANG_DEPLOY_PLATFORM = "win64" + } + else + { + $env:SLANG_DEPLOY_PLATFORM = "win32" + } + $env:SLANG_BINARY_ARCHIVE = "slang-$($env:SLANG_VERSION)-$($env:SLANG_DEPLOY_PLATFORM).zip" + $env:SLANG_SOURCE_ARCHIVE = "slang-$($env:SLANG_VERSION)-source.zip" + 7z a "$env:SLANG_BINARY_ARCHIVE" slang.h + 7z a "$env:SLANG_BINARY_ARCHIVE" bin\*\*\slang.dll + 7z a "$env:SLANG_BINARY_ARCHIVE" bin\*\*\slang.lib + 7z a "$env:SLANG_BINARY_ARCHIVE" bin\*\*\slang-glslang.dll + 7z a "$env:SLANG_BINARY_ARCHIVE" bin\*\*\slangc.exe + 7z a "$env:SLANG_SOURCE_ARCHIVE" slang.h + 7z a "$env:SLANG_SOURCE_ARCHIVE" source\*\*.h + 7z a "$env:SLANG_SOURCE_ARCHIVE" source\*\*.cpp + +# Register the created .zip file as an artifact with AppVeyor + +artifacts: + - path: $(SLANG_BINARY_ARCHIVE) + name: binary_archive + - path: $(SLANG_SOURCE_ARCHIVE) + name: source_archive + +# On a successful build of a tag, push archices to GitHub releases -# TODO: on a successful build of a tag, push to GitHub releases +deploy: + release: v$(SLANG_VERSION) + description: 'Slang $(SLANG_VERSION)' + provider: GitHub + auth_token: + secure: +FukP7TA9F+fofZRZnu2FSqPcrQ1u4r8r4pl+/83owiY6M1R4ykg+8RcSzXi2f63 + artifact: 'binary_archive,source_archive' + draft: false + prerelease: false + force_update: true # TODO: consider if we can avoid this + on: + configuration: Release + appveyor_repo_tag: true # deploy on tag push only |
