diff --git a/doc/changelog.dox b/doc/changelog.dox index 08a788105..a1da4e627 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -132,6 +132,11 @@ See also: @ref Trade::TgaImporter "TgaImporter" now properly reports an error message when opening an empty file +@subsection changelog-latest-buildsystem Build system + +- ES 2.0 and ES 3.0 subset of tests requiring GL context is now run on Travis + CI using SwiftShader for better code coverage + @subsection changelog-latest-bugfixes Bug fixes - Fixed compilation of the @ref Vk library on 32-bit Windows diff --git a/package/ci/travis-desktop-gles.sh b/package/ci/travis-desktop-gles.sh index 7cafc6538..114cb2044 100755 --- a/package/ci/travis-desktop-gles.sh +++ b/package/ci/travis-desktop-gles.sh @@ -20,9 +20,12 @@ cmake .. \ -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ -DCMAKE_PREFIX_PATH="$HOME/deps" \ -DCMAKE_BUILD_TYPE=Debug \ + -DEGL_LIBRARY=$HOME/swiftshader/libEGL.so \ + -DOPENGLES2_LIBRARY=$HOME/swiftshader/libGLESv2.so \ + -DOPENGLES3_LIBRARY=$HOME/swiftshader/libGLESv2.so \ + -DCMAKE_INSTALL_RPATH=$HOME/swiftshader \ -DTARGET_GLES=ON \ -DTARGET_GLES2=$TARGET_GLES2 \ - -DTARGET_DESKTOP_GLES=ON \ -DWITH_AUDIO=ON \ -DWITH_SHAPES=ON \ -DWITH_VK=OFF \ @@ -51,4 +54,7 @@ cmake .. \ -G Ninja # Otherwise the job gets killed (probably because using too much memory) ninja -j4 -CORRADE_TEST_COLOR=ON ctest -V -E GLTest +CORRADE_TEST_COLOR=ON ctest -V +if [ "$TARGET_GLES2" == "ON" ]; then CORRADE_TEST_COLOR=ON MAGNUM_DISABLE_EXTENSIONS="OES_vertex_array_object" ctest -V -R GLTest; fi +src/Magnum/Audio/magnum-al-info > /dev/null +src/Magnum/Platform/magnum-gl-info > /dev/null diff --git a/package/ci/travis.yml b/package/ci/travis.yml index 234323cee..33aeddc1b 100644 --- a/package/ci/travis.yml +++ b/package/ci/travis.yml @@ -174,6 +174,7 @@ notifications: cache: directories: - $HOME/sdl2 + - $HOME/swiftshader - $HOME/cmake install: @@ -182,7 +183,8 @@ install: - if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop" ] && [ "$BUILD_DEPRECATED" == "ON" ]; then export WITH_GLUTAPPLICATION=ON; fi - if [ "$WITH_GLUTAPPLICATION" != "ON" ]; then export WITH_GLUTAPPLICATION=OFF; fi -- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export PLATFORM_GL_API=GLX; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop" ]; then export PLATFORM_GL_API=GLX; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then export PLATFORM_GL_API=EGL; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then wget -nc https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && unzip -q android-*.zip; fi # Download CMake 3.1.3 to ensure we're still compatible with it (Travis has # 3.9 since December 2017). Also, the PATH setting can't be cached, so it's @@ -206,6 +208,10 @@ install: # GLFW (cached) - if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install glfw; fi +# SwiftShader on Linux (cached). Taken from Chromium snapshot 587878 +# (swiftshader-bin Arch package). +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ] && [ ! -e "$HOME/swiftshader/libEGL.so" ]; then cd $HOME ; wget https://ci.magnum.graphics/swiftshader-chromium-587878.tar.gz && mkdir -p swiftshader && cd swiftshader && tar -xzf ../swiftshader-chromium-587878.tar.gz && cd $TRAVIS_BUILD_DIR ; 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