summaryrefslogtreecommitdiff
path: root/azure-pipelines/templates
diff options
context:
space:
mode:
Diffstat (limited to 'azure-pipelines/templates')
-rw-r--r--azure-pipelines/templates/linux-build.yml39
-rw-r--r--azure-pipelines/templates/linux-claim-bundles.yml5
-rw-r--r--azure-pipelines/templates/osx-build.yml9
-rw-r--r--azure-pipelines/templates/osx-dependencies.yml5
-rw-r--r--azure-pipelines/templates/release-bundles.yml26
-rw-r--r--azure-pipelines/templates/release-fetch-source.yml20
-rw-r--r--azure-pipelines/templates/release-manifest.yml20
-rw-r--r--azure-pipelines/templates/release-prepare-source.yml37
-rw-r--r--azure-pipelines/templates/release.yml193
-rw-r--r--azure-pipelines/templates/windows-build.yml17
-rw-r--r--azure-pipelines/templates/windows-dependencies.yml14
-rw-r--r--azure-pipelines/templates/windows-dependency-zip.yml5
12 files changed, 0 insertions, 390 deletions
diff --git a/azure-pipelines/templates/linux-build.yml b/azure-pipelines/templates/linux-build.yml
deleted file mode 100644
index 88095c9d3..000000000
--- a/azure-pipelines/templates/linux-build.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-parameters:
- Image: ''
- Tag: ''
- ContainerCommand: ''
-
-steps:
-# 'envVars' in the 'Docker@1' task is a bit funky. When you want to use a
-# variable, you have to quote it. But the quote is also sent directly to
-# Docker and ends up in the variable, which you don't want. To work around
-# this, we set the correct variable first (which becomes an env-variable), and
-# pass that env-variable through to Docker. We cannot use the normal
-# 'variables' entry, as we are a template. So that results in this bit of
-# Bash code. Not because it is pretty, but it is the only way we found that
-# works.
-- bash: |
- echo "##vso[task.setvariable variable=TARGET_BRANCH]${SYSTEM_PULLREQUEST_TARGETBRANCH}"
- echo "Target branch is ${SYSTEM_PULLREQUEST_TARGETBRANCH}"
- displayName: "Set target branch"
- condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
-
-- task: Docker@1
- ${{ if eq(parameters.Image, 'compile-farm') }}:
- displayName: 'Build'
- ${{ if eq(parameters.Image, 'compile-farm-ci') }}:
- displayName: 'Build and test'
- # Run the commit-checker only if it is a Pull Request
- condition: and(succeeded(), or(not(contains(variables['Agent.JobName'], 'commit-checker')), eq(variables['Build.Reason'], 'PullRequest')))
- inputs:
- command: 'Run an image'
- imageName: openttd/${{ parameters.Image }}:${{ parameters.Tag }}
- volumes: |
- $(Build.SourcesDirectory):$(Build.SourcesDirectory)
- /usr/local/share/games/openttd:/usr/local/share/games/openttd
- workingDirectory: '$(Build.SourcesDirectory)'
- containerCommand: ${{ parameters.ContainerCommand }}
- runInBackground: false
- envVars: |
- TARGET_BRANCH
- CTEST_OUTPUT_ON_FAILURE=1
diff --git a/azure-pipelines/templates/linux-claim-bundles.yml b/azure-pipelines/templates/linux-claim-bundles.yml
deleted file mode 100644
index 162584f23..000000000
--- a/azure-pipelines/templates/linux-claim-bundles.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-steps:
-# Because we run the compile in a docker (under root), we are not owner
-# of the 'bundles' folder. Fix that by executing a chown on it.
-- bash: sudo chown -R $(id -u):$(id -g) build/bundles
- displayName: 'Claim bundles folder back'
diff --git a/azure-pipelines/templates/osx-build.yml b/azure-pipelines/templates/osx-build.yml
deleted file mode 100644
index 2baabf932..000000000
--- a/azure-pipelines/templates/osx-build.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-steps:
-- script: |
- set -ex
-
- mkdir build
- cd build
- cmake ..
- make -j2
- displayName: 'Build'
diff --git a/azure-pipelines/templates/osx-dependencies.yml b/azure-pipelines/templates/osx-dependencies.yml
deleted file mode 100644
index d918d12c5..000000000
--- a/azure-pipelines/templates/osx-dependencies.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-steps:
-- script: |
- set -ex
- HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config lzo xz libpng freetype
- displayName: 'Install dependencies'
diff --git a/azure-pipelines/templates/release-bundles.yml b/azure-pipelines/templates/release-bundles.yml
deleted file mode 100644
index f9f9fdcdd..000000000
--- a/azure-pipelines/templates/release-bundles.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-parameters:
- CalculateChecksums: true
-
-steps:
-- ${{ if eq(parameters.CalculateChecksums, true) }}:
- - bash: |
- set -ex
- cd build/bundles
-
- # CPack generates sha256, but with a slightly different name than
- # our own convention. Also, because we rename files, the content
- # might be out of date. To be safe, we remove it and replace it
- # with our own version.
- rm -f *.sha256
-
- for i in $(ls); do
- openssl dgst -r -md5 -hex $i > $i.md5sum
- openssl dgst -r -sha1 -hex $i > $i.sha1sum
- openssl dgst -r -sha256 -hex $i > $i.sha256sum
- done
- displayName: 'Calculate checksums'
-- task: PublishBuildArtifacts@1
- displayName: 'Publish bundles'
- inputs:
- PathtoPublish: build/bundles/
- ArtifactName: bundles
diff --git a/azure-pipelines/templates/release-fetch-source.yml b/azure-pipelines/templates/release-fetch-source.yml
deleted file mode 100644
index 8b4398306..000000000
--- a/azure-pipelines/templates/release-fetch-source.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Fetch the source tarball as prepared by an earlier job. In there is the
-# version predefined. This ensures we are all going to compile the same
-# source with the same version.
-
-steps:
-- checkout: none
-- task: DownloadBuildArtifacts@0
- displayName: 'Download source'
- inputs:
- downloadType: specific
- itemPattern: 'bundles/openttd-*-source.tar.xz'
- downloadPath: '$(Build.ArtifactStagingDirectory)'
-- bash: tar --xz -xf ../a/bundles/openttd-*-source.tar.xz --strip-components=1
- displayName: 'Extracting source'
-- bash: |
- set -e
- VERSION=$(cat .version)
- echo "${VERSION}"
- echo "##vso[build.updatebuildnumber]${VERSION}"
- displayName: 'Change BuildNumber to version'
diff --git a/azure-pipelines/templates/release-manifest.yml b/azure-pipelines/templates/release-manifest.yml
deleted file mode 100644
index 9fe30717b..000000000
--- a/azure-pipelines/templates/release-manifest.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-parameters:
- IsStableRelease: false
-
-steps:
-- task: DownloadBuildArtifacts@0
- displayName: 'Download all bundles'
- inputs:
- downloadType: specific
- itemPattern: 'bundles/*'
- downloadPath: '$(Build.ArtifactStagingDirectory)'
-- ${{ if eq(parameters.IsStableRelease, true) }}:
- - script: |
- touch .is_stable
- displayName: 'Mark as stable release'
-- script: |
- set -ex
- ./azure-pipelines/manifest.sh ../a/bundles/
- mkdir -p build/bundles
- mv manifest.yaml build/bundles/
- displayName: 'Create manifest.yaml'
diff --git a/azure-pipelines/templates/release-prepare-source.yml b/azure-pipelines/templates/release-prepare-source.yml
deleted file mode 100644
index 3eb148aef..000000000
--- a/azure-pipelines/templates/release-prepare-source.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-# Set the revisions, and remove the VCS files.
-# This ensures everything else picks up on the predefined versions, and not
-# that because of some build process the version all of a sudden changes.
-
-steps:
-- script: |
- set -ex
-
- if [ -n "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}" ]; then
- # We are triggered from a GitHub Pull Request
- git checkout -B pr${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}
- elif [ "${BUILD_SOURCEBRANCHNAME}" = "merge" ] || [ "${BUILD_SOURCEBRANCHNAME}" = "head" ]; then
- # We are manually triggered based on a GitHub Pull Request
- PULLREQUESTNUMBER=$(echo ${BUILD_SOURCEBRANCH} | cut -d/ -f3)
- git checkout -B pr${PULLREQUESTNUMBER}
- else
- git checkout -B ${BUILD_SOURCEBRANCHNAME}
- fi
-
- # Generate .ottdrev, which contains the version information
- cmake -DGENERATE_OTTDREV=1 -P cmake/scripts/FindVersion.cmake
-
- ./azure-pipelines/changelog.sh > .changelog
- TZ='UTC' date +"%Y-%m-%d %H:%M UTC" > .release_date
- cat .ottdrev | cut -f 1 -d$'\t' > .version
- echo "Release Date: $(cat .release_date)"
- echo "Revision: $(cat .ottdrev)"
- echo "Version: $(cat .version)"
- displayName: 'Create version files'
-- script: |
- set -e
- VERSION=$(cat .version)
- echo "${VERSION}"
- echo "##vso[build.updatebuildnumber]${VERSION}"
- displayName: 'Change BuildNumber to version'
-- script: find . -iname .hg -or -iname .git -or -iname .svn | xargs rm -rf
- displayName: 'Remove VCS information'
diff --git a/azure-pipelines/templates/release.yml b/azure-pipelines/templates/release.yml
deleted file mode 100644
index f6a00b7cf..000000000
--- a/azure-pipelines/templates/release.yml
+++ /dev/null
@@ -1,193 +0,0 @@
-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
-
- 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)
- 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
-
- mkdir -p build/bundles
- cp .changelog build/bundles/changelog.txt
- cp .release_date build/bundles/released.txt
- cp README.md build/bundles/README.md
- 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'
- BuildArch: 'Win32'
- VcpkgTargetTriplet: 'x86-windows-static'
- Win64:
- BundlePlatform: 'win64'
- BuildArch: 'x64'
- VcpkgTargetTriplet: 'x64-windows-static'
-
- steps:
- - template: release-fetch-source.yml
- - template: windows-dependencies.yml
- - template: windows-dependency-zip.yml
- - template: windows-build.yml
- parameters:
- BuildArch: $(BuildArch)
- VcpkgTargetTriplet: $(VcpkgTargetTriplet)
- BuildConfiguration: 'RelWithDebInfo'
- ${{ if eq(parameters.IsStableRelease, true) }}:
- OptionUseNSIS: "ON"
- - task: VSBuild@1
- displayName: 'Create bundles'
- inputs:
- solution: build/PACKAGE.vcxproj
- configuration: 'RelWithDebInfo'
- - bash: |
- set -ex
-
- cp build/RelWithDebInfo/openttd.pdb build/bundles/openttd-$(Build.BuildNumber)-windows-$(BundlePlatform).pdb
- xz -9 build/bundles/openttd-$(Build.BuildNumber)-windows-$(BundlePlatform).pdb
- displayName: 'Copy PDB to bundles folder'
- - template: release-bundles.yml
-
-- ${{ if eq(parameters.IsStableRelease, true) }}:
- - job: linux_stable
- displayName: 'Linux'
- pool:
- vmImage: 'ubuntu-16.04'
- dependsOn: source
-
- strategy:
- matrix:
- 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'
- linux-ubuntu-focal-amd64-gcc:
- Tag: 'linux-ubuntu-focal-amd64-gcc'
- linux-debian-stretch-i386-gcc:
- Tag: 'linux-debian-stretch-i386-gcc'
- linux-debian-stretch-amd64-gcc:
- Tag: 'linux-debian-stretch-amd64-gcc'
- linux-debian-buster-i386-gcc:
- Tag: 'linux-debian-buster-i386-gcc'
- linux-debian-buster-amd64-gcc:
- Tag: 'linux-debian-buster-amd64-gcc'
-
- steps:
- - template: release-fetch-source.yml
- - template: linux-build.yml
- parameters:
- Image: compile-farm
- ContainerCommand: '$(Build.BuildNumber)'
- Tag: $(Tag)
- - template: linux-claim-bundles.yml
- - template: release-bundles.yml
-
-- job: macos
- displayName: 'MacOS'
- pool:
- vmImage: 'macOS-10.14'
- dependsOn: source
-
- variables:
- MACOSX_DEPLOYMENT_TARGET: 10.9
-
- steps:
- - template: release-fetch-source.yml
- - template: osx-dependencies.yml
- - template: osx-build.yml
- - script: |
- set -ex
-
- cd build
- make package
- 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
- ${{ if eq(parameters.IsStableRelease, true) }}:
- parameters:
- IsStableRelease: true
- - template: release-bundles.yml
- parameters:
- CalculateChecksums: false
diff --git a/azure-pipelines/templates/windows-build.yml b/azure-pipelines/templates/windows-build.yml
deleted file mode 100644
index ae3b89414..000000000
--- a/azure-pipelines/templates/windows-build.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-parameters:
- BuildArch: ''
- VcpkgTargetTriplet: ''
- BuildConfiguration: ''
- OptionUseNSIS: 'OFF'
-
-steps:
-- task: CMake@1
- displayName: 'Configure'
- inputs:
- cmakeArgs: '.. -G "Visual Studio 15 2017" -A ${{ parameters.BuildArch }} -DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="${{ parameters.VcpkgTargetTriplet }}" -DOPTION_USE_NSIS="${{ parameters.OptionUseNSIS }}"'
-- task: VSBuild@1
- displayName: 'Build'
- inputs:
- solution: build/openttd.vcxproj
- configuration: ${{ parameters.BuildConfiguration }}
- maximumCpuCount: true
diff --git a/azure-pipelines/templates/windows-dependencies.yml b/azure-pipelines/templates/windows-dependencies.yml
deleted file mode 100644
index 72368b9d7..000000000
--- a/azure-pipelines/templates/windows-dependencies.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-steps:
-- bash: |
- set -ex
-
- curl -L https://github.com/OpenTTD/CompileFarm/releases/download/latest/windows-dependencies.zip > windows-dependencies.zip
- unzip windows-dependencies.zip
- rm -f windows-dependencies.zip
-
- mv windows-dependencies/installed /c/vcpkg/
- rm -rf windows-dependencies
- displayName: 'Install dependencies'
- workingDirectory: $(Build.ArtifactStagingDirectory)
-- script: c:\vcpkg\vcpkg.exe integrate install
- displayName: 'Integrate vcpkg'
diff --git a/azure-pipelines/templates/windows-dependency-zip.yml b/azure-pipelines/templates/windows-dependency-zip.yml
deleted file mode 100644
index e2ae06dbe..000000000
--- a/azure-pipelines/templates/windows-dependency-zip.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-steps:
-- bash: |
- set -ex
- choco install zip
- displayName: 'Install zip'