Browse Source

package/ci: build minimal Vulkan support on Linux and Windows.

Disabling everything that doesn't depend on Vulkan as it's not needed to
be built again -- that's basically everything right now. This needs to
be a separate build for the foreseeable future, because it requires a
newer CMake version for the Find module and it'll probably also require
newer C++ standard.

Thanks to @LB-- for providing me with an oneliner to compile a file with
cl.exe.
pull/280/head
Vladimír Vondruš 8 years ago
parent
commit
d578d4d89e
  1. 3
      CREDITS.md
  2. 66
      package/ci/appveyor-desktop-vulkan.bat
  3. 8
      package/ci/appveyor.yml
  4. 27
      package/ci/travis-desktop-vulkan.sh
  5. 6
      package/ci/travis.yml

3
CREDITS.md

@ -62,7 +62,8 @@ Listing only people with code contributions, because otherwise there's too many
initial macOS port, various other improvements
- Nathan Ollerenshaw ([@matjam](https://github.com/matjam)) --- Ubuntu
packages in a PPA repository
- Nicholas "LB" Branden ([@LB--](https://github.com/LB--)) -- warning fixes
- Nicholas "LB" Branden ([@LB--](https://github.com/LB--)) -- warning fixes,
Windows buildsystem improvements
- Olga Turanksaya ([@olga-python](https://github.com/olga-python)) -- Gentoo
ebuild
- Sam Spilsbury ([@smspillaz](https://github.com/smspillaz)) -- WebGL and

66
package/ci/appveyor-desktop-vulkan.bat

@ -0,0 +1,66 @@
if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvarsall.bat" x64 || exit /b
if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" call "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat" x64 || exit /b
set PATH=%APPVEYOR_BUILD_FOLDER%/openal/bin/Win64;%APPVEYOR_BUILD_FOLDER%\deps\bin;%PATH%
rem Build Corrade
git clone --depth 1 git://github.com/mosra/corrade.git || exit /b
cd corrade || exit /b
mkdir build && cd build || exit /b
cmake .. ^
-DCMAKE_BUILD_TYPE=Debug ^
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^
-DWITH_INTERCONNECT=OFF ^
-DUTILITY_USE_ANSI_COLORS=ON ^
-G Ninja || exit /b
cmake --build . || exit /b
cmake --build . --target install || exit /b
cd .. && cd ..
rem Build the fastest Vulkan driver ever. See appveyor.yml for why Vulkan is
rem a separate build for now.
cl.exe /c package/ci/libvulkan.cpp || exit /b
lib.exe /OUT:%APPVEYOR_BUILD_FOLDER%/deps/lib/libvulkan.lib libvulkan.obj || exit /b
rem Enabling only stuff that's directly affected by Vulkan, disabling
rem everything else.
mkdir build && cd build || exit /b
cmake .. ^
-DCMAKE_BUILD_TYPE=Debug ^
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^
-DVulkan_LIBRARY=%APPVEYOR_BUILD_FOLDER%/deps/lib/libvulkan.lib ^
-DWITH_AUDIO=OFF ^
-DWITH_DEBUGTOOLS=OFF ^
-DWITH_GL=OFF ^
-DWITH_MESHTOOLS=OFF ^
-DWITH_PRIMITIVES=OFF ^
-DWITH_SCENEGRAPH=OFF ^
-DWITH_SHADERS=OFF ^
-DWITH_SHAPES=OFF ^
-DWITH_TEXT=OFF ^
-DWITH_TEXTURETOOLS=OFF ^
-DWITH_TRADE=OFF ^
-DWITH_VK=ON ^
-DWITH_ANYAUDIOIMPORTER=OFF ^
-DWITH_ANYIMAGECONVERTER=OFF ^
-DWITH_ANYIMAGEIMPORTER=OFF ^
-DWITH_ANYSCENEIMPORTER=OFF ^
-DWITH_MAGNUMFONT=OFF ^
-DWITH_MAGNUMFONTCONVERTER=OFF ^
-DWITH_OBJIMPORTER=OFF ^
-DWITH_TGAIMAGECONVERTER=OFF ^
-DWITH_TGAIMPORTER=OFF ^
-DWITH_WAVAUDIOIMPORTER=OFF ^
-DWITH_DISTANCEFIELDCONVERTER=OFF ^
-DWITH_FONTCONVERTER=OFF ^
-DWITH_IMAGECONVERTER=OFF ^
-DWITH_GL_INFO=OFF ^
-DWITH_AL_INFO=OFF ^
-DBUILD_TESTS=ON ^
-DBUILD_GL_TESTS=OFF ^
-G Ninja || exit /b
cmake --build . || exit /b
cmake --build . --target install || exit /b
rem Test
set CORRADE_TEST_COLOR=ON
ctest -V -E GLTest || exit /b

8
package/ci/appveyor.yml

@ -12,6 +12,10 @@ environment:
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
APPVEYOR_JOB_NAME: windows-gl-msvc2017
- TARGET: desktop-vulkan
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
APPVEYOR_JOB_NAME: windows-vulkan-msvc2017
- TARGET: desktop
COMPILER: mingw
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
@ -83,6 +87,10 @@ build_script:
- IF "%TARGET%" == "desktop" IF "%COMPILER%" == "msvc" call package\ci\appveyor-desktop.bat
- IF "%TARGET%" == "desktop" IF "%COMPILER%" == "mingw" call package\ci\appveyor-desktop-mingw.bat
- IF "%TARGET%" == "desktop-gles" call package\ci\appveyor-desktop-gles.bat
# Vulkan needs to be in a separate build, because in the future it'll need
# C++14 and building it together with C++11 code would harm verifiability of
# C++11 compatibility.
- IF "%TARGET%" == "desktop-vulkan" call package\ci\appveyor-desktop-vulkan.bat
- IF "%TARGET%" == "rt" call package\ci\appveyor-rt.bat
cache:

27
package/ci/travis-desktop-vulkan.sh

@ -17,6 +17,12 @@ cmake .. \
ninja install
cd ../..
# The fastest Vulkan driver ever. See travis.yml for why we have a separate
# Vulkan build.
g++ package/ci/libvulkan.cpp -std=c++11 -shared -o $HOME/libvulkan.so
# Enabling only stuff that's directly affected by Vulkan, disabling everything
# else.
mkdir build && cd build
# Not using CXXFLAGS in order to avoid affecting dependencies
cmake .. \
@ -29,17 +35,30 @@ cmake .. \
-DWITH_GL=OFF \
-DWITH_MESHTOOLS=OFF \
-DWITH_PRIMITIVES=OFF \
-DWITH_SCENEGRAPH=ON \
-DWITH_SCENEGRAPH=OFF \
-DWITH_SHADERS=OFF \
-DWITH_SHAPES=ON \
-DWITH_SHAPES=OFF \
-DWITH_TEXT=OFF \
-DWITH_TEXTURETOOLS=OFF \
-DWITH_TRADE=OFF \
-DWITH_VK=ON \
-DWITH_AL_INFO=OFF \
-DWITH_VK_INFO=ON \
-DWITH_GL_INFO=OFF \
-DWITH_ANYAUDIOIMPORTER=OFF \
-DWITH_ANYIMAGECONVERTER=OFF \
-DWITH_ANYIMAGEIMPORTER=OFF \
-DWITH_ANYSCENEIMPORTER=OFF \
-DWITH_MAGNUMFONT=OFF \
-DWITH_MAGNUMFONTCONVERTER=OFF \
-DWITH_OBJIMPORTER=OFF \
-DWITH_TGAIMAGECONVERTER=OFF \
-DWITH_TGAIMPORTER=OFF \
-DWITH_WAVAUDIOIMPORTER=OFF \
-DWITH_DISTANCEFIELDCONVERTER=OFF \
-DWITH_FONTCONVERTER=OFF \
-DWITH_IMAGECONVERTER=OFF \
-DBUILD_TESTS=ON \
-DBUILD_VK_TESTS=ON \
-DBUILD_GL_TESTS=OFF \
-DBUILD_DEPRECATED=$BUILD_DEPRECATED \
-G Ninja
# Otherwise the job gets killed (probably because using too much memory)

6
package/ci/travis.yml

@ -216,11 +216,11 @@ install:
# supporting that. Latest GLFW is tested on macOS.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ) && [ ! -e "$HOME/glfw/include" ]; then wget https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip && unzip glfw-3.1.2.zip && cd glfw-3.1.2 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/glfw -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DBUILD_SHARED_LIBS=ON && cmake --build . --target install && cd ../..; fi
# Vulkan (eheh)
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-vulkan" ]; then g++ package/ci/libvulkan.cpp -std=c++11 -shared -o $HOME/libvulkan.so; fi
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then ./package/ci/travis-desktop.sh; fi
# Vulkan needs to be in a separate build, because it needs new CMake (for the
# Find module) and in the future also C++14. Unfortunately that means we can't
# apply the sanitizer or non-deprecated build on it.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-vulkan" ]; then ./package/ci/travis-desktop-vulkan.sh; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then ./package/ci/travis-desktop-gles.sh; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then ./package/ci/travis-android-arm.sh; fi

Loading…
Cancel
Save