-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
103 lines (92 loc) · 2.53 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# 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.15'
windows:
imageName: 'vs2017-win2016'
pool:
vmImage: $(imageName)
steps:
# Linux
- bash: |
pushd ..
git clone https://github.com/adventuregamestudio/ags.git
pushd ags
git checkout release-3.5.0
popd
popd
cd agsbox2d && make
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: 'make'
- task: CopyFiles@2
condition: eq( variables['Agent.OS'], 'Linux' )
inputs:
sourceFolder: '$(Build.SourcesDirectory)/agsbox2d'
contents: 'libagsbox2d.so'
targetFolder: $(Build.ArtifactStagingDirectory)
# macOS
- bash: |
pushd ..
git clone https://github.com/adventuregamestudio/ags.git
pushd ags
git checkout release-3.5.0
popd
popd
cd agsbox2d && make
condition: eq( variables['Agent.OS'], 'Darwin' )
displayName: 'make'
- task: CopyFiles@2
condition: eq( variables['Agent.OS'], 'Darwin' )
inputs:
sourceFolder: '$(Build.SourcesDirectory)/agsbox2d'
contents: 'libagsbox2d.dylib'
targetFolder: $(Build.ArtifactStagingDirectory)
# Windows
- bash: |
pushd ..
git clone https://github.com/adventuregamestudio/ags.git
pushd ags
git checkout release-3.5.0
popd
popd
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: 'prepareTask'
- task: VSBuild@1
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
solution: 'agsbox2d.sln'
platform: x86
configuration: Release
- task: CopyFiles@2
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
sourceFolder: '$(Build.SourcesDirectory)/Release'
contents: 'agsbox2d.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: agsbox2d
repositoryName: ericoporto/agsbox2d
assets: |
$(Build.ArtifactStagingDirectory)/*.dll
$(Build.ArtifactStagingDirectory)/*.so
$(Build.ArtifactStagingDirectory)/*.dylib