mirror of https://github.com/mosra/magnum.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
863 lines
30 KiB
863 lines
30 KiB
version: 2.1 |
|
|
|
orbs: |
|
# Version 3.2.4 is the "new" uploader, but it's a 50 MB Node.js *binary* and |
|
# doesn't work on ARM64 Linux (or ARM Macs, or FreeBSD for that matter) and |
|
# nobody seems to care. Issues opened since Septembe 2021: |
|
# https://github.com/codecov/uploader/issues/347 |
|
# https://github.com/codecov/uploader/issues/523 |
|
# https://github.com/codecov/uploader/issues/849 |
|
# The old 1.1.1 still seems to work even though codecov got removed from pip |
|
# on 2023-04-14. |
|
codecov: codecov/codecov@1.1.1 |
|
|
|
executors: |
|
ubuntu-18_04: |
|
docker: |
|
- image: ubuntu:bionic-20220427 |
|
# Used by the ThreadSanitizer build. Cannot be a Docker because we need to |
|
# disable ASLR which can only be done with a real VM. |
|
ubuntu-20_04: |
|
machine: |
|
image: ubuntu-2004:2024.11.1 |
|
# Anything below 13.4.1 (and all x86 variants) are deprecated as of June 28th |
|
# 2024 |
|
xcode-13_4: |
|
macos: |
|
xcode: 13.4.1 |
|
resource_class: macos.m1.medium.gen1 |
|
emscripten1: |
|
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 |
|
emscripten2: |
|
docker: |
|
# Used by the webgl2 job. 2.0.17 is the first version that exposes |
|
# glGetBufferSubData() so GLES3 tests can read buffer data without having |
|
# to check the Emscripten version. 2.0.17 dies midway compiling however, so |
|
# using some newer version. 2.0.18 to 2.0.24 then fails due to an |
|
# unresolved malloc dependency of glGetString() (!!!), in 2.0.25 it |
|
# mysteriously disappears. See https://github.com/mosra/magnum/issues/507. |
|
# 2.0.27 is then the first that adds timestamps to events, which are needed |
|
# internally by touch events. |
|
- image: emscripten/emsdk:2.0.27 |
|
android-29: |
|
machine: |
|
image: android:2021.10.1 |
|
arm64: |
|
machine: |
|
image: ubuntu-2004:2023.07.1 |
|
resource_class: arm.medium |
|
|
|
commands: |
|
install-base-linux: |
|
parameters: |
|
extra: |
|
type: string |
|
default: "" |
|
sudo: |
|
type: string |
|
default: "" |
|
steps: |
|
- run: |
|
# TODO when switching to the new codecov uploader, gpg and git needs to |
|
# be installed as well |
|
name: Update apt and install base packages |
|
# Git is needed always for cloning Corrade |
|
command: | |
|
<< parameters.sudo >> apt update |
|
if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then export LCOV_PACKAGES="lcov curl"; fi |
|
<< parameters.sudo >> apt install -y git ninja-build $LCOV_PACKAGES << parameters.extra >> |
|
|
|
# TODO this might get resolved with 1.11.1: |
|
# https://github.com/ninja-build/ninja/pull/1827 |
|
# https://github.com/ninja-build/ninja/pull/2174 |
|
# But wouldn't it build too slow then? Heh |
|
cap-ninja-jobs: |
|
parameters: |
|
count: |
|
type: integer |
|
# It reports 36 cores and ninja goes with 38 currently, RAM fluctuates |
|
# from 3 to 70 GB. |
|
default: 24 |
|
steps: |
|
- run: |
|
name: Query CPU cores, default Ninja parallelism and available RAM, cap jobs |
|
command: | |
|
nproc |
|
ninja --help 2>&1 | grep "N jobs in parallel" || true |
|
free |
|
echo "export NINJA_JOBS=-j<< parameters.count >>" >> $BASH_ENV |
|
|
|
install-base-macos: |
|
parameters: |
|
extra: |
|
type: string |
|
default: "" |
|
steps: |
|
- run: |
|
name: Install base packages |
|
# As usual, homebrew takes five minutes to update and then explodes in |
|
# a spectacular way. How is this acceptable?! |
|
command: | |
|
if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then export LCOV_PACKAGES="lcov"; fi |
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake ninja $LCOV_PACKAGES << parameters.extra >> |
|
|
|
install-base-android: |
|
steps: |
|
- run: |
|
name: Create Android 29 x86 AVD |
|
command: | |
|
SYSTEM_IMAGES="system-images;android-29;default;x86" |
|
sdkmanager "$SYSTEM_IMAGES" |
|
echo "no" | avdmanager --verbose create avd -n test -k "$SYSTEM_IMAGES" |
|
- run: |
|
name: Launch Android emulator |
|
command: | |
|
emulator -avd test -delay-adb -verbose -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim |
|
background: true |
|
- run: |
|
name: Update apt and install base packages |
|
# Compared to Docker images this needs sudo |
|
command: | |
|
sudo apt update |
|
sudo apt install -y ninja-build |
|
|
|
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 |
|
|
|
# While we want to make sure the project builds on GCC 4.8 as certain |
|
# embedded toolchains still use it, for Clang we just pick the version |
|
# available in the oldest supported distro. |
|
install-clang: |
|
parameters: |
|
sudo: |
|
type: string |
|
default: "" |
|
symbolizer-link: |
|
type: boolean |
|
default: true |
|
steps: |
|
- run: |
|
# For some reason, CMake needs a working C compiler, so provide CC as |
|
# well for the case when default gcc isn't installed. |
|
name: Install Clang |
|
command: | |
|
<< parameters.sudo >> apt install -y clang |
|
echo 'export CC=clang' >> $BASH_ENV |
|
echo 'export CXX=clang++' >> $BASH_ENV |
|
# With Clang 6 on 18.04, 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-6.0` |
|
# because it then complains that |
|
# |
|
# External symbolizer path is set to '/usr/bin/llvm-symbolizer-6.0' 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. |
|
- when: |
|
condition: << parameters.symbolizer-link >> |
|
steps: |
|
- run: |
|
name: Create /usr/bin/llvm-symbolizer symlink |
|
command: | |
|
ls -l /usr/bin/llvm-symbolizer-6.0 |
|
ln -s /usr/bin/llvm-symbolizer{-6.0,} |
|
|
|
install-nodejs: |
|
parameters: |
|
version: |
|
type: string |
|
default: "18" |
|
steps: |
|
- run: |
|
name: Install Node.js << parameters.version >> |
|
# cd'ing to the home directory as otherwise it'd download into |
|
# /root/project and a checkout would then fail because it's not empty. |
|
# Also emsdk forces the PATH to prefer its own nodejs, so explicitly |
|
# call /usr/bin/node. |
|
command: | |
|
cd ~ |
|
curl -fsSL https://deb.nodesource.com/setup_<< parameters.version >>.x -o nodesource_setup.sh |
|
bash nodesource_setup.sh |
|
apt-get install -y nodejs |
|
/usr/bin/node -v |
|
|
|
install-cmake: |
|
parameters: |
|
version: |
|
type: string |
|
suffix: |
|
type: string |
|
default: Linux |
|
sudo: |
|
type: string |
|
default: "" |
|
steps: |
|
- run: |
|
name: Install CMake << parameters.version >> |
|
command: | |
|
version_short=<< parameters.version >> |
|
version_short="${version_short%.*}" |
|
<< parameters.sudo >> apt install -y wget |
|
mkdir -p $HOME/cmake && cd $HOME/cmake |
|
wget -nc --no-check-certificate https://cmake.org/files/v$version_short/cmake-<< parameters.version >>-<< parameters.suffix >>-x86_64.tar.gz |
|
tar --strip-components=1 -xzf cmake-<< parameters.version >>-<< parameters.suffix >>-x86_64.tar.gz |
|
echo 'export PATH=$HOME/cmake/bin:$PATH' >> $BASH_ENV |
|
source $BASH_ENV |
|
cmake --version | grep << parameters.version >> |
|
ctest --version | grep << parameters.version >> |
|
|
|
install-swiftshader-gles: |
|
parameters: |
|
build: |
|
type: string |
|
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: | |
|
mkdir -p $HOME/swiftshader && cd $HOME/swiftshader |
|
wget https://ci.magnum.graphics/swiftshader-gles-r5904.14dcbed947-<< parameters.build >>.zip |
|
unzip swiftshader-gles-r5904.14dcbed947-<< parameters.build >>.zip |
|
|
|
install-swiftshader-vulkan: |
|
parameters: |
|
build: |
|
type: string |
|
steps: |
|
- run: |
|
name: Install SwiftShader Vulkan |
|
# 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: | |
|
mkdir -p $HOME/swiftshader && cd $HOME/swiftshader |
|
wget https://ci.magnum.graphics/swiftshader-vulkan-r5904.14dcbed947-<< parameters.build >>.zip |
|
unzip swiftshader-vulkan-r5904.14dcbed947-<< parameters.build >>.zip |
|
|
|
install-vulkan-loader: |
|
parameters: |
|
build: |
|
type: string |
|
steps: |
|
- run: |
|
name: Install Vulkan Loader |
|
# Zip from https://github.com/mosra/magnum-ci/tree/vulkan-loader and |
|
# self-hosted because GH Actions would make it too simple for people if |
|
# you could just download the artifacts directly, right? RIGHT? |
|
command: | |
|
mkdir -p $HOME/vulkan-loader && cd $HOME/vulkan-loader |
|
wget https://ci.magnum.graphics/vulkan-loader-1.2.153-<< parameters.build >>.zip |
|
unzip vulkan-loader-1.2.153-<< parameters.build >>.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 |
|
if [ "$TARGET_GLES2" == "ON" ]; then export TARGET_GLES3=OFF; fi |
|
if [ "$TARGET_GLES2" == "OFF" ]; then export TARGET_GLES3=ON; fi |
|
./package/ci/<< parameters.script >> |
|
|
|
lcov: |
|
steps: |
|
- run: |
|
name: Collect code coverage |
|
# Keep in sync with PKBUILD-coverage and appveyor-desktop-{,mingw}.bat, |
|
# 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 |
|
# Official docs say "token not needed for public repos", in reality not |
|
# using the token is "extremely flakey". What's best is that if the upload |
|
# fails, the damn thing exits with a success error code, and nobody cares: |
|
# https://github.com/codecov/codecov-circleci-orb/issues/139 |
|
# https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266 |
|
# |
|
# Second best thing is that the codecov/upload helper takes a `token` |
|
# parameter. But the token parameter is an ENVIRONMENT VARIABLE NAME!! So |
|
# one just *can't* pass the token there. It got changed arbitrarily in |
|
# https://github.com/codecov/codecov-circleci-orb/pull/93 "because |
|
# CircleCI docs suggested so", yet all codecov docs suggest just commiting |
|
# that token directly to the YML files because "it's fine". So if it's |
|
# fine, why do I have to suffer like this?! |
|
- run: |
|
name: Set codecov upload token because everything is a dumpster fire |
|
# An icing on the cake is that CircleCI commands don't allow setting |
|
# `environment` for `commands`, only for `jobs`, so I have to do that |
|
# via bash, and because the environment isn't passsed from a run to |
|
# run, use the BASH_ENV hack. Mmm. Technology. |
|
command: | |
|
echo 'export CODECOV_TOKEN=3b1a7cc0-8bfb-4cde-8d99-dc04572a43c3' >> "$BASH_ENV" |
|
- codecov/upload: |
|
file: coverage.info |
|
|
|
jobs: |
|
linux-gl: |
|
executor: ubuntu-18_04 |
|
environment: |
|
CMAKE_CXX_FLAGS: --coverage |
|
LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 |
|
CONFIGURATION: Debug |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_GLXAPPLICATION=ON |
|
-DMAGNUM_WITH_XEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSGLXAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_GLXCONTEXT=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
steps: |
|
# libidn11 needed by CMake |
|
- install-base-linux: |
|
extra: libidn11 libgl1-mesa-dev libsdl2-dev libglfw3-dev libopenal-dev libvulkan-dev |
|
# In this case it gets stuck even with 16 jobs. Only on GCC, usually when |
|
# the huge TradeAbstractImporterTest / TradeMaterialDataTest get involved. |
|
# TODO: revisit when we get rid of more STL / deprecated includes |
|
- cap-ninja-jobs: |
|
count: 8 |
|
- install-gcc-4_8 |
|
- install-cmake: |
|
version: "3.5.2" |
|
- setup-null-openal-driver |
|
- build: |
|
script: unix-desktop.sh |
|
- lcov |
|
|
|
linux-arm64: |
|
executor: arm64 |
|
environment: |
|
CMAKE_CXX_FLAGS: --coverage |
|
CONFIGURATION: Debug |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_GLXAPPLICATION=ON |
|
-DMAGNUM_WITH_XEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSGLXAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_GLXCONTEXT=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
steps: |
|
# Not installing the old GCC 4.8 and CMake 3.5 to speed up. These are |
|
# tested more than enough on other jobs. Machine executors need sudo. |
|
- install-base-linux: |
|
extra: gcc cmake libgl1-mesa-dev libsdl2-dev libglfw3-dev libopenal-dev libvulkan-dev |
|
sudo: sudo |
|
- setup-null-openal-driver |
|
- build: |
|
script: unix-desktop.sh |
|
- lcov |
|
|
|
linux-vulkan: |
|
executor: ubuntu-18_04 |
|
environment: |
|
CMAKE_CXX_FLAGS: --coverage |
|
LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 |
|
CONFIGURATION: Debug |
|
steps: |
|
- install-base-linux: |
|
extra: cmake libsdl2-dev libglfw3-dev libvulkan-dev wget unzip |
|
# In this case it gets stuck even with 20 jobs. Only on GCC, usually when |
|
# the huge TradeAbstractImporterTest / TradeMaterialDataTest get involved. |
|
# TODO: revisit when we get rid of more STL / deprecated includes |
|
- cap-ninja-jobs: |
|
count: 16 |
|
- install-gcc-4_8 |
|
- install-swiftshader-vulkan: |
|
build: ubuntu-18.04 |
|
- build: |
|
script: unix-desktop-vulkan.sh |
|
- lcov |
|
|
|
linux-gles2: |
|
executor: ubuntu-18_04 |
|
environment: |
|
CMAKE_CXX_FLAGS: --coverage |
|
LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 |
|
CONFIGURATION: Debug |
|
# TODO enable also GlxApplication, WindowlessGlxApplication and |
|
# GlxContext once CMake 3.10+ is used to test correct libGLES + libGLX |
|
# linking |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_XEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
# STUPID yml interprets unquoted ON as a boolean |
|
TARGET_GLES2: "ON" |
|
steps: |
|
# libidn11 needed by CMake |
|
- install-base-linux: |
|
extra: libidn11 libsdl2-dev libglfw3-dev wget unzip |
|
# In this case it gets stuck even with 16 jobs. Only on GCC, usually when |
|
# the huge TradeAbstractImporterTest / TradeMaterialDataTest get involved. |
|
# TODO: revisit when we get rid of more STL / deprecated includes |
|
- cap-ninja-jobs: |
|
count: 8 |
|
- install-gcc-4_8 |
|
- install-cmake: |
|
version: "3.5.2" |
|
- install-swiftshader-gles: |
|
build: ubuntu-18.04 |
|
- build: |
|
script: unix-desktop-gles.sh |
|
- lcov |
|
|
|
linux-gles3: |
|
executor: ubuntu-18_04 |
|
environment: |
|
CMAKE_CXX_FLAGS: --coverage |
|
LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 |
|
CONFIGURATION: Debug |
|
# TODO enable also GlxApplication, WindowlessGlxApplication and |
|
# GlxContext once CMake 3.10+ is used to test correct libGLES + libGLX |
|
# linking |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_XEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
# STUPID yml interprets unquoted OFF as a boolean |
|
TARGET_GLES2: "OFF" |
|
steps: |
|
# libidn11 needed by CMake |
|
- install-base-linux: |
|
extra: libidn11 libsdl2-dev libglfw3-dev wget unzip |
|
# In this case it gets stuck even with 16 jobs. Only on GCC, usually when |
|
# the huge TradeAbstractImporterTest / TradeMaterialDataTest get involved. |
|
# TODO: revisit when we get rid of more STL / deprecated includes |
|
- cap-ninja-jobs: |
|
count: 8 |
|
- install-gcc-4_8 |
|
- install-cmake: |
|
version: "3.5.2" |
|
- install-swiftshader-gles: |
|
build: ubuntu-18.04 |
|
- build: |
|
script: unix-desktop-gles.sh |
|
- lcov |
|
|
|
linux-static: |
|
executor: ubuntu-18_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" |
|
# Testing magnum-sceneconverter and other utilities requires the plugins |
|
# to be either installed or static. Tests are however deliberately run |
|
# before install, so the static builds are the only case where the |
|
# utilities get thoroughly tested. |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_GLXAPPLICATION=ON |
|
-DMAGNUM_WITH_XEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSGLXAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_GLXCONTEXT=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
-DMAGNUM_SCENECONVERTER_STATIC_PLUGINS=Magnum::AnySceneImporter;Magnum::AnySceneConverter;Magnum::ObjImporter |
|
-DMAGNUM_IMAGECONVERTER_STATIC_PLUGINS=Magnum::AnyImageImporter;Magnum::AnyImageConverter;Magnum::TgaImporter;Magnum::TgaImageConverter |
|
CMAKE_CXX_FLAGS: --coverage |
|
LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8 |
|
CONFIGURATION: Debug |
|
steps: |
|
# libidn11 needed by CMake |
|
- install-base-linux: |
|
extra: libidn11 libgl1-mesa-dev libsdl2-dev libglfw3-dev libopenal-dev libvulkan-dev |
|
# In this case it gets stuck even with 16 jobs, usually when the huge |
|
# TradeAbstractImporterTest / TradeMaterialDataTest / TradeSceneDataTest |
|
# get involved. |
|
# TODO: revisit when we get rid of more STL / deprecated includes |
|
- cap-ninja-jobs: |
|
count: 8 |
|
- install-gcc-4_8 |
|
- install-cmake: |
|
version: "3.5.2" |
|
- setup-null-openal-driver |
|
- build: |
|
script: unix-desktop.sh |
|
- lcov |
|
|
|
linux-nondeprecated: |
|
executor: ubuntu-18_04 |
|
environment: |
|
# STUPID yml interprets unquoted OFF as a boolean |
|
BUILD_DEPRECATED: "OFF" |
|
CMAKE_CXX_FLAGS: -DCORRADE_NO_ASSERT |
|
CONFIGURATION: Release |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_GLXAPPLICATION=ON |
|
-DMAGNUM_WITH_XEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSGLXAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_GLXCONTEXT=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
steps: |
|
# libidn11 needed by CMake |
|
- install-base-linux: |
|
extra: libidn11 libgl1-mesa-dev libsdl2-dev libglfw3-dev libopenal-dev libvulkan-dev |
|
# In this case it gets stuck even with 20 jobs, usually when the huge |
|
# TradeAbstractImporterTest / TradeMaterialDataTest / TradeSceneDataTest |
|
# get involved. |
|
# TODO: revisit when we get rid of more STL |
|
- cap-ninja-jobs: |
|
count: 16 |
|
- install-gcc-4_8 |
|
- install-cmake: |
|
version: "3.5.2" |
|
- setup-null-openal-driver |
|
- build: |
|
script: unix-desktop.sh |
|
|
|
linux-sanitizers: |
|
executor: ubuntu-18_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 |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_GLXAPPLICATION=ON |
|
-DMAGNUM_WITH_XEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSGLXAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_GLXCONTEXT=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
steps: |
|
# libidn11 needed by CMake |
|
- install-base-linux: |
|
extra: libidn11 libgl1-mesa-dev libegl1-mesa-dev libopenal-dev libvulkan-dev |
|
- cap-ninja-jobs |
|
- install-clang |
|
- install-cmake: |
|
version: "3.5.2" |
|
- setup-null-openal-driver |
|
- build: |
|
script: unix-desktop.sh |
|
|
|
# https://github.com/google/sanitizers/issues/1716 ; started happening on |
|
# 2024-11-08 as CircleCI uses a base system with kernel 6.5 instead of 5.15 |
|
# for Docker images: |
|
# https://discuss.circleci.com/t/docker-executor-infrastructure-upgrade/52282 |
|
# This manifests when running corrade-rc already: |
|
# ThreadSanitizer: unexpected memory mapping 0x7e2f226ae000-0x7e2f22b00000 |
|
# Unfortunately, with Docker images, none of the suggested |
|
# sysctl vm.mmap_rnd_bits=28 |
|
# echo 0 | tee /proc/sys/kernel/randomize_va_space |
|
# works, complaining about read-only filesystem. The only way to set those is |
|
# with a real VM instead of Docker, which is what's done here. It also means |
|
# it's not possible to test on 18.04 anymore as those VMs are no longer |
|
# provided. |
|
linux-threadsanitizer: |
|
executor: ubuntu-20_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 |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_GLXAPPLICATION=ON |
|
-DMAGNUM_WITH_XEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSGLXAPPLICATION=ON |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_GLXCONTEXT=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
steps: |
|
- install-base-linux: |
|
extra: cmake libgl1-mesa-dev libegl1-mesa-dev libopenal-dev libvulkan-dev |
|
sudo: sudo |
|
- cap-ninja-jobs |
|
- install-clang: |
|
sudo: sudo |
|
symbolizer-link: false |
|
- setup-null-openal-driver |
|
- run: |
|
# Right now (2025-01-17) it's already set to 28 so nothing needs to be |
|
# changed. This is for the future when it may break again, and yes, |
|
# setting it explicitly to 32 causes the above error again. |
|
name: Ensure ASLR is compatible with ThreadSanitizer |
|
command: | |
|
sudo sysctl vm.mmap_rnd_bits |
|
sudo sysctl vm.mmap_rnd_bits=28 |
|
- build: |
|
script: unix-desktop.sh |
|
|
|
macos-gl: |
|
executor: xcode-13_4 |
|
environment: |
|
CMAKE_CXX_FLAGS: --coverage |
|
CONFIGURATION: Debug |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_WINDOWLESSCGLAPPLICATION=ON |
|
-DMAGNUM_WITH_CGLCONTEXT=ON |
|
steps: |
|
- install-base-macos: |
|
extra: sdl2 glfw molten-vk |
|
- build: |
|
script: unix-desktop.sh |
|
- lcov |
|
|
|
macos-gles3: |
|
executor: xcode-13_4 |
|
environment: |
|
CMAKE_CXX_FLAGS: --coverage |
|
CONFIGURATION: Debug |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON |
|
-DMAGNUM_WITH_EGLCONTEXT=ON |
|
# STUPID yml interprets unquoted OFF as a boolean |
|
TARGET_GLES2: "OFF" |
|
steps: |
|
- install-base-macos: |
|
extra: sdl2 glfw wget |
|
- install-swiftshader-gles: |
|
build: macos12-arm64 |
|
- build: |
|
script: unix-desktop-gles.sh |
|
- lcov |
|
|
|
macos-vulkan: |
|
executor: xcode-13_4 |
|
environment: |
|
CMAKE_CXX_FLAGS: --coverage |
|
CONFIGURATION: Debug |
|
steps: |
|
- install-base-macos: |
|
extra: sdl2 glfw wget |
|
- install-swiftshader-vulkan: |
|
build: macos12-arm64 |
|
- install-vulkan-loader: |
|
build: macos12-x64-arm64 |
|
- build: |
|
script: unix-desktop-vulkan.sh |
|
- lcov |
|
|
|
macos-static: |
|
executor: xcode-13_4 |
|
environment: |
|
# STUPID yml interprets unquoted ON as a boolean |
|
BUILD_STATIC: "ON" |
|
# Same comment as with the linux-static build -- these are the only jobs |
|
# that test command-line tools thoroughly |
|
EXTRA_OPTS: > |
|
-DMAGNUM_WITH_WINDOWLESSCGLAPPLICATION=ON |
|
-DMAGNUM_WITH_CGLCONTEXT=ON |
|
-DMAGNUM_SCENECONVERTER_STATIC_PLUGINS=Magnum::AnySceneImporter;Magnum::ObjImporter |
|
CMAKE_CXX_FLAGS: --coverage |
|
CONFIGURATION: Debug |
|
steps: |
|
- install-base-macos: |
|
extra: sdl2 glfw molten-vk |
|
- build: |
|
script: unix-desktop.sh |
|
- lcov |
|
|
|
emscripten-webgl1: |
|
executor: emscripten1 |
|
environment: |
|
# STUPID yml interprets unquoted ON as a boolean |
|
TARGET_GLES2: "ON" |
|
steps: |
|
- install-base-linux |
|
# With a Debug build, 16+ is causing OOMs. Release was fine with 24. |
|
- cap-ninja-jobs: |
|
count: 8 |
|
- build: |
|
script: emscripten.sh |
|
|
|
emscripten-webgl2: |
|
executor: emscripten2 |
|
environment: |
|
# STUPID yml interprets unquoted OFF as a boolean |
|
TARGET_GLES2: "OFF" |
|
# emsdk forces the PATH to prefer its own nodejs, so explicitly force |
|
# /usr/bin/node to be used by CMake |
|
EXTRA_OPTS: > |
|
-DNODEJS_EXECUTABLE=/usr/bin/node |
|
steps: |
|
- install-base-linux: |
|
extra: curl |
|
- install-nodejs |
|
# With a Debug build, 8+ is causing OOMs. Release was fine with 24. |
|
- cap-ninja-jobs: |
|
count: 4 |
|
- build: |
|
script: emscripten.sh |
|
|
|
android-x86-gles2: |
|
executor: android-29 |
|
environment: |
|
# STUPID yml interprets unquoted ON as a boolean |
|
TARGET_GLES2: "ON" |
|
steps: |
|
- install-base-android |
|
# CMake older than 3.20 doesn't work with NDK r22+ which removed some |
|
# deprecated paths. NDK r21 is only on deprecated CircleCI Android images |
|
# now. |
|
- install-cmake: |
|
version: "3.20.6" |
|
suffix: linux |
|
sudo: sudo |
|
- build: |
|
script: android-x86-gles.sh |
|
|
|
android-x86-gles3: |
|
executor: android-29 |
|
environment: |
|
# STUPID yml interprets unquoted ON as a boolean |
|
TARGET_GLES2: "OFF" |
|
steps: |
|
- install-base-android |
|
# CMake older than 3.20 doesn't work with NDK r22+ which removed some |
|
# deprecated paths. NDK r21 is only on deprecated CircleCI Android images |
|
# now. |
|
- install-cmake: |
|
version: "3.20.6" |
|
suffix: linux |
|
sudo: sudo |
|
- build: |
|
script: android-x86-gles.sh |
|
|
|
android-x86-vulkan: |
|
executor: android-29 |
|
steps: |
|
- install-base-android |
|
# CMake older than 3.20 doesn't work with NDK r22+ which removed some |
|
# deprecated paths. NDK r21 is only on deprecated CircleCI Android images |
|
# now. |
|
- install-cmake: |
|
version: "3.20.6" |
|
suffix: linux |
|
sudo: sudo |
|
- build: |
|
script: android-x86-vulkan.sh |
|
|
|
ios-gles3: |
|
executor: xcode-13_4 |
|
environment: |
|
# STUPID yml interprets unquoted ON as a boolean |
|
TARGET_GLES2: "OFF" |
|
# Yep, xcodebuild is beyond stupid and just DOESN'T build in parallel by |
|
# default. The default medium resource class has 4 CPUs and Ninja uses |
|
# -j6, so do the same for xcodebuild. |
|
XCODE_JOBS: 6 |
|
steps: |
|
- install-base-macos: |
|
extra: xcbeautify |
|
- build: |
|
script: ios-simulator-gles.sh |
|
|
|
workflows: |
|
version: 2 |
|
build: |
|
# While there's no actual execution or data dependency between the jobs, |
|
# this is done in order to reduce unnecessary credit usage. The GL, Vulkan |
|
# and non-deprecated Linux builds are taken as the main sanity checks. Only |
|
# if they pass, the rest of the jobs gets gradually executed, with further |
|
# dependencies especially for the macOS jobs that take the most credits. |
|
jobs: |
|
- linux-gl |
|
- linux-vulkan |
|
- linux-nondeprecated |
|
- linux-arm64: |
|
requires: |
|
- linux-gl |
|
- linux-vulkan |
|
- linux-nondeprecated |
|
- linux-gles2: |
|
requires: |
|
- linux-gl |
|
- linux-nondeprecated |
|
- linux-gles3: |
|
requires: |
|
- linux-gl |
|
- linux-nondeprecated |
|
- linux-static: |
|
requires: |
|
- linux-gl |
|
- linux-vulkan |
|
- linux-nondeprecated |
|
- linux-sanitizers: |
|
requires: |
|
- linux-gl |
|
- linux-nondeprecated |
|
- linux-threadsanitizer: |
|
requires: |
|
- linux-sanitizers |
|
- macos-gl: |
|
requires: |
|
- linux-arm64 |
|
- linux-gl |
|
- linux-nondeprecated |
|
- macos-vulkan: |
|
requires: |
|
- linux-vulkan |
|
- macos-gl |
|
- macos-gles3: |
|
requires: |
|
- linux-gles3 |
|
- macos-gl |
|
- macos-static: |
|
requires: |
|
- linux-static |
|
- macos-gl |
|
- emscripten-webgl1: |
|
requires: |
|
- linux-gles2 |
|
- linux-static |
|
- emscripten-webgl2: |
|
requires: |
|
- linux-gles3 |
|
- linux-static |
|
- android-x86-gles2: |
|
requires: |
|
- linux-gles2 |
|
- linux-static |
|
- linux-arm64 |
|
- android-x86-gles3: |
|
requires: |
|
- linux-gles3 |
|
- linux-static |
|
- linux-arm64 |
|
- android-x86-vulkan: |
|
requires: |
|
- linux-vulkan |
|
- linux-static |
|
- linux-arm64 |
|
- ios-gles3: |
|
requires: |
|
- macos-gles3 |
|
- macos-static
|
|
|