mirror of https://github.com/mosra/magnum.git
8 changed files with 480 additions and 155 deletions
@ -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 |
||||||
Loading…
Reference in new issue