Skip to content

Commit e043996

Browse files
committed
Use Azure pipelines to build modules
1 parent 9cd9c27 commit e043996

File tree

3 files changed

+148
-96
lines changed

3 files changed

+148
-96
lines changed

.appveyor.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

azure-pipelines.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
variables:
2+
MODULE_NAME: sourcenet
3+
DEPENDENCIES: $(System.DefaultWorkingDirectory)/dependencies
4+
GARRYSMOD_COMMON: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common
5+
GARRYSMOD_COMMON_BRANCH: master
6+
GARRYSMOD_COMMON_REPOSITORY: https://github.com/danielga/garrysmod_common.git
7+
PROJECT_GENERATOR_VERSION: 2
8+
REPOSITORY_DIR: $(System.DefaultWorkingDirectory)
9+
TARGET_ARCHITECTURE: x86
10+
TARGET_ARCHITECTURE_64: x86_64
11+
DISABLE_X86_64_BUILD: true
12+
SOURCE_SDK: $(System.DefaultWorkingDirectory)/dependencies/sourcesdk-minimal
13+
SOURCE_SDK_BRANCH: master
14+
SOURCE_SDK_REPOSITORY: https://github.com/danielga/sourcesdk-minimal.git
15+
trigger:
16+
tags:
17+
include:
18+
- '*'
19+
jobs:
20+
- job: windows
21+
displayName: Windows
22+
pool:
23+
name: Azure Pipelines
24+
vmImage: windows-2019
25+
timeoutInMinutes: 10
26+
variables:
27+
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.ps1
28+
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.ps1
29+
TARGET_OS: win32
30+
TARGET_OS_64: win64
31+
COMPILER_PLATFORM: vs2019
32+
PROJECT_OS: windows
33+
PREMAKE5_EXECUTABLE: premake5.exe
34+
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/windows/premake-core/premake5.exe
35+
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha14/premake-5.0.0-alpha14-windows.zip
36+
steps:
37+
- powershell: 'Invoke-Expression ((New-Object System.Net.WebClient).DownloadString("$env:BOOTSTRAP_URL"))'
38+
displayName: Bootstrap
39+
- powershell: '& "$env:BUILD_SCRIPT"'
40+
displayName: Build
41+
- task: CopyFiles@2
42+
displayName: 'Copy files to $(Build.ArtifactStagingDirectory)'
43+
inputs:
44+
SourceFolder: '$(System.DefaultWorkingDirectory)/projects/windows/vs2019'
45+
Contents: '*/Release/*.dll'
46+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
47+
CleanTargetFolder: true
48+
flattenFolders: true
49+
preserveTimestamp: true
50+
- task: PublishBuildArtifacts@1
51+
displayName: 'Publish build artifacts'
52+
inputs:
53+
ArtifactName: windows
54+
- job: linux
55+
displayName: Linux
56+
pool:
57+
name: Azure Pipelines
58+
vmImage: ubuntu-18.04
59+
timeoutInMinutes: 10
60+
variables:
61+
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.sh
62+
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.sh
63+
TARGET_OS: linux
64+
TARGET_OS_64: linux64
65+
COMPILER_PLATFORM: gmake
66+
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/linux/premake-core/premake5
67+
PROJECT_OS: linux
68+
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha14/premake-5.0.0-alpha14-linux.tar.gz
69+
CC: gcc-8
70+
CXX: g++-8
71+
steps:
72+
- bash: 'curl -s -L "$BOOTSTRAP_URL" | bash'
73+
displayName: Bootstrap
74+
- bash: |
75+
sudo apt-get update && sudo apt-get install -y g++-8-multilib
76+
$BUILD_SCRIPT
77+
displayName: Build
78+
- task: CopyFiles@2
79+
displayName: 'Copy files to $(Build.ArtifactStagingDirectory)'
80+
inputs:
81+
SourceFolder: '$(System.DefaultWorkingDirectory)/projects/linux/gmake'
82+
Contents: '*/Release/*.dll'
83+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
84+
CleanTargetFolder: true
85+
flattenFolders: true
86+
preserveTimestamp: true
87+
- task: PublishBuildArtifacts@1
88+
displayName: 'Publish build artifacts'
89+
inputs:
90+
ArtifactName: linux
91+
- job: macosx
92+
displayName: macOS
93+
pool:
94+
name: Azure Pipelines
95+
vmImage: macOS-10.13
96+
timeoutInMinutes: 10
97+
variables:
98+
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.sh
99+
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.sh
100+
TARGET_OS: osx
101+
TARGET_OS_64: osx64
102+
COMPILER_PLATFORM: gmake
103+
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/macosx/premake-core/premake5
104+
PROJECT_OS: macosx
105+
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha14/premake-5.0.0-alpha14-macosx.tar.gz
106+
steps:
107+
- bash: 'curl -s -L "$BOOTSTRAP_URL" | bash'
108+
displayName: Bootstrap
109+
- bash: |
110+
sudo xcode-select -s "/Applications/Xcode_9.4.1.app/Contents/Developer"
111+
$BUILD_SCRIPT
112+
displayName: Build
113+
- task: CopyFiles@2
114+
displayName: 'Copy files to $(Build.ArtifactStagingDirectory)'
115+
inputs:
116+
SourceFolder: '$(System.DefaultWorkingDirectory)/projects/macosx/gmake'
117+
Contents: '*/Release/*.dll'
118+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
119+
CleanTargetFolder: true
120+
flattenFolders: true
121+
preserveTimestamp: true
122+
- task: PublishBuildArtifacts@1
123+
displayName: 'Publish build artifacts'
124+
inputs:
125+
ArtifactName: macosx
126+
- job: publish
127+
displayName: Publish to GitHub Releases
128+
pool:
129+
name: Azure Pipelines
130+
vmImage: ubuntu-18.04
131+
timeoutInMinutes: 5
132+
dependsOn:
133+
- windows
134+
- linux
135+
- macosx
136+
steps:
137+
- task: DownloadBuildArtifacts@0
138+
displayName: 'Download build artifacts'
139+
inputs:
140+
downloadType: specific
141+
parallelizationLimit: 12
142+
- task: GitHubRelease@1
143+
displayName: 'Publish GitHub release $(build.sourceBranchName)'
144+
inputs:
145+
gitHubConnection: 'GitHub danielga'
146+
releaseNotesSource: inline
147+
assets: '$(System.ArtifactsDirectory)/**'
148+
addChangeLog: false

0 commit comments

Comments
 (0)