Github: Re-add changes to upstream release workflows
This commit is contained in:
126
.github/workflows/release-linux-distros.yml
vendored
Normal file
126
.github/workflows/release-linux-distros.yml
vendored
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
name: Release (Linux Distros)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
survey_key:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux-distro:
|
||||||
|
name: Linux (Distros)
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- container_image: "ubuntu:18.04"
|
||||||
|
bundle_name: "bionic"
|
||||||
|
compiler: "g++-8"
|
||||||
|
c_compiler: "gcc-8"
|
||||||
|
- container_image: "ubuntu:20.04"
|
||||||
|
bundle_name: "focal"
|
||||||
|
compiler: "g++"
|
||||||
|
c_compiler: "gcc"
|
||||||
|
- container_image: "ubuntu:22.04"
|
||||||
|
bundle_name: "jammy"
|
||||||
|
compiler: "g++"
|
||||||
|
c_compiler: "gcc"
|
||||||
|
- container_image: "debian:buster"
|
||||||
|
bundle_name: "buster"
|
||||||
|
compiler: "g++"
|
||||||
|
c_compiler: "gcc"
|
||||||
|
- container_image: "debian:bullseye"
|
||||||
|
bundle_name: "bullseye"
|
||||||
|
compiler: "g++"
|
||||||
|
c_compiler: "gcc"
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
container:
|
||||||
|
image: ${{ matrix.container_image }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download source
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: internal-source
|
||||||
|
|
||||||
|
- name: Unpack source
|
||||||
|
run: |
|
||||||
|
tar -xf source.tar.gz --strip-components=1
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
echo "::group::Update apt"
|
||||||
|
apt-get update
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Install dependencies"
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
cmake \
|
||||||
|
debhelper \
|
||||||
|
${{ matrix.compiler }} \
|
||||||
|
${{ matrix.c_compiler }} \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
openssl \
|
||||||
|
libcurl4-openssl-dev \
|
||||||
|
libfontconfig-dev \
|
||||||
|
libfluidsynth-dev \
|
||||||
|
libicu-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
libzstd-dev \
|
||||||
|
liblzo2-dev \
|
||||||
|
libsdl2-dev \
|
||||||
|
lsb-release \
|
||||||
|
zlib1g-dev \
|
||||||
|
libharfbuzz-dev \
|
||||||
|
# EOF
|
||||||
|
echo "::endgroup::"
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
|
||||||
|
- name: Install GCC problem matcher
|
||||||
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "::group::CMake"
|
||||||
|
CXX=${{ matrix.compiler }} CC=${{ matrix.c_compiler }} cmake ${GITHUB_WORKSPACE} \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DOPTION_COMPRESS_DEBUG=ON \
|
||||||
|
-DOPTION_LTO=ON \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
# EOF
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Build"
|
||||||
|
echo "Running on $(nproc) cores"
|
||||||
|
# Ubuntu 18.04 cmake does not support -j so we pass the option to the native tool
|
||||||
|
cmake --build . -- -j $(nproc)
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
- name: Create bundles
|
||||||
|
run: |
|
||||||
|
cd ${GITHUB_WORKSPACE}/build
|
||||||
|
echo "::group::Run CPack"
|
||||||
|
cpack
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Cleanup"
|
||||||
|
# Remove the sha256 files CPack generates; we will do this ourself at
|
||||||
|
# the end of this workflow.
|
||||||
|
rm -f bundles/*.sha256
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
- name: Store bundles
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: openttd-linux-${{ matrix.bundle_name }}
|
||||||
|
path: build/bundles
|
||||||
|
retention-days: 5
|
5
.github/workflows/release-linux.yml
vendored
5
.github/workflows/release-linux.yml
vendored
@@ -87,6 +87,7 @@ jobs:
|
|||||||
nlohmann-json \
|
nlohmann-json \
|
||||||
sdl2 \
|
sdl2 \
|
||||||
zlib \
|
zlib \
|
||||||
|
zstd \
|
||||||
# EOF
|
# EOF
|
||||||
)
|
)
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
@@ -123,7 +124,9 @@ jobs:
|
|||||||
echo "::group::CMake"
|
echo "::group::CMake"
|
||||||
cmake ${GITHUB_WORKSPACE} \
|
cmake ${GITHUB_WORKSPACE} \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DOPTION_COMPRESS_DEBUG=ON \
|
||||||
|
-DOPTION_LTO=ON \
|
||||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||||
-DOPTION_PACKAGE_DEPENDENCIES=ON \
|
-DOPTION_PACKAGE_DEPENDENCIES=ON \
|
||||||
# EOF
|
# EOF
|
||||||
|
7
.github/workflows/release-macos.yml
vendored
7
.github/workflows/release-macos.yml
vendored
@@ -65,6 +65,8 @@ jobs:
|
|||||||
nlohmann-json:arm64-osx \
|
nlohmann-json:arm64-osx \
|
||||||
zlib:x64-osx \
|
zlib:x64-osx \
|
||||||
zlib:arm64-osx \
|
zlib:arm64-osx \
|
||||||
|
zstd:x64-osx \
|
||||||
|
zstd:arm64-osx \
|
||||||
# EOF
|
# EOF
|
||||||
|
|
||||||
- name: Install GCC problem matcher
|
- name: Install GCC problem matcher
|
||||||
@@ -88,6 +90,7 @@ jobs:
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Import code signing certificates
|
- name: Import code signing certificates
|
||||||
|
if: ${{ false }} # disable for now
|
||||||
uses: Apple-Actions/import-codesign-certs@v2
|
uses: Apple-Actions/import-codesign-certs@v2
|
||||||
with:
|
with:
|
||||||
# The certificates in a PKCS12 file encoded as a base64 string
|
# The certificates in a PKCS12 file encoded as a base64 string
|
||||||
@@ -108,7 +111,7 @@ jobs:
|
|||||||
-DVCPKG_TARGET_TRIPLET=arm64-osx \
|
-DVCPKG_TARGET_TRIPLET=arm64-osx \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||||
# EOF
|
# EOF
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
@@ -129,7 +132,7 @@ jobs:
|
|||||||
-DVCPKG_TARGET_TRIPLET=x64-osx \
|
-DVCPKG_TARGET_TRIPLET=x64-osx \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||||
-DCPACK_BUNDLE_APPLE_CERT_APP=${{ secrets.APPLE_DEVELOPER_CERTIFICATE_ID }} \
|
-DCPACK_BUNDLE_APPLE_CERT_APP=${{ secrets.APPLE_DEVELOPER_CERTIFICATE_ID }} \
|
||||||
"-DCPACK_BUNDLE_APPLE_CODESIGN_PARAMETER=--deep -f --options runtime" \
|
"-DCPACK_BUNDLE_APPLE_CODESIGN_PARAMETER=--deep -f --options runtime" \
|
||||||
|
6
.github/workflows/release-source.yml
vendored
6
.github/workflows/release-source.yml
vendored
@@ -95,9 +95,9 @@ jobs:
|
|||||||
cmake -DGENERATE_OTTDREV=1 -P cmake/scripts/FindVersion.cmake
|
cmake -DGENERATE_OTTDREV=1 -P cmake/scripts/FindVersion.cmake
|
||||||
./.github/changelog.sh > .changelog
|
./.github/changelog.sh > .changelog
|
||||||
TZ='UTC' date +"%Y-%m-%d %H:%M UTC" > .release_date
|
TZ='UTC' date +"%Y-%m-%d %H:%M UTC" > .release_date
|
||||||
cat .ottdrev | cut -f 1 -d$'\t' > .version
|
head -1 .ottdrev-vc | cut -f 1 -d$'\t' > .version
|
||||||
|
|
||||||
if [ $(cat .ottdrev | cut -f 5 -d$'\t') = '1' ]; then
|
if [ $(head -1 .ottdrev-vc | cut -f 5 -d$'\t') = '1' ]; then
|
||||||
# Assume that all tags are always releases. Why else make a tag?
|
# Assume that all tags are always releases. Why else make a tag?
|
||||||
IS_TAG="true"
|
IS_TAG="true"
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "Release Date: $(cat .release_date)"
|
echo "Release Date: $(cat .release_date)"
|
||||||
echo "Revision: $(cat .ottdrev)"
|
echo "Revision: $(cat .ottdrev-vc)"
|
||||||
echo "Version: $(cat .version)"
|
echo "Version: $(cat .version)"
|
||||||
echo "Is tag: ${IS_TAG}"
|
echo "Is tag: ${IS_TAG}"
|
||||||
echo "Folder on CDN: ${FOLDER}"
|
echo "Folder on CDN: ${FOLDER}"
|
||||||
|
3
.github/workflows/release-windows.yml
vendored
3
.github/workflows/release-windows.yml
vendored
@@ -104,6 +104,7 @@ jobs:
|
|||||||
arch: ${{ matrix.host }}
|
arch: ${{ matrix.host }}
|
||||||
|
|
||||||
- name: Import code signing certificate
|
- name: Import code signing certificate
|
||||||
|
if: ${{ false }} # Disabled
|
||||||
shell: powershell
|
shell: powershell
|
||||||
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -190,7 +191,7 @@ jobs:
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Sign installer
|
- name: Sign installer
|
||||||
if: inputs.is_tag == 'true'
|
if: ${{ false }} # inputs.is_tag == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@@ -6,13 +6,13 @@ on:
|
|||||||
ref:
|
ref:
|
||||||
description: 'Ref to build (for Pull Requests, use refs/pull/NNN/head)'
|
description: 'Ref to build (for Pull Requests, use refs/pull/NNN/head)'
|
||||||
required: true
|
required: true
|
||||||
repository_dispatch:
|
# repository_dispatch:
|
||||||
# client_payload should be the same as the inputs for workflow_dispatch.
|
# # client_payload should be the same as the inputs for workflow_dispatch.
|
||||||
types:
|
# types:
|
||||||
- Build*
|
# - Build*
|
||||||
release:
|
# release:
|
||||||
types:
|
# types:
|
||||||
- published
|
# - published
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
source:
|
source:
|
||||||
@@ -41,6 +41,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
survey_key: ${{ needs.source.outputs.survey_key }}
|
survey_key: ${{ needs.source.outputs.survey_key }}
|
||||||
|
|
||||||
|
linux_distros:
|
||||||
|
name: Linux (Distros)
|
||||||
|
needs: source
|
||||||
|
|
||||||
|
uses: ./.github/workflows/release-linux-distros.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
with:
|
||||||
|
survey_key: ${{ needs.source.outputs.survey_key }}
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
name: MacOS
|
name: MacOS
|
||||||
needs: source
|
needs: source
|
||||||
|
Reference in New Issue
Block a user