Skip to content

Commit

Permalink
Synchronize Azure Pipelines config with garrysmod_common template
Browse files Browse the repository at this point in the history
  • Loading branch information
danielga committed Aug 28, 2021
1 parent 1cbffa7 commit d03891b
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ variables:
GARRYSMOD_COMMON_REPOSITORY: https://github.com/danielga/garrysmod_common.git
PROJECT_GENERATOR_VERSION: 2
REPOSITORY_DIR: $(System.DefaultWorkingDirectory)
DISABLE_X86_64_BUILD: true
trigger:
batch: true
branches:
include:
- '*'
tags:
include:
- '*'
paths:
include:
- azure-pipelines.yml
- premake5.lua
- source
jobs:
- job: windows
displayName: Windows
Expand All @@ -24,8 +32,12 @@ jobs:
COMPILER_PLATFORM: vs2019
PROJECT_OS: windows
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/windows/premake-core/premake5.exe
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-windows.zip
PREMAKE5_URL: https://github.com/danielga/garrysmod_common/releases/download/premake5/premake-5.0.0-alpha16-windows.zip
steps:
- checkout: self
clean: true
fetchDepth: 1
submodules: recursive
- powershell: 'Invoke-Expression ((New-Object System.Net.WebClient).DownloadString("$env:BOOTSTRAP_URL"))'
displayName: Bootstrap
- powershell: '& "$env:BUILD_SCRIPT"'
Expand All @@ -47,26 +59,31 @@ jobs:
displayName: Linux
pool:
name: Azure Pipelines
vmImage: ubuntu-16.04
vmImage: ubuntu-latest
container:
image: registry.gitlab.steamos.cloud/steamrt/scout/sdk:latest
options: -v /home
timeoutInMinutes: 10
variables:
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.sh
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.sh
COMPILER_PLATFORM: gmake
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/linux/premake-core/premake5
PROJECT_OS: linux
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz
PREMAKE5_URL: https://github.com/danielga/garrysmod_common/releases/download/premake5/premake-5.0.0-alpha16-linux.tar.gz
CC: gcc-9
CXX: g++-9
AR: gcc-ar-9
NM: gcc-nm-9
RANLIB: gcc-ranlib-9
steps:
- checkout: self
clean: true
fetchDepth: 1
submodules: recursive
- bash: 'curl -s -L "$BOOTSTRAP_URL" | bash'
displayName: Bootstrap
- bash: |
sudo apt-get update && sudo apt-get install -y g++-9-multilib
$BUILD_SCRIPT
- bash: '$BUILD_SCRIPT'
displayName: Build
- task: CopyFiles@2
displayName: 'Copy files to $(Build.ArtifactStagingDirectory)'
Expand All @@ -93,11 +110,16 @@ jobs:
COMPILER_PLATFORM: gmake
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/macosx/premake-core/premake5
PROJECT_OS: macosx
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-macosx.tar.gz
PREMAKE5_URL: https://github.com/danielga/garrysmod_common/releases/download/premake5/premake-5.0.0-alpha16-macosx.tar.gz
MACOSX_SDK_URL: https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.7.sdk.tar.xz
MACOSX_SDK_DIRECTORY: $(System.DefaultWorkingDirectory)/dependencies/macosx/MacOSX10.7.sdk
SDKROOT: $(System.DefaultWorkingDirectory)/dependencies/macosx/MacOSX10.7.sdk
AR: ar
steps:
- checkout: self
clean: true
fetchDepth: 1
submodules: recursive
- bash: 'curl -s -L "$BOOTSTRAP_URL" | bash'
displayName: Bootstrap
- bash: |
Expand All @@ -121,12 +143,13 @@ jobs:
displayName: Publish to GitHub Releases
pool:
name: Azure Pipelines
vmImage: ubuntu-18.04
vmImage: ubuntu-latest
timeoutInMinutes: 5
dependsOn:
- windows
- linux
- macosx
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
Expand Down

0 comments on commit d03891b

Please sign in to comment.