Files
openttd-cmclient/azure-pipelines.yml
Pavel Stupnikov c023bb0a09 azure: make diff
2019-03-31 19:31:39 +03:00

111 lines
3.2 KiB
YAML

trigger: none
pr: none
jobs:
- job: source
displayName: 'Source'
pool:
vmImage: 'ubuntu-16.04'
steps:
- bash: |
set -e
VERSION=$(cat .version)
echo "${VERSION}"
echo "##vso[build.updatebuildnumber]${VERSION}"
- script: |
set -ex
# Rename the folder to openttd-NNN-source
mkdir openttd-$(Build.BuildNumber)
find . -maxdepth 1 -not -name . -not -name openttd-$(Build.BuildNumber) -exec mv {} openttd-$(Build.BuildNumber)/ \;
# Copy back release_date, as it is needed for the template 'release-bundles'
cp openttd-$(Build.BuildNumber)/.release_date .release_date
mkdir bundles
tar --xz -cf bundles/openttd-$(Build.BuildNumber)-source.tar.xz openttd-$(Build.BuildNumber)
zip -9 -r -q bundles/citymania-client-$(Build.BuildNumber)-source.zip openttd-$(Build.BuildNumber)
displayName: 'Create bundle'
- task: PublishBuildArtifacts@1
displayName: 'Publish bundles'
inputs:
PathtoPublish: bundles/
ArtifactName: bundles
- job: diff
dependsOn: source
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download source'
inputs:
downloadType: specific
itemPattern: 'bundles/openttd-*-source.tar.xz'
downloadPath: '$(Build.ArtifactStagingDirectory)'
displayName: 'Download vanilla'
- bash: |
set -ex
VERSION=$(cat .version)
wget
curl -L https://proxy.binaries.openttd.org/openttd-releases/${VERSION}/openttd-${VERSION}-source.tar.xz > vanilla-source.tar.xz
displayName: 'Extract sources'
- bash: |
set -ex
mkdir vanilla
tar --xz -xf vanilla-source.tar.xz --strip-components=1 -C vanilla
mkdir cmclient
tar --xz -xf ../a/bundles/openttd-*-source.tar.xz --strip-components=1 -C cmclient
displayName: 'Make diff'
- bash: |
set -ex
mkdir bundles
diff -r vanilla cmclient -B -X .diff-exclude > bundles/citymania-client-$(Build.BuildNumber).diff
- task: PublishBuildArtifacts@1
displayName: 'Publish bundles'
inputs:
PathtoPublish: bundles/
ArtifactName: bundles
- job: windows
displayName: 'Windows'
pool:
vmImage: 'VS2017-Win2016'
dependsOn: source
strategy:
matrix:
Win32:
BuildPlatform: 'Win32'
BundlePlatform: 'win32'
Win64:
BuildPlatform: 'x64'
BundlePlatform: 'win64'
steps:
- template: azure-pipelines/templates/release-fetch-source.yml
- template: azure-pipelines/templates/windows-dependencies.yml
- template: azure-pipelines/templates/windows-dependency-zip.yml
- template: azure-pipelines/templates/windows-build.yml
parameters:
BuildPlatform: $(BuildPlatform)
- bash: |
set -ex
make -f Makefile.msvc bundle_pdb bundle_zip PLATFORM=$(BundlePlatform) BUNDLE_NAME=citymania-client-$(Build.BuildNumber)-$(BundlePlatform)
displayName: 'Create bundles'
- task: PublishBuildArtifacts@1
displayName: 'Publish bundles'
inputs:
PathtoPublish: bundles/
ArtifactName: bundles
# - job: publish
# dependsOn:
# - windows
# steps:
# - task: PublishBuildArtifacts@1
# displayName: 'Publish bundles'
# inputs:
# PathtoPublish: bundles/
# ArtifactName: bundles