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.
 
 
 
 
 

931 lines
33 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
# Images below 14.0.1 (and all x86 variants) are removed as of Nov 7, 2025
xcode-14_0:
macos:
xcode: 14.0.1
resource_class: macos.m1.medium.gen1
# Used by the static macOS build, to build against static MoltenVK. It
# requires Xcode 14+ as 13 suffers from undefined _objc_msgSend$ symbols:
# https://stackoverflow.com/questions/73992337/flutter-build-is-ios-error-xcode-undefined-symbol-objc-msgsend
# Then, linking to *.xcframework is only supported since CMake 3.28, before
# that one has to pass the whole path to the *.a library:
# https://gitlab.kitware.com/cmake/cmake/-/issues/21752
# The Xcode 14.0.1 image has only CMake 3.26, 15.0.0 has 3.27.
xcode-15_1:
macos:
xcode: 15.1.0
resource_class: macos.m1.medium.gen1
emscripten:
docker:
# See Corrade's package/ci/circleci.yml
# for more information.
- image: emscripten/emsdk:2.0.16
emscripten2:
docker:
# 2.0.16 is the oldest on Docker that isn't based on Debian Buster which
# started 404ing as of 2025-07-13. However, as usual, it doesn't work, so
# bumping to 2.0.26 that was known to work previously. See Corrade's
# package/ci/circleci.yml for more information.
- image: emscripten/emsdk:2.0.26
emscripten3:
docker:
# Used by the webgl2 job. 2.0.27 is the first that adds timestamps to
# events, which are needed internally by touch events, but making sure the
# version 3 is tested also.
- image: emscripten/emsdk:3.0.0
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
install-static-moltenvk:
parameters:
version:
type: string
default: "1.3.0"
steps:
- run:
name: Install static MoltenVK << parameters.version >>
command: |
mkdir -p $HOME/deps/lib && cd $HOME/deps
wget -nc --no-check-certificate https://github.com/KhronosGroup/MoltenVK/releases/download/v<< parameters.version >>/MoltenVK-macos.tar
tar --strip-components=1 -xf MoltenVK-macos.tar
mv MoltenVK/static/MoltenVK.xcframework $HOME/deps/lib
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_EGL" != "ON" ]; then export TARGET_EGL=OFF; 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:
parameters:
extra:
type: string
default: ""
steps:
- run:
name: Collect code coverage
# Keep in sync with PKBUILD-coverage and appveyor-desktop-{,mingw}.bat,
# please
command: |
lcov << parameters.extra >> --directory . --capture --output-file coverage.info > /dev/null
lcov << parameters.extra >> --extract coverage.info "*/src/Magnum*/*" --output-file coverage.info > /dev/null
lcov << parameters.extra >> --remove coverage.info "*/MagnumExternal/*" --output-file coverage.info > /dev/null
lcov << parameters.extra >> --remove coverage.info "*/Test/*" --output-file coverage.info > /dev/null
lcov << parameters.extra >> --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
CONFIGURATION: Debug
# STUPID yml interprets unquoted ON as a boolean
TARGET_EGL: "ON"
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:
extra: --gcov-tool /usr/bin/gcov-4.8
linux-arm64:
executor: arm64
environment:
CMAKE_CXX_FLAGS: --coverage
CONFIGURATION: Debug
# The ARM64 job is a machine job, not a VM, which means running GL tests
# will get more expensive. But it's a newer Ubuntu version, meaning it
# could provide better coverage than the base job, so enabling EGL to run
# the tests. OTOH, the ASan and TSan jobs have them disabled, so the GLX
# code paths are tested there. (Also STUPID yml interprets unquoted ON as
# a boolean.)
# TODO switch to OFF when the main job is upgraded to a newer OS version
TARGET_EGL: "ON"
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
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:
extra: --gcov-tool /usr/bin/gcov-4.8
linux-gles2:
executor: ubuntu-18_04
environment:
CMAKE_CXX_FLAGS: --coverage
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"
- build:
script: unix-desktop-gles.sh
- lcov:
extra: --gcov-tool /usr/bin/gcov-4.8
linux-gles3:
executor: ubuntu-18_04
environment:
CMAKE_CXX_FLAGS: --coverage
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"
- build:
script: unix-desktop-gles.sh
- lcov:
extra: --gcov-tool /usr/bin/gcov-4.8
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
CONFIGURATION: Debug
# STUPID yml interprets unquoted ON as a boolean
TARGET_EGL: "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, 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:
extra: --gcov-tool /usr/bin/gcov-4.8
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
# STUPID yml interprets unquoted ON as a boolean
TARGET_EGL: "ON"
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
# llvmpipe on Mesa 20 on 18.04 seems to be leaking somewhere, reporting
# two 56 byte leaks from calloc in <unknown module>, so not suppressible
# in any way. Not reproducible with Mesa 25 Intel, Mesa 25 llvmpipe has
# random GLX leaks, so I guess the driver is just in a perpetual state of
# disrepair. Additionally it reports an ODR violation for
# GL::defaultFramebuffer due to complex yet-unresolved reasons explained
# in https://github.com/mosra/magnum/pull/565. (Also STUPID yml
# interprets unquoted OFF as a boolean.)
# TODO retry when upgrading to a newer OS version or when that PR is
# merged
TARGET_EGL: "OFF"
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
# The TSan job is a (more expensive) machine job, not a VM, so don't run
# the GL tests there (and thus do at least a compile test for the GLX
# codepath).
# TODO in case it can ever be made a VM again, switch those on
TARGET_EGL: "OFF"
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-14_0
environment:
CMAKE_CXX_FLAGS: --coverage
CONFIGURATION: Debug
EXTRA_OPTS: >
-DMAGNUM_WITH_WINDOWLESSCGLAPPLICATION=ON
-DMAGNUM_WITH_CGLCONTEXT=ON
steps:
# Tests with dynamic MoltenVK, macos-static tests the static version
- install-base-macos:
extra: sdl2 glfw molten-vk
- build:
script: unix-desktop.sh
- lcov
macos-gles3:
executor: xcode-14_0
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-14_0
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:
# Static MoltenVK needs newer Xcode and CMake
executor: xcode-15_1
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
# For some reason on the 15.1 image OpenAL hangs on startup. Skip those
# tests.
EXTRA_EXCLUDED_TESTS: "|ALTest"
CMAKE_CXX_FLAGS: --coverage
CONFIGURATION: Debug
steps:
# macos-gl tests with dynamic MoltenVK
- install-base-macos:
extra: sdl2 glfw wget
- install-static-moltenvk
- build:
script: unix-desktop.sh
# For some reason newer lcov produces random consistency errors, like the
# one in package/archlinux/PKGBUILD. Not the case with Xcode 13.4 image,
# only here.
- lcov:
extra: --ignore-errors inconsistent,gcov
emscripten-webgl1:
executor: emscripten2
# Deliberately *not* setting NODEJS_EXECUTABLE here to verify that the
# build correctly skips WASM SIMD tests for Node.js 14. WASM SIMD is then
# tested in the job below.
environment:
# STUPID yml interprets unquoted ON as a boolean
TARGET_GLES2: "ON"
steps:
- install-base-linux
# With a Debug build, 8+ is causing OOMs. Release was fine with 24.
- cap-ninja-jobs:
count: 4
- build:
script: emscripten.sh
emscripten-webgl2:
executor: emscripten3
environment:
# STUPID yml interprets unquoted OFF as a boolean
TARGET_GLES2: "OFF"
# Use Node.js 15 to be able to verify WASM SIMD codepaths. 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-14_0
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