Fleshed out CI builds
- Extended Bootstrap.mak to allow users to specify platform and configuration
This commit is contained in:
parent
2ac3153f81
commit
d995f687ef
33
.travis.yml
33
.travis.yml
@ -1,9 +1,30 @@
|
|||||||
os:
|
language: c++
|
||||||
- linux
|
dist: trusty
|
||||||
- osx
|
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:
|
script:
|
||||||
- make -f Bootstrap.mak $TRAVIS_OS_NAME
|
- make -f Bootstrap.mak $TRAVIS_OS_NAME CONFIG=${CONFIGURATION}
|
||||||
- make -C build/bootstrap -j config=debug
|
- bin/${CONFIGURATION}/premake5 test
|
||||||
- bin/release/premake5 test
|
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
MSDEV = vs2012
|
MSDEV = vs2012
|
||||||
|
CONFIG = release
|
||||||
|
PLATFORM = x86
|
||||||
LUA_DIR = contrib/lua/src
|
LUA_DIR = contrib/lua/src
|
||||||
LUASHIM_DIR = contrib/luashim
|
LUASHIM_DIR = contrib/luashim
|
||||||
|
|
||||||
@ -36,8 +38,8 @@ SRC = src/host/*.c \
|
|||||||
$(LUA_DIR)/lvm.c \
|
$(LUA_DIR)/lvm.c \
|
||||||
$(LUA_DIR)/lzio.c \
|
$(LUA_DIR)/lzio.c \
|
||||||
|
|
||||||
PLATFORM= none
|
HOST_PLATFORM= none
|
||||||
default: $(PLATFORM)
|
default: $(HOST_PLATFORM)
|
||||||
|
|
||||||
none:
|
none:
|
||||||
@echo "Please do"
|
@echo "Please do"
|
||||||
@ -57,7 +59,7 @@ mingw: $(SRC)
|
|||||||
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lole32
|
$(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 embed
|
||||||
./build/bootstrap/premake_bootstrap --os=windows --to=build/bootstrap gmake
|
./build/bootstrap/premake_bootstrap --os=windows --to=build/bootstrap gmake
|
||||||
$(MAKE) -C build/bootstrap
|
$(MAKE) -C build/bootstrap config=$(CONFIG)_$(PLATFORM)
|
||||||
|
|
||||||
osx: $(SRC)
|
osx: $(SRC)
|
||||||
$(SILENT) rm -rf ./bin
|
$(SILENT) rm -rf ./bin
|
||||||
@ -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 $?
|
$(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 embed
|
||||||
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
|
./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)
|
linux: $(SRC)
|
||||||
$(SILENT) rm -rf ./bin
|
$(SILENT) rm -rf ./bin
|
||||||
@ -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
|
$(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 embed
|
||||||
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
|
./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)
|
bsd: $(SRC)
|
||||||
$(SILENT) rm -rf ./bin
|
$(SILENT) rm -rf ./bin
|
||||||
@ -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
|
$(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 embed
|
||||||
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
|
./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)
|
windows-base: $(SRC)
|
||||||
$(SILENT) if exist .\bin rmdir /s /q .\bin
|
$(SILENT) if exist .\bin rmdir /s /q .\bin
|
||||||
@ -100,7 +102,7 @@ windows-base: $(SRC)
|
|||||||
|
|
||||||
windows: windows-base
|
windows: windows-base
|
||||||
devenv .\build\bootstrap\Premake5.sln /Upgrade
|
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
|
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
|
||||||
|
@ -2,13 +2,18 @@ os: Visual Studio 2015
|
|||||||
|
|
||||||
platform:
|
platform:
|
||||||
- Win32
|
- Win32
|
||||||
|
- x64
|
||||||
|
|
||||||
|
configuration:
|
||||||
|
- Debug
|
||||||
|
- Release
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
- cmd: git clean -ffxd
|
- cmd: git clean -ffxd
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmd: call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
- 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:
|
test_script:
|
||||||
- cmd: bin\release\premake5 test
|
- cmd: bin\%CONFIGURATION%\premake5 test
|
||||||
|
Reference in New Issue
Block a user