forked from Dualnames1/AGS-Controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First sketch of azure pipelines setup
- Loading branch information
1 parent
9364114
commit e5c241d
Showing
1 changed file
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# C/C++ with GCC | ||
# Build your C/C++ project with GCC using make. | ||
# Add steps that publish test results, save build artifacts, deploy, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- refs/heads/* | ||
- refs/tags/* | ||
|
||
strategy: | ||
matrix: | ||
linux: | ||
imageName: 'ubuntu-16.04' | ||
mac: | ||
imageName: 'macos-10.13' | ||
windows: | ||
imageName: 'vs2017-win2016' | ||
|
||
pool: | ||
vmImage: $(imageName) | ||
|
||
steps: | ||
# Linux | ||
- bash: | | ||
cd AGSController | ||
make | ||
condition: eq( variables['Agent.OS'], 'Linux' ) | ||
displayName: 'make' | ||
|
||
- task: CopyFiles@2 | ||
condition: eq( variables['Agent.OS'], 'Linux' ) | ||
inputs: | ||
sourceFolder: '$(Build.SourcesDirectory)/AGSController' | ||
contents: 'libagscontroller.so' | ||
targetFolder: $(Build.ArtifactStagingDirectory) | ||
|
||
# macOS | ||
- bash: | | ||
cd AGSController | ||
make | ||
condition: eq( variables['Agent.OS'], 'Darwin' ) | ||
displayName: 'make' | ||
|
||
- task: CopyFiles@2 | ||
condition: eq( variables['Agent.OS'], 'Darwin' ) | ||
inputs: | ||
sourceFolder: '$(Build.SourcesDirectory)/AGSController' | ||
contents: 'libagscontroller.dylib' | ||
targetFolder: $(Build.ArtifactStagingDirectory) | ||
|
||
# Windows | ||
- task: VSBuild@1 | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) | ||
inputs: | ||
solution: 'AGSController\vs2017\AGSController.sln' | ||
platform: win32 | ||
configuration: Release | ||
|
||
- task: CopyFiles@2 | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) | ||
inputs: | ||
sourceFolder: '$(Build.SourcesDirectory)/AGSController/vs2017/Release' | ||
contents: 'AGSController.dll' | ||
targetFolder: $(Build.ArtifactStagingDirectory) | ||
|
||
- bash: | | ||
echo "##vso[task.setvariable variable=tagname]$(git describe --tags $(git rev-list --tags --max-count=1))" | ||
# Upload to Github Release | ||
- task: GithubRelease@0 | ||
displayName: 'Create GitHub Release' | ||
inputs: | ||
tagSource: 'auto' | ||
tag: $(tagname) | ||
assetUploadMode: 'replace' | ||
action: 'edit' | ||
gitHubConnection: agsnormalmaps | ||
repositoryName: ericoporto/AGSController | ||
assets: | | ||
$(Build.ArtifactStagingDirectory)/*.dll | ||
$(Build.ArtifactStagingDirectory)/*.so | ||
$(Build.ArtifactStagingDirectory)/*.dylib |