diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 79e2da77ac..5f46b1d76b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,70 @@ trigger: none pr: none + + jobs: -- template: azure-pipelines/templates/release.yml - parameters: - IsStableRelease: false +- job: source + displayName: 'Source' + pool: + vmImage: 'ubuntu-16.04' + + steps: + - 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' + +- job: windows + displayName: 'Windows' + pool: + vmImage: 'VS2017-Win2016' + dependsOn: source + + strategy: + matrix: + Win32: + BuildPlatform: 'Win32' + BundlePlatform: 'win32' + Win64: + BuildPlatform: 'x64' + BundlePlatform: 'win64' + + steps: + - template: release-fetch-source.yml + - template: windows-dependencies.yml + - template: windows-dependency-zip.yml + - ${{ if eq(parameters.IsStableRelease, true) }}: + - template: windows-dependency-nsis.yml + - template: windows-build.yml + parameters: + BuildPlatform: $(BuildPlatform) + - bash: | + set -ex + make -f Makefile.msvc bundle_pdb bundle_zip PLATFORM=$(BundlePlatform) BUNDLE_NAME=openttd-$(Build.BuildNumber)-windows-$(BundlePlatform) + displayName: 'Create bundles' + - ${{ if eq(parameters.IsStableRelease, true) }}: + - bash: | + set -ex + # NSIS will be part of the Hosted image in the next update. Till then, we set the PATH ourself + export PATH="${PATH}:/c/Program Files (x86)/NSIS" + make -f Makefile.msvc bundle_exe PLATFORM=$(BundlePlatform) BUNDLE_NAME=citymania-client-$(Build.BuildNumber)-$(BundlePlatform) + displayName: 'Create installer bundle' + - template: release-bundles.yml + +-job: publish + dependsOn: + - linux + displayName: 'Publish bundles' + inputs: + PathtoPublish: bundles/ + ArtifactName: bundles