From de786e5cab4c6c82c966bdb0d30fb4a6edda1648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 25 Nov 2020 15:51:04 +0100 Subject: [PATCH] package/ci: migrate Linux and Emscripten builds to CircleCI. --- .circleci/config.yml | 1 + package/archlinux/PKGBUILD-coverage | 3 +- package/ci/circleci.yml | 329 ++++++++++++++++++ .../{travis-emscripten.sh => emscripten.sh} | 5 +- package/ci/travis.yml | 262 +++++++------- ...s-desktop-gles.sh => unix-desktop-gles.sh} | 3 +- ...sktop-vulkan.sh => unix-desktop-vulkan.sh} | 3 +- .../ci/{travis-desktop.sh => unix-desktop.sh} | 29 +- 8 files changed, 480 insertions(+), 155 deletions(-) create mode 120000 .circleci/config.yml create mode 100644 package/ci/circleci.yml rename package/ci/{travis-emscripten.sh => emscripten.sh} (90%) rename package/ci/{travis-desktop-gles.sh => unix-desktop-gles.sh} (96%) rename package/ci/{travis-desktop-vulkan.sh => unix-desktop-vulkan.sh} (96%) rename package/ci/{travis-desktop.sh => unix-desktop.sh} (75%) diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 120000 index 000000000..2aac66eaa --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1 @@ +../package/ci/circleci.yml \ No newline at end of file diff --git a/package/archlinux/PKGBUILD-coverage b/package/archlinux/PKGBUILD-coverage index 761130657..3b2518090 100644 --- a/package/archlinux/PKGBUILD-coverage +++ b/package/archlinux/PKGBUILD-coverage @@ -74,7 +74,8 @@ check() { rm -rf coverage mkdir coverage - # Keep in sync with package/ci/appveyor-lcov.sh and travis.yml, please + # Keep in sync with package/ci/appveyor-lcov.sh, circleci.yml travis.yml, + # please lcov --directory . --capture --output-file coverage.info lcov --extract coverage.info "*/src/Magnum*/*" --output-file coverage.info > /dev/null lcov --remove coverage.info "*/src/MagnumExternal/*" --output-file coverage.info > /dev/null diff --git a/package/ci/circleci.yml b/package/ci/circleci.yml new file mode 100644 index 000000000..f0ccaecef --- /dev/null +++ b/package/ci/circleci.yml @@ -0,0 +1,329 @@ +version: 2.1 + +orbs: + codecov: codecov/codecov@1.1.1 + +notify: + webhooks: + # Unfortunately Gitter messages are too verbose (one five-line message per + # each job in the build matrix) and thus not wanted + #- url: https://webhooks.gitter.im/e/cfbadbd34d28708a57c6 + +executors: + ubuntu-16_04: + docker: + - image: ubuntu:xenial-20201014 + emscripten: + docker: + # 1.39.0 is the oldest on Docker. Anything before 1.39.2 is useless as emar + # randomly asserts: https://github.com/emscripten-core/emscripten/pull/9742 + # Then, anything before 1.39.6 is useless as well because emar has a + # filesystem race and randomly complains that a file doesn't exist: + # https://github.com/mosra/magnum/issues/413, + # https://github.com/emscripten-core/emscripten/pull/10161 + - image: emscripten/emsdk:1.39.6-upstream + +commands: + install-base: + parameters: + extra: + type: string + default: "" + steps: + - run: + name: Update apt and install base packages + # Git is needed always for cloning Corrade + command: | + apt update + if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then export LCOV_PACKAGES="lcov curl"; fi + apt install -y git ninja-build $LCOV_PACKAGES << parameters.extra >> + + install-gcc-4_8: + steps: + - run: + name: Install GCC 4.8 + # For some reason, CMake needs a working C compiler, so provice CC as + # well for the case when default gcc isn't installed. + command: | + apt install -y g++-4.8 + echo 'export CC=gcc-4.8' >> $BASH_ENV + echo 'export CXX=g++-4.8' >> $BASH_ENV + + install-clang-3_8: + steps: + - run: + name: Install Clang 3.8 + # https://askubuntu.com/questions/787383/how-to-install-llvm-3-9 + # because the `deb` commands from https://apt.llvm.org don't work + # + # The software-properties-common need to be installed in order to have + # apt-add-repository. Sigh, adding a repository should be a core + # feature ffs! + # + # The apt-transport-https needs to be installed because + # E: The method driver /usr/lib/apt/methods/https could not be found. + # N: Is the package apt-transport-https installed? + # + # For some reason, CMake needs a working C compiler, so provice CC as + # well for the case when default gcc isn't installed. + # + # The llvm-symbolizer link needs to be set in order to have usable + # symbols in the output. This affects suppressions as well, meaning + # they won't work if the symbols are not resolvable. It's not enough to + # just `export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.8` + # because it then complains that + # + # External symbolizer path is set to '/usr/bin/llvm-symbolizer-3.8' + # which isn't a known symbolizer. Please set the path to the + # llvm-symbolizer binary or other known tool. + # + # Probably because because it detects tool type based on the filename? + # Ugh. + command: | + apt install -y software-properties-common apt-transport-https wget + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - + apt-add-repository "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main" + apt update + apt install -y clang-3.8 + echo 'export CC=clang-3.8' >> $BASH_ENV + echo 'export CXX=clang++-3.8' >> $BASH_ENV + ln -s /usr/bin/llvm-symbolizer{-3.8,} + + install-cmake-3_4: + steps: + - run: + name: Install CMake 3.4 + command: | + apt install -y wget + mkdir -p $HOME/cmake && cd $HOME/cmake + wget -nc --no-check-certificate https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz + tar --strip-components=1 -xzf cmake-3.4.3-Linux-x86_64.tar.gz + echo 'export PATH=$HOME/cmake/bin:$PATH' >> $BASH_ENV + source $BASH_ENV && cmake --version | grep 3.4 + + install-swiftshader-gles: + steps: + - run: + name: Install SwiftShader GLES + # Zip from https://github.com/mosra/magnum-ci/tree/swiftshader and + # self-hosted because GH Actions would make it too simple for people if + # you could just download the artifacts directly, right? RIGHT? + command: | + apt install -y wget unzip + mkdir -p $HOME/swiftshader && cd $HOME/swiftshader + wget https://ci.magnum.graphics/swiftshader-gles-r5464.a6940c8e6e-ubuntu-16.04.zip + unzip swiftshader-gles-r5464.a6940c8e6e-ubuntu-16.04.zip + + setup-null-openal-driver: + steps: + - run: + name: Set up a null OpenAL driver + command: printf "[General]\ndrivers=null" > ~/.alsoftrc + + build: + parameters: + script: + type: string + steps: + - checkout + - run: + name: Build & test + command: | + if [ "$BUILD_STATIC" != "ON" ]; then export BUILD_STATIC=OFF; fi + if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi + if [ "$BUILD_APPLICATIONS" != "OFF" ]; then export BUILD_APPLICATIONS=ON; fi + ./package/ci/<< parameters.script >> + + lcov: + steps: + - run: + name: Collect code coverage + # Keep in sync with PKBUILD-coverage, travis.yml and appveyor-lcov.sh, + # please + command: | + lcov $LCOV_EXTRA_OPTS --directory . --capture --output-file coverage.info > /dev/null + lcov $LCOV_EXTRA_OPTS --extract coverage.info "*/src/Magnum*/*" --output-file coverage.info > /dev/null + lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/MagnumExternal/*" --output-file coverage.info > /dev/null + lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/Test/*" --output-file coverage.info > /dev/null + lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/build/src/*" --output-file coverage.info > /dev/null + - codecov/upload: + file: coverage.info + +jobs: + linux-gl: + executor: ubuntu-16_04 + environment: + CMAKE_CXX_FLAGS: --coverage + LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 + CONFIGURATION: Debug + PLATFORM_GL_API: GLX + steps: + - install-base: + extra: libgl1-mesa-dev libsdl2-dev libglfw3-dev libopenal-dev + - install-gcc-4_8 + - install-cmake-3_4 + - setup-null-openal-driver + - build: + script: unix-desktop.sh + - lcov + + linux-vulkan: + executor: ubuntu-16_04 + # Using default GCC and CMake version here + environment: + CMAKE_CXX_FLAGS: --coverage + CONFIGURATION: Debug + steps: + - install-base: + extra: cmake libsdl2-dev libglfw3-dev + - build: + script: unix-desktop-vulkan.sh + - lcov + + linux-gles2: + executor: ubuntu-16_04 + environment: + CMAKE_CXX_FLAGS: --coverage + LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 + CONFIGURATION: Debug + PLATFORM_GL_API: EGL + # STUPID yml interprets unquoted ON as a boolean + TARGET_GLES2: "ON" + steps: + - install-base: + extra: libsdl2-dev libglfw3-dev + - install-gcc-4_8 + - install-cmake-3_4 + - install-swiftshader-gles + - build: + script: unix-desktop-gles.sh + - lcov + + linux-gles3: + executor: ubuntu-16_04 + environment: + CMAKE_CXX_FLAGS: --coverage + LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 + CONFIGURATION: Debug + PLATFORM_GL_API: EGL + # STUPID yml interprets unquoted OFF as a boolean + TARGET_GLES2: "OFF" + steps: + - install-base: + extra: libsdl2-dev libglfw3-dev + - install-gcc-4_8 + - install-cmake-3_4 + - install-swiftshader-gles + - build: + script: unix-desktop-gles.sh + - lcov + + linux-static: + executor: ubuntu-16_04 + environment: + # STUPID yml interprets unquoted ON as a boolean + # https://stackoverflow.com/questions/53648244/specifying-the-string-value-yes-in-a-yaml-property + BUILD_STATIC: "ON" + CMAKE_CXX_FLAGS: --coverage + LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 + CONFIGURATION: Debug + PLATFORM_GL_API: GLX + steps: + - install-base: + extra: libgl1-mesa-dev libsdl2-dev libglfw3-dev libopenal-dev + - install-gcc-4_8 + - install-cmake-3_4 + - setup-null-openal-driver + - build: + script: unix-desktop.sh + - lcov + + linux-nondeprecated: + executor: ubuntu-16_04 + environment: + # STUPID yml interprets unquoted OFF as a boolean + BUILD_DEPRECATED: "OFF" + CMAKE_CXX_FLAGS: -DCORRADE_NO_ASSERT + CONFIGURATION: Release + PLATFORM_GL_API: GLX + steps: + - install-base: + extra: libgl1-mesa-dev libsdl2-dev libglfw3-dev libopenal-dev + - install-gcc-4_8 + - install-cmake-3_4 + - setup-null-openal-driver + - build: + script: unix-desktop.sh + + linux-sanitizers: + executor: ubuntu-16_04 + environment: + # STUPID yml interprets unquoted OFF as a boolean. Applications don't + # have any automated tests, so building them for sanitizers doesn't make + # sense. + BUILD_APPLICATIONS: "OFF" + CMAKE_CXX_FLAGS: -fsanitize=address + CONFIGURATION: Debug + PLATFORM_GL_API: GLX + steps: + - install-base: + extra: libgl1-mesa-dev libopenal-dev + - install-clang-3_8 + - install-cmake-3_4 + - setup-null-openal-driver + - build: + script: unix-desktop.sh + + linux-threadsanitizer: + executor: ubuntu-16_04 + environment: + # STUPID yml interprets unquoted OFF as a boolean. Applications don't + # have any automated tests, so building them for sanitizers doesn't make + # sense. + BUILD_APPLICATIONS: "OFF" + CMAKE_CXX_FLAGS: -fsanitize=thread + CONFIGURATION: Debug + PLATFORM_GL_API: GLX + steps: + - install-base: + extra: libgl1-mesa-dev libopenal-dev + - install-clang-3_8 + - install-cmake-3_4 + - setup-null-openal-driver + - build: + script: unix-desktop.sh + + emscripten-webgl1: + executor: emscripten + environment: + # STUPID yml interprets unquoted ON as a boolean + TARGET_GLES2: "ON" + steps: + - install-base + - build: + script: emscripten.sh + + emscripten-webgl2: + executor: emscripten + environment: + # STUPID yml interprets unquoted OFF as a boolean + TARGET_GLES2: "OFF" + steps: + - install-base + - build: + script: emscripten.sh + +workflows: + version: 2 + build: + jobs: + - linux-gl + - linux-vulkan + - linux-gles2 + - linux-gles3 + - linux-static + - linux-nondeprecated + - linux-sanitizers + - linux-threadsanitizer + - emscripten-webgl1 + - emscripten-webgl2 diff --git a/package/ci/travis-emscripten.sh b/package/ci/emscripten.sh similarity index 90% rename from package/ci/travis-emscripten.sh rename to package/ci/emscripten.sh index b26b5153c..25a9df853 100755 --- a/package/ci/travis-emscripten.sh +++ b/package/ci/emscripten.sh @@ -25,7 +25,6 @@ mkdir build-emscripten && cd build-emscripten cmake .. \ -DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \ -DCMAKE_TOOLCHAIN_FILE="../../toolchains/generic/Emscripten-wasm.cmake" \ - -DEMSCRIPTEN_PREFIX=$(echo /usr/local/Cellar/emscripten/*/libexec) \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG -O1" \ -DCMAKE_EXE_LINKER_FLAGS_RELEASE="-O1" \ @@ -42,7 +41,6 @@ mkdir build-emscripten && cd build-emscripten cmake .. \ -DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \ -DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten-wasm.cmake" \ - -DEMSCRIPTEN_PREFIX=$(echo /usr/local/Cellar/emscripten/*/libexec) \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG -O1" \ -DCMAKE_EXE_LINKER_FLAGS_RELEASE="-O1" \ @@ -72,8 +70,7 @@ cmake .. \ -DBUILD_GL_TESTS=ON \ -DTARGET_GLES2=$TARGET_GLES2 \ -G Ninja -# Otherwise the job gets killed (probably because using too much memory) -ninja -j4 +ninja # Test CORRADE_TEST_COLOR=ON ctest -V -E "(GL|AL)Test" diff --git a/package/ci/travis.yml b/package/ci/travis.yml index 9d3e80d6b..5bbab1a19 100644 --- a/package/ci/travis.yml +++ b/package/ci/travis.yml @@ -10,113 +10,114 @@ addons: - libopenal-dev matrix: + # The commented-out jobs are currently handled on Circle CI include: - - language: cpp - os: linux - dist: xenial - compiler: gcc - env: - - JOBID=linux-gl - - TARGET=desktop - - CMAKE_CXX_FLAGS="--coverage" - - LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" - - CONFIGURATION=Debug - - language: cpp - os: linux - dist: xenial - compiler: gcc - env: - - JOBID=linux-nondeprecated - - TARGET=desktop - - BUILD_DEPRECATED=OFF - - CMAKE_CXX_FLAGS="-DCORRADE_NO_ASSERT" - - CONFIGURATION=Release - - language: cpp - os: linux - dist: xenial - compiler: clang - env: - - JOBID=linux-sanitizers - - TARGET=desktop-sanitizers - - CMAKE_CXX_FLAGS=-fsanitize=address - - CONFIGURATION=Debug - addons: - apt: - sources: - - llvm-toolchain-xenial - packages: - - libgl1-mesa-dev - - ninja-build - - clang-3.8 - - libsdl2-dev - - libglfw3-dev - - libopenal-dev - - language: cpp - os: linux - dist: xenial - compiler: clang - env: - - JOBID=linux-threadsanitizer - - TARGET=desktop-sanitizers - - CMAKE_CXX_FLAGS=-fsanitize=thread - - CONFIGURATION=Debug - addons: - apt: - sources: - - llvm-toolchain-xenial - packages: - - libgl1-mesa-dev - - ninja-build - - clang-3.8 - - libsdl2-dev - - libglfw3-dev - - libopenal-dev - - language: cpp - os: linux - dist: xenial - compiler: gcc - env: - - JOBID=linux-vulkan - - TARGET=desktop-vulkan - - CMAKE_CXX_FLAGS="--coverage" - addons: - apt: - packages: - - ninja-build - - lcov - - libsdl2-dev - - libglfw3-dev - - language: cpp - os: linux - dist: xenial - compiler: gcc - env: - - JOBID=linux-static - - TARGET=desktop - - CMAKE_CXX_FLAGS="--coverage" - - LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" - - BUILD_STATIC=ON - - CONFIGURATION=Debug - - language: cpp - os: linux - dist: xenial - compiler: gcc - env: - - JOBID=linux-gles2 - - TARGET=desktop-gles - - TARGET_GLES2=ON - - CMAKE_CXX_FLAGS="--coverage" - - LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" - - language: cpp - os: linux - dist: xenial - compiler: gcc - env: - - JOBID=linux-gles3 - - TARGET=desktop-gles - - TARGET_GLES2=OFF - - CMAKE_CXX_FLAGS="--coverage" - - LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" + #- language: cpp + #os: linux + #dist: xenial + #compiler: gcc + #env: + #- JOBID=linux-gl + #- TARGET=desktop + #- CMAKE_CXX_FLAGS="--coverage" + #- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" + #- CONFIGURATION=Debug + #- language: cpp + #os: linux + #dist: xenial + #compiler: gcc + #env: + #- JOBID=linux-nondeprecated + #- TARGET=desktop + #- BUILD_DEPRECATED=OFF + #- CMAKE_CXX_FLAGS="-DCORRADE_NO_ASSERT" + #- CONFIGURATION=Release + #- language: cpp + #os: linux + #dist: xenial + #compiler: clang + #env: + #- JOBID=linux-sanitizers + #- TARGET=desktop-sanitizers + #- CMAKE_CXX_FLAGS=-fsanitize=address + #- CONFIGURATION=Debug + #addons: + #apt: + #sources: + #- llvm-toolchain-xenial + #packages: + #- libgl1-mesa-dev + #- ninja-build + #- clang-3.8 + #- libsdl2-dev + #- libglfw3-dev + #- libopenal-dev + #- language: cpp + #os: linux + #dist: xenial + #compiler: clang + #env: + #- JOBID=linux-threadsanitizer + #- TARGET=desktop-sanitizers + #- CMAKE_CXX_FLAGS=-fsanitize=thread + #- CONFIGURATION=Debug + #addons: + #apt: + #sources: + #- llvm-toolchain-xenial + #packages: + #- libgl1-mesa-dev + #- ninja-build + #- clang-3.8 + #- libsdl2-dev + #- libglfw3-dev + #- libopenal-dev + #- language: cpp + #os: linux + #dist: xenial + #compiler: gcc + #env: + #- JOBID=linux-vulkan + #- TARGET=desktop-vulkan + #- CMAKE_CXX_FLAGS="--coverage" + #addons: + #apt: + #packages: + #- ninja-build + #- lcov + #- libsdl2-dev + #- libglfw3-dev + #- language: cpp + #os: linux + #dist: xenial + #compiler: gcc + #env: + #- JOBID=linux-static + #- TARGET=desktop + #- CMAKE_CXX_FLAGS="--coverage" + #- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" + #- BUILD_STATIC=ON + #- CONFIGURATION=Debug + #- language: cpp + #os: linux + #dist: xenial + #compiler: gcc + #env: + #- JOBID=linux-gles2 + #- TARGET=desktop-gles + #- TARGET_GLES2=ON + #- CMAKE_CXX_FLAGS="--coverage" + #- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" + #- language: cpp + #os: linux + #dist: xenial + #compiler: gcc + #env: + #- JOBID=linux-gles3 + #- TARGET=desktop-gles + #- TARGET_GLES2=OFF + #- CMAKE_CXX_FLAGS="--coverage" + #- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" - language: cpp os: osx # The new plugin testing workflow is dynamically loading and unloading them @@ -160,26 +161,27 @@ matrix: - JOBID=ios-gles3 - TARGET=ios-simulator - TARGET_GLES2=OFF - - language: cpp - os: osx - # Since August 1st, 2019, tests that iterate over 65536 elements - # (MathHalfTest, MathPackingTest and MathColorTest) are segfaulting on the - # xcode9.3 image. Using whatever image is the default instead. - #osx_image: xcode9.3 - env: - - JOBID=emscripten-webgl1 - - TARGET=emscripten - - TARGET_GLES2=ON - - language: cpp - os: osx - # Since August 1st, 2019, tests that iterate over 65536 elements - # (MathHalfTest, MathPackingTest and MathColorTest) are segfaulting on the - # xcode9.3 image. Using whatever image is the default instead. - #osx_image: xcode9.3 - env: - - JOBID=emscripten-webgl2 - - TARGET=emscripten - - TARGET_GLES2=OFF + # TODO: these should be redone on Linux + Docker, like with Corrade + #- language: cpp + #os: osx + ## Since August 1st, 2019, tests that iterate over 65536 elements + ## (MathHalfTest, MathPackingTest and MathColorTest) are segfaulting on the + ## xcode9.3 image. Using whatever image is the default instead. + ##osx_image: xcode9.3 + #env: + #- JOBID=emscripten-webgl1 + #- TARGET=emscripten + #- TARGET_GLES2=ON + #- language: cpp + #os: osx + ## Since August 1st, 2019, tests that iterate over 65536 elements + ## (MathHalfTest, MathPackingTest and MathColorTest) are segfaulting on the + ## xcode9.3 image. Using whatever image is the default instead. + ##osx_image: xcode9.3 + #env: + #- JOBID=emscripten-webgl2 + #- TARGET=emscripten + #- TARGET_GLES2=OFF - language: android os: linux # Setting xenial here will cause it to use 12.04, with GCC 4.6 and other @@ -249,12 +251,6 @@ install: - if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov; fi - if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then export PLATFORM_GL_API=CGL; fi - if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then gem install xcpretty; fi -# binaryen is a dependency for wasm targets, but homebrew devs don't give a -# shit: https://github.com/Homebrew/homebrew-core/issues/47869 Also the -# generated .emscripten doesn't have a newline at EOL so the workaround listed -# in the issue doesn't work and one has to add explicit \n there to make it -# work. EVERYTHING SUCKS NOWADAYS. -- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install emscripten binaryen && export LLVM=/usr/local/opt/emscripten/libexec/llvm/bin && emcc && echo -e "\nBINARYEN_ROOT = '/usr/local'\n" >> ~/.emscripten; fi - if [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] || [ "$TARGET" == "desktop-gles" ]; then printf "[General]\ndrivers=null" > ~/.alsoftrc; fi # SDL on macOS and iOS (cached) @@ -285,7 +281,7 @@ script: - sync after_success: -# Keep in sync with PKBUILD-coverage and appveyor-lcov.sh, please +# Keep in sync with PKBUILD-coverage, appveyor-lcov.sh and circleci.yml, please - if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --directory . --capture --output-file coverage.info > /dev/null; fi - if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --extract coverage.info "*/src/Magnum*/*" --output-file coverage.info > /dev/null; fi - if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/MagnumExternal/*" --output-file coverage.info > /dev/null; fi diff --git a/package/ci/travis-desktop-gles.sh b/package/ci/unix-desktop-gles.sh similarity index 96% rename from package/ci/travis-desktop-gles.sh rename to package/ci/unix-desktop-gles.sh index c5ca7f8b2..142d29875 100755 --- a/package/ci/travis-desktop-gles.sh +++ b/package/ci/unix-desktop-gles.sh @@ -55,8 +55,7 @@ cmake .. \ -DBUILD_TESTS=ON \ -DBUILD_GL_TESTS=ON \ -G Ninja -# Otherwise the job gets killed (probably because using too much memory) -ninja -j4 +ninja 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 Debug/bin/magnum-gl-info --limits > /dev/null diff --git a/package/ci/travis-desktop-vulkan.sh b/package/ci/unix-desktop-vulkan.sh similarity index 96% rename from package/ci/travis-desktop-vulkan.sh rename to package/ci/unix-desktop-vulkan.sh index 405c124da..19dd8839a 100755 --- a/package/ci/travis-desktop-vulkan.sh +++ b/package/ci/unix-desktop-vulkan.sh @@ -67,8 +67,7 @@ cmake .. \ -DBUILD_GL_TESTS=OFF \ -DBUILD_DEPRECATED=$BUILD_DEPRECATED \ -G Ninja -# Otherwise the job gets killed (probably because using too much memory) -ninja -j4 +ninja ASAN_OPTIONS="color=always" LSAN_OPTIONS="color=always suppressions=$TRAVIS_BUILD_DIR/package/ci/leaksanitizer.conf" CORRADE_TEST_COLOR=ON ctest -V -E GLTest # Test install, after running the tests as for them it shouldn't be needed diff --git a/package/ci/travis-desktop.sh b/package/ci/unix-desktop.sh similarity index 75% rename from package/ci/travis-desktop.sh rename to package/ci/unix-desktop.sh index 389845f21..c4ffa3e53 100755 --- a/package/ci/travis-desktop.sh +++ b/package/ci/unix-desktop.sh @@ -25,8 +25,8 @@ cmake .. \ -DCMAKE_BUILD_TYPE=$CONFIGURATION \ -DWITH_AUDIO=ON \ -DWITH_VK=OFF \ - -DWITH_GLFWAPPLICATION=ON \ - -DWITH_SDL2APPLICATION=ON \ + -DWITH_GLFWAPPLICATION=$BUILD_APPLICATIONS \ + -DWITH_SDL2APPLICATION=$BUILD_APPLICATIONS \ -DWITH_WINDOWLESS${PLATFORM_GL_API}APPLICATION=ON \ -DWITH_${PLATFORM_GL_API}CONTEXT=ON \ -DWITH_OPENGLTESTER=ON \ @@ -55,19 +55,22 @@ cmake .. \ -DBUILD_STATIC=$BUILD_STATIC \ -DBUILD_PLUGINS_STATIC=$BUILD_STATIC \ -G Ninja -# Otherwise the job gets killed (probably because using too much memory) -ninja -j4 -ASAN_OPTIONS="color=always" LSAN_OPTIONS="color=always suppressions=$TRAVIS_BUILD_DIR/package/ci/leaksanitizer.conf" TSAN_OPTIONS="color=always" CORRADE_TEST_COLOR=ON ctest -V -E GLTest +ninja +ASAN_OPTIONS="color=always" LSAN_OPTIONS="color=always suppressions=$(pwd)/../package/ci/leaksanitizer.conf" TSAN_OPTIONS="color=always" CORRADE_TEST_COLOR=ON ctest -V -E GLTest # Test install, after running the tests as for them it shouldn't be needed ninja install -# Verify also compilation of the documentation image generators cd .. -mkdir build-doc-generated && cd build-doc-generated -cmake ../doc/generated \ - -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ - -DCMAKE_PREFIX_PATH=$HOME/deps \ - -DCMAKE_BUILD_TYPE=Debug \ - -G Ninja -ninja + +# Verify also compilation of the documentation image generators, if apps are +# built +if [ "$BUILD_APPLICATIONS" != "OFF" ]; then + mkdir build-doc-generated && cd build-doc-generated + cmake ../doc/generated \ + -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ + -DCMAKE_PREFIX_PATH=$HOME/deps \ + -DCMAKE_BUILD_TYPE=Debug \ + -G Ninja + ninja +fi