Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: added build pipelines #15

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
branches:
- master
pull_request:
branches:
- master

name: "Build"

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
- windows-2019
- macos-10.15
env:
ARCHIVE: 1

steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Compile"
run: make release

- name: "Upload artifacts"
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}
path: bspc*
62 changes: 56 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,55 @@
#
# bspc Makefile
#
# GNU Make required
#
COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' '[:lower:]' | sed -e 's/\//_/g')
COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')

ifeq ($(COMPILE_PLATFORM),sunos)
# Solaris uname and GNU uname differ
COMPILE_ARCH=$(shell uname -p | sed -e 's/i.86/x86/')
endif

#############################################################################
#
# If you require a different configuration from the defaults below, create a
# new file named "Makefile.local" in the same directory as this file and define
# your parameters there. This allows you to change configuration without
# causing problems with keeping up to date with the repository.
#
#############################################################################
-include Makefile.local

ifeq ($(COMPILE_PLATFORM),cygwin)
PLATFORM=mingw32
endif

ifndef PLATFORM
PLATFORM=$(COMPILE_PLATFORM)
endif

ifeq ($(PLATFORM),mingw32)
MINGW=1
endif
ifeq ($(PLATFORM),mingw64)
MINGW=1
endif


CC=gcc
CFLAGS=\
-Dstricmp=strcasecmp -DCom_Memcpy=memcpy -DCom_Memset=memset \
-DMAC_STATIC= -DQDECL= -DLINUX -DBSPC -D_FORTIFY_SOURCE=2 \
-DMAC_STATIC= -DQDECL= -DBSPC -D_FORTIFY_SOURCE=2 \
-fno-common \
-I. -Ideps -Wall
-I. -Ideps -Wall $(EXPAT_CFLAGS)

ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
CFLAGS += -DHAVE_GETRANDOM -DLINUX
endif
ifeq ($(PLATFORM),darwin)
CFLAGS += -DHAVE_ARC4RANDOM -DLINUX
endif

RELEASE_CFLAGS=-O3 -ffast-math
DEBUG_CFLAGS=-g -O0 -ffast-math
Expand Down Expand Up @@ -80,20 +126,24 @@ GAME_OBJS = \
#tetrahedron.o

EXEC = bspc
ifdef MINGW
BINEXT=.exe
endif


all: release

debug: CFLAGS += $(DEBUG_CFLAGS)
debug: $(EXEC)_g
debug: $(EXEC)_g$(BINEXT)

release: CFLAGS += $(RELEASE_CFLAGS)
release: $(EXEC)
release: $(EXEC)$(BINEXT)

$(EXEC): $(GAME_OBJS)
$(EXEC)$(BINEXT): $(GAME_OBJS)
$(CC) -o $@ $(GAME_OBJS) $(LDFLAGS)
strip $@

$(EXEC)_g: $(GAME_OBJS)
$(EXEC)_g$(BINEXT): $(GAME_OBJS)
$(CC) -o $@ $(GAME_OBJS) $(LDFLAGS)

#############################################################################
Expand Down
1 change: 1 addition & 0 deletions deps/botlib/l_script.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
typedef enum {qfalse, qtrue} qboolean;

#endif //SCREWUP
int COM_Compress( char *data_p );

#ifdef BOTLIB
//include files for usage in the bot library
Expand Down