Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/release-linux.yml # .github/workflows/release-macos.yml # .github/workflows/release-windows.yml # .gitignore # COMPILING.md # src/company_gui.cpp # src/date_gui.cpp # src/engine.cpp # src/engine_func.h # src/fileio.cpp # src/linkgraph/linkgraph_gui.h # src/newgrf_debug_gui.cpp # src/newgrf_gui.cpp # src/order_gui.cpp # src/osk_gui.cpp # src/rail_gui.cpp # src/road_gui.cpp # src/script/api/script_event_types.hpp # src/sl/oldloader_sl.cpp # src/smallmap_gui.cpp # src/station_cmd.cpp # src/toolbar_gui.cpp # src/town_gui.cpp # src/transparency_gui.cpp # src/vehicle_gui.cpp # src/widget.cpp # src/widget_type.h # src/widgets/dropdown.cpp # src/widgets/dropdown_func.h # src/widgets/dropdown_type.h # src/widgets/group_widget.h # src/widgets/vehicle_widget.h # src/window.cpp # src/window_gui.h # src/window_type.h
This commit is contained in:
100
.github/workflows/ci-build.yml
vendored
100
.github/workflows/ci-build.yml
vendored
@@ -112,7 +112,7 @@ jobs:
|
||||
|
||||
name: Linux (${{ matrix.name }})
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
CXX: ${{ matrix.cxxcompiler }}
|
||||
@@ -128,6 +128,14 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Update apt"
|
||||
@@ -147,6 +155,16 @@ jobs:
|
||||
${{ matrix.libraries }} \
|
||||
zlib1g-dev \
|
||||
# EOF
|
||||
|
||||
echo "::group::Install vcpkg dependencies"
|
||||
|
||||
# Disable vcpkg integration, as we mostly use system libraries.
|
||||
mv vcpkg.json vcpkg-disabled.json
|
||||
|
||||
# We only use breakpad from vcpkg, as its CMake files
|
||||
# are a bit special. So the Ubuntu's variant doesn't work.
|
||||
#vcpkg install breakpad
|
||||
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
@@ -185,10 +203,15 @@ jobs:
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest -j $(nproc) --timeout 120
|
||||
(
|
||||
cd build
|
||||
ctest -j $(nproc) --timeout 120
|
||||
)
|
||||
|
||||
# Check no tracked files have been modified
|
||||
# Re-enable vcpkg.
|
||||
mv vcpkg-disabled.json vcpkg.json
|
||||
|
||||
# Check no tracked files have been modified.
|
||||
git diff --exit-code
|
||||
|
||||
macos:
|
||||
@@ -216,38 +239,13 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: |
|
||||
brew install \
|
||||
pkg-config \
|
||||
# EOF
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
run: |
|
||||
echo "image=$ImageOS-$ImageVersion" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
path: /usr/local/share/vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-1 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-osx \
|
||||
curl \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
zstd \
|
||||
# EOF
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install OpenGFX
|
||||
run: |
|
||||
@@ -312,33 +310,13 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
shell: powershell
|
||||
run: |
|
||||
# Work around caching failure with GNU tar
|
||||
New-Item -Type Junction -Path vcpkg -Target c:\vcpkg
|
||||
|
||||
Write-Output "image=$env:ImageOS-$env:ImageVersion" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
path: vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-1 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-windows-static \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
zstd \
|
||||
# EOF
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install OpenGFX
|
||||
shell: bash
|
||||
|
87
.github/workflows/release-linux.yml
vendored
87
.github/workflows/release-linux.yml
vendored
@@ -12,16 +12,11 @@ jobs:
|
||||
linux:
|
||||
name: Linux (Generic)
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
# manylinux2014 is based on CentOS 7, but already has a lot of things
|
||||
# installed and preconfigured. It makes it easier to build OpenTTD.
|
||||
image: quay.io/pypa/manylinux2014_x86_64
|
||||
volumes:
|
||||
- /usr/local/share/vcpkg:/vcpkg
|
||||
env:
|
||||
ImageOS: ${{ env.ImageOS }}
|
||||
ImageVersion: ${{ env.ImageVersion }}
|
||||
|
||||
steps:
|
||||
- name: Download source
|
||||
@@ -33,18 +28,37 @@ jobs:
|
||||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
# curl is too old for most of the tools to work properly. For example,
|
||||
# rust-toolchain doesn't work properly, neither vcpkg caching.
|
||||
# The easier solution here is to upgrade curl.
|
||||
- name: Update curl
|
||||
run: |
|
||||
echo "image=$ImageOS-$ImageVersion" >> $GITHUB_OUTPUT
|
||||
yum install -y \
|
||||
openssl-devel \
|
||||
# EOF
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
mkdir /curl
|
||||
cd /curl
|
||||
curl -o curl-7.81.0.zip https://curl.se/download/curl-7.81.0.zip
|
||||
unzip curl-7.81.0.zip
|
||||
cd curl-7.81.0
|
||||
./configure --with-ssl --with-zlib --prefix=/usr --libdir=/usr/lib64
|
||||
make -j $(nproc)
|
||||
make install
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
path: /vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-release-1 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-release
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -84,6 +98,14 @@ jobs:
|
||||
cmake --build . -j $(nproc)
|
||||
cmake --install .
|
||||
)
|
||||
|
||||
# The container we use is old enough, that it doesn't know SHF_COMPRESSED.
|
||||
# But, breakpad needs this symbol to exist. So we patch it in our system
|
||||
# libraries.
|
||||
(
|
||||
cd /
|
||||
patch -p1 < ${GITHUB_WORKSPACE}/os/linux/shf-compressed.patch
|
||||
)
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install audio drivers"
|
||||
@@ -100,29 +122,22 @@ jobs:
|
||||
# We use vcpkg for our dependencies, to get more up-to-date version.
|
||||
echo "::group::Install vcpkg and dependencies"
|
||||
|
||||
# Make Python3 available for other packages.
|
||||
/vcpkg/vcpkg install python3
|
||||
ln -sf /vcpkg/installed/x64-linux/tools/python3/python3.[0-9][0-9] /usr/bin/python3
|
||||
git clone https://github.com/microsoft/vcpkg /vcpkg
|
||||
|
||||
# SDL2 needs dbus, but dbus default install comes with libsystemd
|
||||
# and some of libsystemd deps fail to build on our quite old linux.
|
||||
# So just install basic dbus without any extra deps.
|
||||
/vcpkg/vcpkg install dbus[core]
|
||||
(
|
||||
cd /vcpkg
|
||||
./bootstrap-vcpkg.sh -disableMetrics
|
||||
)
|
||||
|
||||
# Now we can install OpenTTD dependencies
|
||||
/vcpkg/vcpkg install \
|
||||
curl[http2] \
|
||||
fontconfig \
|
||||
freetype \
|
||||
harfbuzz \
|
||||
icu \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
sdl2 \
|
||||
zlib \
|
||||
zstd \
|
||||
# EOF
|
||||
# Make Python3 available for other packages. This needs to be done
|
||||
# first, as otherwise dependencies fail to build because Python3 is
|
||||
# not available.
|
||||
(
|
||||
cd /
|
||||
|
||||
/vcpkg/vcpkg install python3
|
||||
ln -sf /vcpkg/installed/x64-linux/tools/python3/python3.[0-9][0-9] /usr/bin/python3
|
||||
)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
|
48
.github/workflows/release-macos.yml
vendored
48
.github/workflows/release-macos.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
macos:
|
||||
name: MacOS
|
||||
|
||||
runs-on: macos-12
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.13
|
||||
|
||||
@@ -26,6 +26,20 @@ jobs:
|
||||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
@@ -33,38 +47,6 @@ jobs:
|
||||
run: |
|
||||
brew install \
|
||||
pandoc \
|
||||
pkg-config \
|
||||
# EOF
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
run: |
|
||||
echo "image=$ImageOS-$ImageVersion" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /usr/local/share/vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-release-1 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-release
|
||||
${{ steps.key.outputs.image }}-vcpkg-x64
|
||||
|
||||
- name: Prepare vcpkg
|
||||
run: |
|
||||
vcpkg install \
|
||||
curl:x64-osx \
|
||||
curl:arm64-osx \
|
||||
liblzma:x64-osx \
|
||||
liblzma:arm64-osx \
|
||||
libpng:x64-osx \
|
||||
libpng:arm64-osx \
|
||||
lzo:x64-osx \
|
||||
lzo:arm64-osx \
|
||||
zlib:x64-osx \
|
||||
zlib:arm64-osx \
|
||||
zstd:x64-osx \
|
||||
zstd:arm64-osx \
|
||||
# EOF
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
|
49
.github/workflows/release-windows.yml
vendored
49
.github/workflows/release-windows.yml
vendored
@@ -39,46 +39,25 @@ jobs:
|
||||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
choco install pandoc
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
shell: powershell
|
||||
run: |
|
||||
# Work around caching failure with GNU tar
|
||||
New-Item -Type Junction -Path vcpkg -Target c:\vcpkg
|
||||
|
||||
Write-Output "image=$env:ImageOS-$env:ImageVersion" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-1 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-windows-static \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
zstd \
|
||||
# EOF
|
||||
|
||||
# arm64-windows-static is not (yet) supported for breakpad.
|
||||
if [ "${{ matrix.arch }}" != "arm64" ]; then
|
||||
vcpkg install --triplet=${{ matrix.arch }}-windows-static \
|
||||
breakpad \
|
||||
# EOF
|
||||
fi
|
||||
|
||||
- name: Install MSVC problem matcher
|
||||
uses: ammaraskar/msvc-problem-matcher@master
|
||||
|
||||
|
Reference in New Issue
Block a user