Merge branch 'master' into next

This commit is contained in:
Alam Ed Arias 2024-01-07 14:22:43 -05:00
commit 626ac069f2
7 changed files with 22 additions and 94 deletions

View file

@ -5,13 +5,8 @@ jobs:
docker:
- image: cimg/base:current
environment:
CC: ccache gcc -m32
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
LIBGME_CFLAGS: -I/usr/include
LIBGME_LDFLAGS: -lgme
CC: ccache gcc
CCACHE_COMPRESS: true
WFLAGS: -Wno-unsuffixed-float-constants
GCC81: true
#- image: ubuntu:trusty
# environment:
# CC: ccache gcc -m32
@ -23,16 +18,11 @@ jobs:
# GCC48: true
resource_class: large
steps:
- run:
name: Add i386 arch
command: sudo dpkg --add-architecture i386
- run:
name: Add STJr PPA
command: |
sudo apt-get -qq update
sudo apt-get -qq -y install dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0B1702D71499D9C25F986507F240F4449D3B0EC6
echo "deb http://ppa.launchpad.net/stjr/srb2/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qq install apt-utils
- run:
name: Make APT cache folder
command: mkdir -p /home/circleci/.cache/apt/archives/partial
@ -49,11 +39,8 @@ jobs:
keys:
- v1-SRB2-APT
- run:
name: Uninstall amd64 SDK
command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends remove libcurl4-openssl-dev:amd64
- run:
name: Install i386 SDK
command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client
name: Install SDK
command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends install git build-essential libpng-dev libsdl2-mixer-dev libgme-dev libcurl4-openssl-dev libopenmpt-dev libminiupnpc-dev gettext ccache wget gcc-multilib upx openssh-client
- run:
name: make md5sum
command: sudo find /home/circleci/.cache/apt/archives -type f -print0 | sort -z | sudo xargs -r0 md5sum > /home/circleci/.cache/apt_archives.md5
@ -62,28 +49,19 @@ jobs:
paths:
- /home/circleci/.cache/apt
- checkout
- run:
name: Compile without network support
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 -j4
- run:
name: wipe build
command: make -C src LINUX=1 cleandep
- run:
name: rebuild depend
command: make -C src LINUX=1 clean
- run:
name: make master depend file
command: find make/linux/SDL/deps/ -type f -print0 | sort -z | xargs -r0 cat > make/linux/SDL.deps
command: find make/linux64/SDL/deps/ -type f -print0 | sort -z | xargs -r0 cat > make/linux64/SDL.deps
- restore_cache:
keys:
- v1-SRB2-{{ .Branch }}-{{ checksum "make/linux/SDL.deps" }}
- v1-SRB2-{{ .Branch }}-{{ checksum "make/linux64/SDL.deps" }}
- run:
name: Compile
command: make -C src LINUX=1 ERRORMODE=1 -k -j4
command: make -C src LINUX64=1 ERRORMODE=1 -k -j4
- store_artifacts:
path: /home/circleci/SRB2/bin/
destination: bin
- save_cache:
key: v1-SRB2-{{ .Branch }}-{{ checksum "make/linux/SDL.deps" }}
key: v1-SRB2-{{ .Branch }}-{{ checksum "make/linux64/SDL.deps" }}
paths:
- /home/circleci/.ccache

View file

@ -447,49 +447,6 @@ Debian stable Clang:
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Debian stable musl:
stage: build
when: manual
allow_failure: true
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "musl"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-musl"
variables:
CC: musl-gcc
LDD: musl-ldd
script:
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
- - |
# apt_development
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
- apt-get install musl-tools
- |
# apt_development
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 SDL=0 NOHW=1 NOZLIB=1 NOCURL=1 NOGME=1 NOOPENMPT=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 SDL=0 NOHW=1 NOZLIB=1 NOCURL=1 NOGME=1 NOOPENMPT=1 NOUPNP=1
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Debian testing Clang:
extends: Debian stable Clang
@ -510,25 +467,6 @@ Debian testing Clang:
CFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype
LDFLAGS: -Wl,-fuse-ld=gold
Debian testing musl:
extends: Debian stable musl
when: manual
image: debian:testing-slim
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "testing-musl"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-musl"
variables:
CC: musl-gcc
LDD: musl-ldd
LDFLAGS: -Wl,-fuse-ld=gold
Alpine 3 GCC:
stage: build

View file

@ -55,6 +55,7 @@ endif
# (Valgrind is a memory debugger.)
ifdef VALGRIND
VALGRIND_PKGCONFIG?=valgrind
VALGRIND_LDFLAGS=
$(eval $(call Use_pkg_config,VALGRIND))
ZDEBUG=1
opts+=-DHAVE_VALGRIND

View file

@ -84,6 +84,9 @@ endif
WFLAGS+=-Wnested-externs
#WFLAGS+=-Wunreachable-code
WFLAGS+=-Winline
ifdef DEBUGMODE
WFLAGS+=-Wno-error=inline
endif
ifdef GCC43
WFLAGS+=-funit-at-a-time
WFLAGS+=-Wlogical-op

View file

@ -109,11 +109,19 @@ FILE *fopenfile(const char*, const char*);
// If you don't disable ALL debug first, you get ALL debug enabled
#if !defined (NDEBUG)
#ifndef PACKETDROP
#define PACKETDROP
#endif
#ifndef PARANOIA
#define PARANOIA
#endif
#ifndef RANGECHECK
#define RANGECHECK
#endif
#ifndef ZDEBUG
#define ZDEBUG
#endif
#endif
// Uncheck this to compile debugging code
//#define RANGECHECK

View file

@ -2753,7 +2753,7 @@ void M_ChangeMenuMusic(const char *defaultmusname, boolean defaultmuslooping)
void M_SetMenuCurBackground(const char *defaultname)
{
char name[9];
char name[9] = "";
strncpy(name, defaultname, 8);
name[8] = '\0';
M_IterateMenuTree(MIT_SetCurBackground, &name);

View file

@ -501,7 +501,7 @@ static void
Update_parameters (void)
{
#ifdef MASTERSERVER
int registered;
int registered = 0;
int delayed;
if (Online())