Files
@ r23483:3733e6b8ff17
Branch filter:
Location: cpp/openttd-patchpack/source/azure-pipelines-ci.yml - annotation
r23483:3733e6b8ff17
1.6 KiB
text/x-yaml
Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.
Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.
A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.
With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.
All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.
Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.
A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.
With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.
All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
r23092:79ac255e172c r23092:79ac255e172c r23396:badc6d0e5c30 r23091:12955d4e1668 r23091:12955d4e1668 r23396:badc6d0e5c30 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23110:3bbf809d66e3 r23110:3bbf809d66e3 r23110:3bbf809d66e3 r23110:3bbf809d66e3 r23110:3bbf809d66e3 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23091:12955d4e1668 r23361:f5e04235e737 r23361:f5e04235e737 r23361:f5e04235e737 r23091:12955d4e1668 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23144:9a2ff041af83 r23091:12955d4e1668 r23091:12955d4e1668 | trigger:
- master
- release/*
pr:
- master
- release/*
jobs:
- job: windows
displayName: 'Windows'
pool:
vmImage: 'VS2017-Win2016'
strategy:
matrix:
Win32:
BuildPlatform: 'Win32'
Win64:
BuildPlatform: 'x64'
steps:
- template: azure-pipelines/templates/ci-git-rebase.yml
- template: azure-pipelines/templates/windows-dependencies.yml
- template: azure-pipelines/templates/ci-opengfx.yml
- template: azure-pipelines/templates/windows-build.yml
parameters:
BuildPlatform: $(BuildPlatform)
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
cd projects
call regression.bat
displayName: 'Test'
- job: linux
displayName: 'Linux'
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
commit-checker: {}
linux-amd64-clang-3.8: {}
linux-amd64-gcc-6: {}
linux-i386-gcc-6: {}
steps:
- template: azure-pipelines/templates/ci-git-rebase.yml
# The dockers already have the dependencies installed
# The dockers already have OpenGFX installed
- template: azure-pipelines/templates/linux-build.yml
parameters:
Image: compile-farm-ci
Tag: $(Agent.JobName)
- job: macos
displayName: 'MacOS'
pool:
vmImage: 'macOS-10.13'
variables:
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
- template: azure-pipelines/templates/ci-git-rebase.yml
- template: azure-pipelines/templates/osx-dependencies.yml
- template: azure-pipelines/templates/ci-opengfx.yml
- template: azure-pipelines/templates/osx-build.yml
- script: 'make regression'
displayName: 'Test'
|