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 release_files -not -name .git -not -name . -not -name openttd-$(Build.BuildNumber) -exec mv {} openttd-$(Build.BuildNumber)/ \; cp -r release_files/* openttd-$(Build.BuildNumber)/ 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)' - bash: | set -e VERSION=$(cat .version) echo "##vso[build.updatebuildnumber]${VERSION}" displayName: 'Change BuildNumber to version' - bash: | set -ex curl -L https://proxy.binaries.openttd.org/openttd-releases/$(Build.BuildNumber)/openttd-$(Build.BuildNumber)-source.tar.xz > vanilla-source.tar.xz displayName: 'Download vanilla' - 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: 'Extract sources' - bash: | set -ex mkdir -p bundles echo "bundles/citymania-client-$(Build.BuildNumber).diff" diff -r vanilla cmclient -B -X .diff-exclude > bundles/citymania-client-$(Build.BuildNumber).diff || EXIT_CODE=$? && true if ((EXIT_CODE != 1)); then exit $EXIT_CODE; fi displayName: 'Make diff' - task: PublishBuildArtifacts@1 displayName: 'Publish bundles' inputs: PathtoPublish: bundles/ ArtifactName: bundles - job: linux displayName: 'Linux' pool: vmImage: 'ubuntu-16.04' dependsOn: source strategy: matrix: linux-ubuntu-bionic-amd64-gcc: Tag: 'linux-ubuntu-bionic-amd64-gcc' steps: - template: azure-pipelines/templates/release-fetch-source.yml - template: azure-pipelines/templates/linux-build.yml parameters: Image: compile-farm ContainerCommand: '$(Build.BuildNumber)' Tag: $(Tag) - 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) BuildConfiguration: Release - 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: macos displayName: 'MacOS' pool: vmImage: 'macOS-10.14' dependsOn: source variables: MACOSX_DEPLOYMENT_TARGET: 10.9 steps: - template: azure-pipelines/templates/release-fetch-source.yml - template: azure-pipelines/templates/osx-dependencies.yml - template: azure-pipelines/templates/osx-build.yml - script: 'make bundle_zip bundle_dmg BUNDLE_NAME=citymania-client-$(Build.BuildNumber)-macosx' displayName: 'Create bundles' - task: PublishBuildArtifacts@1 displayName: 'Publish bundles' inputs: PathtoPublish: bundles/ ArtifactName: bundles