Skip to content

Commit

Permalink
Fleshed out CI builds
Browse files Browse the repository at this point in the history
- Extended Bootstrap.mak to allow users to specify platform and configuration
  • Loading branch information
samsinsane committed Apr 9, 2018
1 parent 2ac3153 commit d995f68
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 16 deletions.
33 changes: 27 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
os:
- linux
- osx
language: c++
dist: trusty
sudo: false
matrix:
include:
# Linux Debug
- os: linux
compiler: gcc
env:
- CONFIGURATION=debug
# Linux Release
- os: linux
compiler: gcc
env:
- CONFIGURATION=release
# macOS Debug x86
- os: osx
osx_image: xcode9
env:
- CONFIGURATION=debug
# macOS Release x86
- os: osx
osx_image: xcode9
env:
- CONFIGURATION=release

script:
- make -f Bootstrap.mak $TRAVIS_OS_NAME
- make -C build/bootstrap -j config=debug
- bin/release/premake5 test
- make -f Bootstrap.mak $TRAVIS_OS_NAME CONFIG=${CONFIGURATION}
- bin/${CONFIGURATION}/premake5 test

18 changes: 10 additions & 8 deletions Bootstrap.mak
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
MSDEV = vs2012
CONFIG = release
PLATFORM = x86
LUA_DIR = contrib/lua/src
LUASHIM_DIR = contrib/luashim

Expand Down Expand Up @@ -36,8 +38,8 @@ SRC = src/host/*.c \
$(LUA_DIR)/lvm.c \
$(LUA_DIR)/lzio.c \

PLATFORM= none
default: $(PLATFORM)
HOST_PLATFORM= none
default: $(HOST_PLATFORM)

none:
@echo "Please do"
Expand All @@ -57,7 +59,7 @@ mingw: $(SRC)
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lole32
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --os=windows --to=build/bootstrap gmake
$(MAKE) -C build/bootstrap
$(MAKE) -C build/bootstrap config=$(CONFIG)_$(PLATFORM)

osx: $(SRC)
$(SILENT) rm -rf ./bin
Expand All @@ -67,7 +69,7 @@ osx: $(SRC)
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_MACOSX -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" -framework CoreServices -framework Foundation -framework Security -lreadline $?
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)

linux: $(SRC)
$(SILENT) rm -rf ./bin
Expand All @@ -77,7 +79,7 @@ linux: $(SRC)
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lm -ldl -lrt
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)

bsd: $(SRC)
$(SILENT) rm -rf ./bin
Expand All @@ -87,7 +89,7 @@ bsd: $(SRC)
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lm
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)

windows-base: $(SRC)
$(SILENT) if exist .\bin rmdir /s /q .\bin
Expand All @@ -100,7 +102,7 @@ windows-base: $(SRC)

windows: windows-base
devenv .\build\bootstrap\Premake5.sln /Upgrade
devenv .\build\bootstrap\Premake5.sln /Build Release
devenv .\build\bootstrap\Premake5.sln /Build "$(CONFIG)|$(PLATFORM:x86=win32)"

windows-msbuild: windows-base
msbuild /p:Configuration=Release /p:Platform=Win32 .\build\bootstrap\Premake5.sln
msbuild /p:Configuration=$(CONFIG) /p:Platform=$(PLATFORM:x86=win32) .\build\bootstrap\Premake5.sln
9 changes: 7 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ os: Visual Studio 2015

platform:
- Win32
- x64

configuration:
- Debug
- Release

before_build:
- cmd: git clean -ffxd

build_script:
- cmd: call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
- cmd: nmake -f Bootstrap.mak MSDEV=vs2015 windows
- cmd: nmake -f Bootstrap.mak MSDEV=vs2015 windows PLATFORM=%PLATFORM% CONFIG=%CONFIGURATION%

test_script:
- cmd: bin\release\premake5 test
- cmd: bin\%CONFIGURATION%\premake5 test

0 comments on commit d995f68

Please sign in to comment.