2019-01-05 19:11:29 +00:00
|
|
|
parameters:
|
|
|
|
# If this is false, not all targets are triggered. For example:
|
|
|
|
# The NSIS installer for Windows and the creation of debs only work for
|
|
|
|
# releases. Not for any other type of binary. So they are skilled if this
|
|
|
|
# is set to false.
|
|
|
|
IsStableRelease: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: source
|
|
|
|
displayName: 'Source'
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: release-prepare-source.yml
|
|
|
|
- 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
|
|
|
|
|
2019-04-07 10:01:32 +00:00
|
|
|
mkdir -p build/bundles
|
|
|
|
tar --xz -cf build/bundles/openttd-$(Build.BuildNumber)-source.tar.xz openttd-$(Build.BuildNumber)
|
|
|
|
zip -9 -r -q build/bundles/openttd-$(Build.BuildNumber)-source.zip openttd-$(Build.BuildNumber)
|
2019-01-05 19:11:29 +00:00
|
|
|
displayName: 'Create bundle'
|
|
|
|
- template: release-bundles.yml
|
|
|
|
|
|
|
|
- job: meta
|
|
|
|
displayName: 'Metadata'
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
dependsOn: source
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: release-fetch-source.yml
|
|
|
|
- script: |
|
|
|
|
set -ex
|
|
|
|
|
2019-04-07 10:01:32 +00:00
|
|
|
mkdir -p build/bundles
|
|
|
|
cp .changelog build/bundles/changelog.txt
|
|
|
|
cp .release_date build/bundles/released.txt
|
|
|
|
cp README.md build/bundles/README.md
|
2019-01-05 19:11:29 +00:00
|
|
|
displayName: 'Copy meta files'
|
|
|
|
- template: release-bundles.yml
|
|
|
|
parameters:
|
|
|
|
CalculateChecksums: false
|
|
|
|
|
|
|
|
- job: docs
|
|
|
|
displayName: 'Docs'
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
dependsOn: source
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: release-fetch-source.yml
|
|
|
|
- template: linux-build.yml
|
|
|
|
parameters:
|
|
|
|
Image: compile-farm
|
|
|
|
ContainerCommand: '$(Build.BuildNumber)'
|
|
|
|
Tag: docs
|
|
|
|
- template: linux-claim-bundles.yml
|
|
|
|
- template: release-bundles.yml
|
|
|
|
|
|
|
|
- job: windows
|
|
|
|
displayName: 'Windows'
|
|
|
|
pool:
|
|
|
|
vmImage: 'VS2017-Win2016'
|
|
|
|
dependsOn: source
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Win32:
|
|
|
|
BundlePlatform: 'win32'
|
2019-04-07 10:01:32 +00:00
|
|
|
BuildArch: 'Win32'
|
|
|
|
VcpkgTargetTriplet: 'x86-windows-static'
|
2019-01-05 19:11:29 +00:00
|
|
|
Win64:
|
|
|
|
BundlePlatform: 'win64'
|
2019-04-07 10:01:32 +00:00
|
|
|
BuildArch: 'x64'
|
|
|
|
VcpkgTargetTriplet: 'x64-windows-static'
|
2019-01-05 19:11:29 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: release-fetch-source.yml
|
|
|
|
- template: windows-dependencies.yml
|
|
|
|
- template: windows-dependency-zip.yml
|
|
|
|
- template: windows-build.yml
|
|
|
|
parameters:
|
2019-04-07 10:01:32 +00:00
|
|
|
BuildArch: $(BuildArch)
|
|
|
|
VcpkgTargetTriplet: $(VcpkgTargetTriplet)
|
|
|
|
BuildConfiguration: 'RelWithDebInfo'
|
2020-06-07 02:34:50 +00:00
|
|
|
${{ if eq(parameters.IsStableRelease, true) }}:
|
2020-06-07 14:11:36 +00:00
|
|
|
OptionUseNSIS: "ON"
|
2019-04-07 10:01:32 +00:00
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Create bundles'
|
|
|
|
inputs:
|
|
|
|
solution: build/PACKAGE.vcxproj
|
|
|
|
configuration: 'RelWithDebInfo'
|
2019-01-05 19:11:29 +00:00
|
|
|
- bash: |
|
|
|
|
set -ex
|
2019-04-07 10:01:32 +00:00
|
|
|
|
|
|
|
cp build/RelWithDebInfo/openttd.pdb build/bundles/openttd-$(Build.BuildNumber)-windows-$(BundlePlatform).pdb
|
2020-06-07 13:03:55 +00:00
|
|
|
xz -9 build/bundles/openttd-$(Build.BuildNumber)-windows-$(BundlePlatform).pdb
|
2019-04-07 10:01:32 +00:00
|
|
|
displayName: 'Copy PDB to bundles folder'
|
2019-01-05 19:11:29 +00:00
|
|
|
- template: release-bundles.yml
|
|
|
|
|
|
|
|
- ${{ if eq(parameters.IsStableRelease, true) }}:
|
|
|
|
- job: linux_stable
|
|
|
|
displayName: 'Linux'
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
dependsOn: source
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-05-02 20:17:09 +00:00
|
|
|
linux-ubuntu-xenial-i386-gcc:
|
|
|
|
Tag: 'linux-ubuntu-xenial-i386-gcc'
|
|
|
|
linux-ubuntu-xenial-amd64-gcc:
|
|
|
|
Tag: 'linux-ubuntu-xenial-amd64-gcc'
|
|
|
|
linux-ubuntu-bionic-i386-gcc:
|
|
|
|
Tag: 'linux-ubuntu-bionic-i386-gcc'
|
|
|
|
linux-ubuntu-bionic-amd64-gcc:
|
|
|
|
Tag: 'linux-ubuntu-bionic-amd64-gcc'
|
2020-05-09 12:11:38 +00:00
|
|
|
linux-ubuntu-focal-amd64-gcc:
|
|
|
|
Tag: 'linux-ubuntu-focal-amd64-gcc'
|
2019-05-02 20:17:09 +00:00
|
|
|
linux-debian-stretch-i386-gcc:
|
2019-05-02 21:40:36 +00:00
|
|
|
Tag: 'linux-debian-stretch-i386-gcc'
|
2019-05-02 20:17:09 +00:00
|
|
|
linux-debian-stretch-amd64-gcc:
|
2019-05-02 21:40:36 +00:00
|
|
|
Tag: 'linux-debian-stretch-amd64-gcc'
|
2019-10-29 10:01:21 +00:00
|
|
|
linux-debian-buster-i386-gcc:
|
|
|
|
Tag: 'linux-debian-buster-i386-gcc'
|
|
|
|
linux-debian-buster-amd64-gcc:
|
|
|
|
Tag: 'linux-debian-buster-amd64-gcc'
|
2019-01-05 19:11:29 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: release-fetch-source.yml
|
|
|
|
- template: linux-build.yml
|
|
|
|
parameters:
|
|
|
|
Image: compile-farm
|
|
|
|
ContainerCommand: '$(Build.BuildNumber)'
|
2019-05-02 20:17:09 +00:00
|
|
|
Tag: $(Tag)
|
2019-01-05 19:11:29 +00:00
|
|
|
- template: linux-claim-bundles.yml
|
|
|
|
- template: release-bundles.yml
|
|
|
|
|
|
|
|
- job: macos
|
|
|
|
displayName: 'MacOS'
|
|
|
|
pool:
|
2020-02-29 11:21:30 +00:00
|
|
|
vmImage: 'macOS-10.14'
|
2019-01-05 19:11:29 +00:00
|
|
|
dependsOn: source
|
|
|
|
|
2019-02-24 20:34:37 +00:00
|
|
|
variables:
|
|
|
|
MACOSX_DEPLOYMENT_TARGET: 10.9
|
|
|
|
|
2019-01-05 19:11:29 +00:00
|
|
|
steps:
|
|
|
|
- template: release-fetch-source.yml
|
|
|
|
- template: osx-dependencies.yml
|
|
|
|
- template: osx-build.yml
|
2019-04-07 10:01:32 +00:00
|
|
|
- script: |
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
cd build
|
|
|
|
make package
|
2019-01-05 19:11:29 +00:00
|
|
|
displayName: 'Create bundles'
|
|
|
|
- template: release-bundles.yml
|
|
|
|
|
|
|
|
- job: manifest
|
|
|
|
displayName: 'Manifest'
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
dependsOn:
|
|
|
|
- source
|
|
|
|
- docs
|
|
|
|
- windows
|
|
|
|
- ${{ if eq(parameters.IsStableRelease, true) }}:
|
|
|
|
- linux_stable
|
|
|
|
- macos
|
|
|
|
# "Skipped" is not a status, and is not succeeded. So it seems to be
|
|
|
|
# considered failed. So we trigger if all the earlier jobs are done (which
|
|
|
|
# might be succeeded, failed, or skipped), and run this job. This is not
|
|
|
|
# optimal, but given the rules, it is the only way to get this to work (as
|
|
|
|
# some jobs might be skipped).
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: release-fetch-source.yml
|
|
|
|
- template: release-manifest.yml
|
2019-02-09 19:13:28 +00:00
|
|
|
${{ if eq(parameters.IsStableRelease, true) }}:
|
|
|
|
parameters:
|
|
|
|
IsStableRelease: true
|
2019-01-05 19:11:29 +00:00
|
|
|
- template: release-bundles.yml
|
|
|
|
parameters:
|
|
|
|
CalculateChecksums: false
|