update CI scripts

This commit is contained in:
BlackMATov
2020-02-06 17:24:11 +07:00
parent 30674e7740
commit f933d7b4f3
15 changed files with 230 additions and 59 deletions

View File

@@ -1,11 +1,53 @@
version: "{build}"
environment:
global:
E2D_WITHOUT_AUDIO: true
E2D_WITHOUT_GRAPHICS: true
image:
- Visual Studio 2017
- Visual Studio 2019 Preview
- Visual Studio 2019
platform:
- Win32
- x86
- x64
build_script:
configuration:
- Debug
- Release
for:
-
matrix:
only:
- platform: x86
configuration: Debug
build_script:
- scripts\build_debug_x86.bat
-
matrix:
only:
- platform: x64
configuration: Debug
build_script:
- scripts\build_debug_x64.bat
-
matrix:
only:
- platform: x86
configuration: Release
build_script:
- scripts\build_release_x86.bat
-
matrix:
only:
- platform: x64
configuration: Release
build_script:
- scripts\build_release_x64.bat
before_build:
- git submodule update --init --recursive
- scripts\build_all.bat
test: off

View File

@@ -1,49 +1,138 @@
language: cpp
env:
global:
- E2D_WITHOUT_AUDIO=true
- E2D_WITHOUT_GRAPHICS=true
matrix:
include:
#
# linux (g++-7)
#
- os: linux
dist: trusty
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-7"] } }
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
dist: xenial
stage: linux
name: debug, g++-7
addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["libx11-dev", "libgl1-mesa-dev", "xorg-dev", "g++-7"] } }
env: CC=gcc-7 CXX=g++-7
script: ./scripts/build_debug.sh
- os: linux
dist: trusty
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-8"] } }
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
dist: xenial
stage: linux
name: release, g++-7
addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["libx11-dev", "libgl1-mesa-dev", "xorg-dev", "g++-7"] } }
env: CC=gcc-7 CXX=g++-7
script: ./scripts/build_release.sh
#
# linux (g++-8)
#
- os: linux
dist: trusty
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"], packages: ["xorg-dev", "clang-5.0", "g++-7"] } }
env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
dist: xenial
stage: linux
name: debug, g++-8
addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["libx11-dev", "libgl1-mesa-dev", "xorg-dev", "g++-8"] } }
env: CC=gcc-8 CXX=g++-8
script: ./scripts/build_debug.sh
- os: linux
dist: trusty
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-6.0"], packages: ["xorg-dev", "clang-6.0", "g++-7"] } }
env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
dist: xenial
stage: linux
name: release, g++-8
addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["libx11-dev", "libgl1-mesa-dev", "xorg-dev", "g++-8"] } }
env: CC=gcc-8 CXX=g++-8
script: ./scripts/build_release.sh
#
# linux (clang++-5.0)
#
- os: linux
dist: trusty
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-7"], packages: ["xorg-dev", "clang-7", "g++-7"] } }
env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"
dist: xenial
stage: linux
name: debug, clang++-5.0
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-xenial-5.0"], packages: ["libx11-dev", "libgl1-mesa-dev", "xorg-dev", "g++-7", "clang-5.0"] } }
env: CC=clang-5.0 CXX=clang++-5.0
script: ./scripts/build_debug.sh
- os: linux
dist: trusty
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-8"], packages: ["xorg-dev", "clang-8", "g++-7"] } }
env: MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
dist: xenial
stage: linux
name: release, clang++-5.0
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-xenial-5.0"], packages: ["libx11-dev", "libgl1-mesa-dev", "xorg-dev", "g++-7", "clang-5.0"] } }
env: CC=clang-5.0 CXX=clang++-5.0
script: ./scripts/build_release.sh
#
# linux (clang++-6.0)
#
- os: linux
dist: xenial
stage: linux
name: debug, clang++-6.0
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-xenial-6.0"], packages: ["libx11-dev", "libgl1-mesa-dev", "xorg-dev", "g++-7", "clang-6.0"] } }
env: CC=clang-6.0 CXX=clang++-6.0
script: ./scripts/build_debug.sh
- os: linux
dist: xenial
stage: linux
name: release, clang++-6.0
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-xenial-6.0"], packages: ["libx11-dev", "libgl1-mesa-dev", "xorg-dev", "g++-7", "clang-6.0"] } }
env: CC=clang-6.0 CXX=clang++-6.0
script: ./scripts/build_release.sh
#
# macosx (xcode10)
#
- os: osx
osx_image: xcode10
compiler: clang
stage: macosx
name: debug, xcode10
addons: { homebrew: { packages: ["git-lfs"] } }
script: ./scripts/build_debug.sh
- os: osx
osx_image: xcode10
stage: macosx
name: release, xcode10
addons: { homebrew: { packages: ["git-lfs"] } }
script: ./scripts/build_release.sh
#
# macosx (xcode11)
#
- os: osx
osx_image: xcode11
stage: macosx
name: debug, xcode11
addons: { homebrew: { packages: ["git-lfs"] } }
script: ./scripts/build_debug.sh
- os: osx
osx_image: xcode11
stage: macosx
name: release, xcode11
addons: { homebrew: { packages: ["git-lfs"] } }
script: ./scripts/build_release.sh
before_install:
- eval "${MATRIX_EVAL}"
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then
brew update;
brew upgrade cmake;
brew install git-lfs;
fi
- if [ "$TRAVIS_OS_NAME" == 'linux' ]; then
mkdir $HOME/cmake;
export PATH="$HOME/cmake/bin:$PATH";
travis_retry wget -q https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.sh;
sh cmake-3.11.4-Linux-x86_64.sh --prefix=$HOME/cmake --exclude-subdir --skip-license;
fi
script:
before_script:
- git submodule update --init --recursive
- git lfs install
- git lfs pull
- git submodule foreach git lfs pull
- ./scripts/build_all.sh

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com)
Copyright (C) 2018-2020, by Matvey Cherevko (blackmatov@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,7 +1,9 @@
@echo off
set SCRIPT_DIR=%~dp0%
call %SCRIPT_DIR%\build_debug.bat || goto :error
call %SCRIPT_DIR%\build_release.bat || goto :error
call %SCRIPT_DIR%\build_debug_x86.bat || goto :error
call %SCRIPT_DIR%\build_debug_x64.bat || goto :error
call %SCRIPT_DIR%\build_release_x86.bat || goto :error
call %SCRIPT_DIR%\build_release_x64.bat || goto :error
goto :EOF

View File

@@ -1,8 +1,8 @@
#!/bin/bash
set -e
BUILD_DIR=`dirname "$BASH_SOURCE"`/../build
mkdir -p $BUILD_DIR/debug
cd $BUILD_DIR/debug
mkdir -p $BUILD_DIR/Debug
pushd $BUILD_DIR/Debug
cmake -DCMAKE_BUILD_TYPE=Debug ../..
cmake --build . -- -j8
cd ../..
cmake --build .
popd

View File

@@ -1,10 +1,10 @@
@echo off
set BUILD_DIR=%~dp0%\..\build
mkdir %BUILD_DIR%\debug || goto :error
cd %BUILD_DIR%\debug || goto :error
cmake ../.. || goto :error
mkdir %BUILD_DIR%\Debug\x64 || goto :error
pushd %BUILD_DIR%\Debug\x64 || goto :error
cmake ..\..\.. -A x64 || goto :error
cmake --build . --config Debug || goto :error
cd ..\.. || goto :error
popd || goto :error
goto :EOF

View File

@@ -0,0 +1,13 @@
@echo off
set BUILD_DIR=%~dp0%\..\build
mkdir %BUILD_DIR%\Debug\x86 || goto :error
pushd %BUILD_DIR%\Debug\x86 || goto :error
cmake ..\..\.. -A Win32 || goto :error
cmake --build . --config Debug || goto :error
popd || goto :error
goto :EOF
:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%

View File

@@ -1,8 +1,8 @@
#!/bin/bash
set -e
BUILD_DIR=`dirname "$BASH_SOURCE"`/../build
mkdir -p $BUILD_DIR/release
cd $BUILD_DIR/release
mkdir -p $BUILD_DIR/Release
pushd $BUILD_DIR/Release
cmake -DCMAKE_BUILD_TYPE=Release ../..
cmake --build . -- -j8
cd ../..
cmake --build .
popd

View File

@@ -1,10 +1,10 @@
@echo off
set BUILD_DIR=%~dp0%\..\build
mkdir %BUILD_DIR%\release || goto :error
cd %BUILD_DIR%\release || goto :error
cmake ../.. || goto :error
mkdir %BUILD_DIR%\Release\x64 || goto :error
pushd %BUILD_DIR%\Release\x64 || goto :error
cmake ..\..\.. -A x64 || goto :error
cmake --build . --config Release || goto :error
cd ..\.. || goto :error
popd || goto :error
goto :EOF

View File

@@ -0,0 +1,13 @@
@echo off
set BUILD_DIR=%~dp0%\..\build
mkdir %BUILD_DIR%\Release\x86 || goto :error
pushd %BUILD_DIR%\Release\x86 || goto :error
cmake ..\..\.. -A Win32 || goto :error
cmake --build . --config Release || goto :error
popd || goto :error
goto :EOF
:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%

View File

@@ -1,9 +1,10 @@
@echo off
set BUILD_DIR=%~dp0%\..\build
mkdir %BUILD_DIR%\msvc2017 || goto :error
cd %BUILD_DIR%\msvc2017 || goto :error
pushd %BUILD_DIR%\msvc2017 || goto :error
cmake -G "Visual Studio 15 2017" ..\.. || goto :error
start enduro2d-bootstrap.sln || goto :error
popd || goto :error
goto :EOF

View File

@@ -0,0 +1,13 @@
@echo off
set BUILD_DIR=%~dp0%\..\build
mkdir %BUILD_DIR%\msvc2019 || goto :error
pushd %BUILD_DIR%\msvc2019 || goto :error
cmake -G "Visual Studio 16 2019" ..\.. || goto :error
start enduro2d-bootstrap.sln || goto :error
popd || goto :error
goto :EOF
:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%

View File

@@ -2,6 +2,7 @@
set -e
BUILD_DIR=`dirname "$BASH_SOURCE"`/../build
mkdir -p $BUILD_DIR/xcode
cd $BUILD_DIR/xcode
pushd $BUILD_DIR/xcode
cmake -G Xcode ../..
open enduro2d-bootstrap.xcodeproj
popd

View File

@@ -1,3 +0,0 @@
#!/bin/bash
git submodule update --init --recursive
git submodule update --remote

View File

@@ -1,7 +1,7 @@
/*******************************************************************************
* This file is part of the "Enduro2D"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018-2019 Matvey Cherevko
* Copyright (C) 2018-2020, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <enduro2d/enduro2d.hpp>