Merge CI from 3.4

This commit is contained in:
Antonio Sanchez 2025-02-25 21:23:42 -08:00
parent 109935bfce
commit 2e708d48ca
23 changed files with 1638 additions and 0 deletions

19
.clang-format Normal file
View File

@ -0,0 +1,19 @@
---
BasedOnStyle: Google
ColumnLimit: 120
---
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 120
StatementMacros:
- EIGEN_STATIC_ASSERT
- EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
- EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN
SortIncludes: false
AttributeMacros:
- EIGEN_STRONG_INLINE
- EIGEN_ALWAYS_INLINE
- EIGEN_DEVICE_FUNC
- EIGEN_DONT_INLINE
- EIGEN_DEPRECATED
- EIGEN_UNUSED

34
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,34 @@
# This file is part of Eigen, a lightweight C++ template library
# for linear algebra.
#
# Copyright (C) 2023, The Eigen Authors
#
# This Source Code Form is subject to the terms of the Mozilla
# Public License v. 2.0. If a copy of the MPL was not distributed
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
stages:
- checkformat
- build
- test
- deploy
variables:
# CMake build directory.
EIGEN_CI_BUILDDIR: .build
# Specify the CMake build target.
EIGEN_CI_BUILD_TARGET: ""
# If a test regex is specified, that will be selected.
# Otherwise, we will try a label if specified.
EIGEN_CI_CTEST_REGEX: ""
EIGEN_CI_CTEST_LABEL: ""
EIGEN_CI_CTEST_ARGS: ""
include:
- "/ci/checkformat.gitlab-ci.yml"
- "/ci/common.gitlab-ci.yml"
- "/ci/build.linux.gitlab-ci.yml"
- "/ci/build.windows.gitlab-ci.yml"
- "/ci/test.linux.gitlab-ci.yml"
- "/ci/test.windows.gitlab-ci.yml"
- "/ci/deploy.gitlab-ci.yml"

120
ci/CTest2JUnit.xsl Normal file
View File

@ -0,0 +1,120 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/Site">
<xsl:variable name="Name"><xsl:value-of select="@Name"/></xsl:variable>
<xsl:variable name="Hostname"><xsl:value-of select="@Hostname"/></xsl:variable>
<xsl:variable name="TestCount"><xsl:value-of select="count(//TestList/Test)"/> </xsl:variable>
<xsl:variable name="ErrorCount"><xsl:value-of select="count(//TestList/Test[@Status='error'])"/> </xsl:variable>
<xsl:variable name="FailureCount"><xsl:value-of select="count(//Testing/Test[@Status='failed'])"/> </xsl:variable>
<testsuite name="{$Name}" hostname="{$Hostname}" errors="0" failures="{$FailureCount}" tests="{$TestCount}">
<xsl:variable name="BuildName"><xsl:value-of select="@BuildName"/></xsl:variable>
<xsl:variable name="BuildStamp"><xsl:value-of select="@BuildStamp"/></xsl:variable>
<xsl:variable name="Generator"><xsl:value-of select="@Generator"/></xsl:variable>
<xsl:variable name="CompilerName"><xsl:value-of select="@CompilerName"/></xsl:variable>
<xsl:variable name="OSName"><xsl:value-of select="@OSName"/></xsl:variable>
<xsl:variable name="OSRelease"><xsl:value-of select="@OSRelease"/></xsl:variable>
<xsl:variable name="OSVersion"><xsl:value-of select="@OSVersion"/></xsl:variable>
<xsl:variable name="OSPlatform"><xsl:value-of select="@OSPlatform"/></xsl:variable>
<xsl:variable name="Is64Bits"><xsl:value-of select="@Is64Bits"/></xsl:variable>
<xsl:variable name="VendorString"><xsl:value-of select="@VendorString"/></xsl:variable>
<xsl:variable name="VendorID"><xsl:value-of select="@VendorID"/></xsl:variable>
<xsl:variable name="FamilyID"><xsl:value-of select="@FamilyID"/></xsl:variable>
<xsl:variable name="ModelID"><xsl:value-of select="@ModelID"/></xsl:variable>
<xsl:variable name="ProcessorCacheSize"><xsl:value-of select="@ProcessorCacheSize"/></xsl:variable>
<xsl:variable name="NumberOfLogicalCPU"><xsl:value-of select="@NumberOfLogicalCPU"/></xsl:variable>
<xsl:variable name="NumberOfPhysicalCPU"><xsl:value-of select="@NumberOfPhysicalCPU"/></xsl:variable>
<xsl:variable name="TotalVirtualMemory"><xsl:value-of select="@TotalVirtualMemory"/></xsl:variable>
<xsl:variable name="TotalPhysicalMemory"><xsl:value-of select="@TotalPhysicalMemory"/></xsl:variable>
<xsl:variable name="LogicalProcessorsPerPhysical"><xsl:value-of select="@LogicalProcessorsPerPhysical"/></xsl:variable>
<xsl:variable name="ProcessorClockFrequency"><xsl:value-of select="@ProcessorClockFrequency"/></xsl:variable>
<properties>
<property name="BuildName" value="{$BuildName}" />
<property name="BuildStamp" value="{$BuildStamp}" />
<property name="Name" value="{$Name}" />
<property name="Generator" value="{$Generator}" />
<property name="CompilerName" value="{$CompilerName}" />
<property name="OSName" value="{$OSName}" />
<property name="Hostname" value="{$Hostname}" />
<property name="OSRelease" value="{$OSRelease}" />
<property name="OSVersion" value="{$OSVersion}" />
<property name="OSPlatform" value="{$OSPlatform}" />
<property name="Is64Bits" value="{$Is64Bits}" />
<property name="VendorString" value="{$VendorString}" />
<property name="VendorID" value="{$VendorID}" />
<property name="FamilyID" value="{$FamilyID}" />
<property name="ModelID" value="{$ModelID}" />
<property name="ProcessorCacheSize" value="{$ProcessorCacheSize}" />
<property name="NumberOfLogicalCPU" value="{$NumberOfLogicalCPU}" />
<property name="NumberOfPhysicalCPU" value="{$NumberOfPhysicalCPU}" />
<property name="TotalVirtualMemory" value="{$TotalVirtualMemory}" />
<property name="TotalPhysicalMemory" value="{$TotalPhysicalMemory}" />
<property name="LogicalProcessorsPerPhysical" value="{$LogicalProcessorsPerPhysical}" />
<property name="ProcessorClockFrequency" value="{$ProcessorClockFrequency}" />
</properties>
<xsl:apply-templates select="Testing/Test"/>
<system-out>
BuildName: <xsl:value-of select="$BuildName" />
BuildStamp: <xsl:value-of select="$BuildStamp" />
Name: <xsl:value-of select="$Name" />
Generator: <xsl:value-of select="$Generator" />
CompilerName: <xsl:value-of select="$CompilerName" />
OSName: <xsl:value-of select="$OSName" />
Hostname: <xsl:value-of select="$Hostname" />
OSRelease: <xsl:value-of select="$OSRelease" />
OSVersion: <xsl:value-of select="$OSVersion" />
OSPlatform: <xsl:value-of select="$OSPlatform" />
Is64Bits: <xsl:value-of select="$Is64Bits" />
VendorString: <xsl:value-of select="$VendorString" />
VendorID: <xsl:value-of select="$VendorID" />
FamilyID: <xsl:value-of select="$FamilyID" />
ModelID: <xsl:value-of select="$ModelID" />
ProcessorCacheSize: <xsl:value-of select="$ProcessorCacheSize" />
NumberOfLogicalCPU: <xsl:value-of select="$NumberOfLogicalCPU" />
NumberOfPhysicalCPU: <xsl:value-of select="$NumberOfPhysicalCPU" />
TotalVirtualMemory: <xsl:value-of select="$TotalVirtualMemory" />
TotalPhysicalMemory: <xsl:value-of select="$TotalPhysicalMemory" />
LogicalProcessorsPerPhysical: <xsl:value-of select="$LogicalProcessorsPerPhysical" />
ProcessorClockFrequency: <xsl:value-of select="$ProcessorClockFrequency" />
</system-out>
</testsuite>
</xsl:template>
<xsl:template match="Testing/Test">
<xsl:variable name="testcasename"><xsl:value-of select= "Name"/></xsl:variable>
<xsl:variable name="testclassname"><xsl:value-of select= " concat('this', substring(Path,2))"/></xsl:variable>
<xsl:variable name="exectime">
<xsl:for-each select="Results/NamedMeasurement">
<xsl:if test="@name = 'Execution Time'">
<xsl:value-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<testcase name="{$testcasename}" classname="{$testclassname}" time="{$exectime}">
<xsl:if test="@Status = 'passed'">
</xsl:if>
<xsl:if test="@Status = 'failed'">
<xsl:variable name="failtype">
<xsl:for-each select="Results/NamedMeasurement">
<xsl:if test="@name = 'Exit Code'">
<xsl:value-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="failcode">
<xsl:for-each select="Results/NamedMeasurement">
<xsl:if test="@name = 'Exit Value'">
<xsl:value-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<failure message="{$failtype} ({$failcode})"><xsl:value-of select="Results/Measurement/Value/text()" /></failure>
</xsl:if>
<xsl:if test="@Status = 'notrun'">
<skipped><xsl:value-of select="Results/Measurement/Value/text()" /></skipped>
</xsl:if>
</testcase>
</xsl:template>
</xsl:stylesheet>

12
ci/README.md Normal file
View File

@ -0,0 +1,12 @@
## Eigen CI infrastructure
Eigen's CI infrastructure uses three stages:
1. A `checkformat` stage to verify MRs satisfy proper formatting style, as
defined by `clang-format`.
2. A `build` stage to build the unit-tests.
3. A `test` stage to run the unit-tests.
For merge requests, only a small subset of tests are built/run, and only on a
small subset of platforms. This is to reduce our overall testing infrastructure
resource usage. In addition, we have nightly jobs that build and run the full
suite of tests on most officially supported platforms.

View File

@ -0,0 +1,331 @@
# Base configuration for linux cross-compilation.
.build:linux:cross:
extends: .common:linux:cross
stage: build
variables:
EIGEN_CI_BUILD_TARGET: buildtests
script:
- . ci/scripts/build.linux.script.sh
tags:
- linux
- eigen-runner
- cross-compiler
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen"
cache:
key: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG-BUILD"
paths:
- ${EIGEN_CI_BUILDDIR}/
######## x86-64 ################################################################
.build:linux:cross:x86-64:
extends: .build:linux:cross
variables:
EIGEN_CI_TARGET_ARCH: x86_64
EIGEN_CI_CROSS_TARGET_TRIPLE: x86_64-linux-gnu
# GCC-6 (minimum on Ubuntu 18.04)
build:linux:cross:x86-64:gcc-6:default:
extends: .build:linux:cross:x86-64
image: ubuntu:18.04
variables:
EIGEN_CI_C_COMPILER: gcc-6
EIGEN_CI_CXX_COMPILER: g++-6
EIGEN_CI_CROSS_INSTALL: g++-6-x86-64-linux-gnu
EIGEN_CI_CROSS_C_COMPILER: x86_64-linux-gnu-gcc-6
EIGEN_CI_CROSS_CXX_COMPILER: x86_64-linux-gnu-g++-6
# GCC-10 (stable recent version)
build:linux:cross:x86-64:gcc-10:default:
extends: .build:linux:cross:x86-64
variables:
EIGEN_CI_C_COMPILER: gcc-10
EIGEN_CI_CXX_COMPILER: g++-10
EIGEN_CI_CROSS_INSTALL: g++-10-x86-64-linux-gnu
EIGEN_CI_CROSS_C_COMPILER: x86_64-linux-gnu-gcc-10
EIGEN_CI_CROSS_CXX_COMPILER: x86_64-linux-gnu-g++-10
build:linux:cross:x86-64:gcc-10:cxx03:
extends: build:linux:cross:x86-64:gcc-10:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_CXX11=off"
build:linux:cross:x86-64:gcc-10:avx:
extends: build:linux:cross:x86-64:gcc-10:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX=on"
build:linux:cross:x86-64:gcc-10:avx2:
extends: build:linux:cross:x86-64:gcc-10:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX2=on"
build:linux:cross:x86-64:gcc-10:avx512dq:
extends: build:linux:cross:x86-64:gcc-10:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX512DQ=on"
# Clang-6 (minimum on Ubuntu 20.04)
build:linux:cross:x86-64:clang-6:default:
extends: .build:linux:cross:x86-64
image: ubuntu:20.04
variables:
EIGEN_CI_INSTALL: g++-8 clang-6.0 lld-6.0
EIGEN_CI_C_COMPILER: clang-6.0
EIGEN_CI_CXX_COMPILER: clang++-6.0
EIGEN_CI_CROSS_INSTALL: g++-8-x86-64-linux-gnu clang-6.0 lld-6.0
EIGEN_CI_ADDITIONAL_ARGS: -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld-6.0
# Clang-12 (stable recent version)
build:linux:cross:x86-64:clang-12:default:
extends: .build:linux:cross:x86-64
variables:
EIGEN_CI_INSTALL: clang-12
EIGEN_CI_C_COMPILER: clang-12
EIGEN_CI_CXX_COMPILER: clang++-12
EIGEN_CI_CROSS_INSTALL: g++-10-x86-64-linux-gnu clang-12
build:linux:cross:x86-64:clang-12:avx:
extends: build:linux:cross:x86-64:clang-12:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX=on"
build:linux:cross:x86-64:clang-12:avx2:
extends: build:linux:cross:x86-64:clang-12:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX2=on"
build:linux:cross:x86-64:clang-12:avx512dq:
extends: build:linux:cross:x86-64:clang-12:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX512DQ=on"
build:linux:doc:
extends: .build:linux:cross
variables:
EIGEN_CI_TARGET_ARCH: any
EIGEN_CI_BUILD_TARGET: doc
EIGEN_CI_INSTALL: ca-certificates clang flex python3 bison graphviz
EIGEN_CI_C_COMPILER: clang
EIGEN_CI_CXX_COMPILER: clang++
EIGEN_CI_BEFORE_SCRIPT: ". ci/scripts/build_and_install_doxygen.sh Release_1_13_2"
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen"
# # Sanitizers (Disabled because ASAN hangs and MSAN requires instrumented libc++)
# build:linux:cross:x86-64:clang-12:default:asan:
# extends: build:linux:cross:x86-64:clang-12:default
# variables:
# EIGEN_CI_ADDITIONAL_ARGS:
# -DEIGEN_TEST_CUSTOM_CXX_FLAGS=-fsanitize=address,undefined
# -DEIGEN_TEST_CUSTOM_LINKER_FLAGS=-fsanitize=address,undefined
# build:linux:cross:x86-64:clang-12:default:msan:
# extends: build:linux:cross:x86-64:clang-12:default
# variables:
# EIGEN_CI_ADDITIONAL_ARGS:
# -DEIGEN_TEST_CUSTOM_CXX_FLAGS=-fsanitize=memory
# -DEIGEN_TEST_CUSTOM_LINKER_FLAGS=-fsanitize=memory
######## CUDA ##################################################################
.build:linux:cuda:
extends: .build:linux:cross:x86-64
variables:
# Additional flags passed to the cuda compiler.
EIGEN_CI_CUDA_CXX_FLAGS: ""
# Compute architectures present in the GitLab CI runners.
EIGEN_CI_CUDA_COMPUTE_ARCH: "50;75"
EIGEN_CI_BUILD_TARGET: buildtests_gpu
EIGEN_CI_TEST_CUDA_CLANG: "off"
EIGEN_CI_ADDITIONAL_ARGS:
-DEIGEN_TEST_CUDA=on
-DEIGEN_CUDA_CXX_FLAGS=${EIGEN_CI_CUDA_CXX_FLAGS}
-DEIGEN_CUDA_COMPUTE_ARCH=${EIGEN_CI_CUDA_COMPUTE_ARCH}
-DEIGEN_TEST_CUDA_CLANG=${EIGEN_CI_TEST_CUDA_CLANG}
tags:
- eigen-runner
- linux
# Requires intel runner for cuda docker image support.
- x86-64
# NVidia no longer provides docker images < CUDA 11.0.3.
# # GCC-7, CUDA-9.2
# build:linux:cuda-9.2:gcc-7:
# extends: .build:linux:cuda
# image: nvidia/cuda:9.2-devel-ubuntu18.04
# variables:
# # cuda 9.2 doesn't support sm_75, so lower to 70.
# EIGEN_CI_CUDA_COMPUTE_ARCH: "50;70"
# EIGEN_CI_C_COMPILER: gcc-7
# EIGEN_CI_CXX_COMPILER: g++-7
# # Clang-10, CUDA-9.2
# build:linux:cuda-9.2:clang-10:
# extends: build:linux:cuda-9.2:gcc-7
# variables:
# EIGEN_CI_C_COMPILER: clang-10
# EIGEN_CI_CXX_COMPILER: clang++-10
# EIGEN_CI_TEST_CUDA_CLANG: "on"
# # GCC-8, CUDA-10.2
# build:linux:cuda-10.2:gcc-8:
# extends: .build:linux:cuda
# image: nvidia/cuda:10.2-devel-ubuntu18.04
# variables:
# EIGEN_CI_C_COMPILER: gcc-8
# EIGEN_CI_CXX_COMPILER: g++-8
# # Clang-10, CUDA-10.2
# build:linux:cuda-10.2:clang-10:
# extends: build:linux:cuda-10.2:gcc-8
# variables:
# EIGEN_CI_C_COMPILER: clang-10
# EIGEN_CI_CXX_COMPILER: clang++-10
# EIGEN_CI_TEST_CUDA_CLANG: "on"
# GCC-10, CUDA-11.4
build:linux:cuda-11.4:gcc-10:
extends: .build:linux:cuda
image: nvidia/cuda:11.4.3-devel-ubuntu20.04
variables:
EIGEN_CI_C_COMPILER: gcc-10
EIGEN_CI_CXX_COMPILER: g++-10
# Clang-12, CUDA-11.4
build:linux:cuda-11.4:clang-12:
extends: build:linux:cuda-11.4:gcc-10
variables:
EIGEN_CI_C_COMPILER: clang-12
EIGEN_CI_CXX_COMPILER: clang++-12
EIGEN_CI_TEST_CUDA_CLANG: "on"
# GCC-10, CUDA-12.2
build:linux:cuda-12.2:gcc-10:
extends: .build:linux:cuda
image: nvidia/cuda:12.2.0-devel-ubuntu20.04
variables:
EIGEN_CI_C_COMPILER: gcc-10
EIGEN_CI_CXX_COMPILER: g++-10
# Clang-12, CUDA-12.2
build:linux:cuda-12.2:clang-12:
extends: build:linux:cuda-12.2:gcc-10
variables:
EIGEN_CI_C_COMPILER: clang-12
EIGEN_CI_CXX_COMPILER: clang++-12
EIGEN_CI_TEST_CUDA_CLANG: "on"
# ######## HIP ###################################################################
# Note: these are currently build-only, until we get an AMD-supported runner.
# ROCm HIP
build:linux:rocm-latest:gcc-10:
extends: .build:linux:cross
image: rocm/dev-ubuntu-24.04:latest
variables:
EIGEN_CI_C_COMPILER: gcc-10
EIGEN_CI_CXX_COMPILER: g++-10
EIGEN_CI_BUILD_TARGET: buildtests_gpu
EIGEN_CI_ADDITIONAL_ARGS: -DEIGEN_TEST_HIP=on
tags:
- eigen-runner
- linux
- x86-64
######## Arm ###################################################################
.build:linux:cross:arm:
extends: .build:linux:cross
variables:
EIGEN_CI_TARGET_ARCH: arm
EIGEN_CI_CROSS_TARGET_TRIPLE: arm-linux-gnueabihf
EIGEN_CI_ADDITIONAL_ARGS: >
-DEIGEN_TEST_CUSTOM_CXX_FLAGS=-march=armv7-a;-mfpu=neon-vfpv4
build:linux:cross:arm:gcc-10:default:
extends: .build:linux:cross:arm
variables:
EIGEN_CI_CROSS_INSTALL: g++-10-arm-linux-gnueabihf
EIGEN_CI_CROSS_C_COMPILER: arm-linux-gnueabihf-gcc-10
EIGEN_CI_CROSS_CXX_COMPILER: arm-linux-gnueabihf-g++-10
build:linux:cross:arm:clang-12:default:
extends: .build:linux:cross:arm
variables:
EIGEN_CI_INSTALL: clang-12
EIGEN_CI_C_COMPILER: clang-12
EIGEN_CI_CXX_COMPILER: clang++-12
EIGEN_CI_CROSS_INSTALL: g++-10-arm-linux-gnueabihf clang-12
######## aarch64 ###############################################################
.build:linux:cross:aarch64:
extends: .build:linux:cross
variables:
EIGEN_CI_TARGET_ARCH: aarch64
EIGEN_CI_CROSS_TARGET_TRIPLE: aarch64-linux-gnu
EIGEN_CI_ADDITIONAL_ARGS: -DEIGEN_TEST_CUSTOM_CXX_FLAGS=-march=armv8.2-a+fp16
build:linux:cross:aarch64:gcc-10:default:
extends: .build:linux:cross:aarch64
variables:
EIGEN_CI_C_COMPILER: gcc-10
EIGEN_CI_CXX_COMPILER: g++-10
EIGEN_CI_CROSS_INSTALL: g++-10-aarch64-linux-gnu
EIGEN_CI_CROSS_C_COMPILER: aarch64-linux-gnu-gcc-10
EIGEN_CI_CROSS_CXX_COMPILER: aarch64-linux-gnu-g++-10
build:linux:cross:aarch64:clang-12:default:
extends: .build:linux:cross:aarch64
variables:
EIGEN_CI_INSTALL: clang-12
EIGEN_CI_C_COMPILER: clang-12
EIGEN_CI_CXX_COMPILER: clang++-12
EIGEN_CI_CROSS_INSTALL: g++-10-aarch64-linux-gnu clang-12
######## ppc64le ###############################################################
.build:linux:cross:ppc64le:
extends: .build:linux:cross
variables:
EIGEN_CI_TARGET_ARCH: ppc64le
EIGEN_CI_CROSS_TARGET_TRIPLE: powerpc64le-linux-gnu
build:linux:cross:ppc64le:gcc-10:default:
extends: .build:linux:cross:ppc64le
variables:
EIGEN_CI_C_COMPILER: gcc-10
EIGEN_CI_CXX_COMPILER: g++-10
EIGEN_CI_CROSS_INSTALL: g++-10-powerpc64le-linux-gnu
EIGEN_CI_CROSS_C_COMPILER: powerpc64le-linux-gnu-gcc-10
EIGEN_CI_CROSS_CXX_COMPILER: powerpc64le-linux-gnu-g++-10
# Temporarily disable MMA until #2457 is resolved.
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_ALTIVEC_DISABLE_MMA=1"
build:linux:cross:ppc64le:clang-12:default:
extends: .build:linux:cross:ppc64le
variables:
EIGEN_CI_INSTALL: clang-12
EIGEN_CI_C_COMPILER: clang-12
EIGEN_CI_CXX_COMPILER: clang++-12
EIGEN_CI_CROSS_INSTALL: g++-10-powerpc64le-linux-gnu clang-12
######## MR Smoke Tests ########################################################
build:linux:cross:x86-64:gcc-10:default:smoketest:
extends: build:linux:cross:x86-64:gcc-10:default
variables:
EIGEN_CI_BUILD_TARGET: buildsmoketests
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
build:linux:cross:x86-64:clang-12:default:smoketest:
extends: build:linux:cross:x86-64:clang-12:default
variables:
EIGEN_CI_BUILD_TARGET: buildsmoketests
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

View File

@ -0,0 +1,114 @@
# Base configuration for windows builds.
.build:windows:
extends: .common:windows
stage: build
variables:
EIGEN_CI_BUILD_TARGET: buildtests
# Reduce overall build size and compile time.
# Note: /d2ReducedOptimizeHugeFunctions is only available in VS 2019.
EIGEN_CI_TEST_CUSTOM_CXX_FLAGS: "/d2ReducedOptimizeHugeFunctions;/DEIGEN_STRONG_INLINE=inline;/Os"
script:
- ./ci/scripts/build.windows.script.ps1
tags:
- eigen-runner
- windows
- x86-64
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen"
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG-BUILD"
paths:
- ${EIGEN_CI_BUILDDIR}/
######### MSVC #################################################################
# MSVC 14.16 (VS 2017)
build:windows:x86-64:msvc-14.16:default:
extends: .build:windows
variables:
EIGEN_CI_MSVC_VER: "14.16"
# Override to remove unsupported /d2ReducedOptimizeHugeFunctions.
EIGEN_CI_TEST_CUSTOM_CXX_FLAGS: "/DEIGEN_STRONG_INLINE=inline;/Os"
# MSVC 14.29 (VS 2019)
build:windows:x86-64:msvc-14.29:default:
extends: .build:windows
variables:
EIGEN_CI_MSVC_VER: "14.29"
build:windows:x86-64:msvc-14.29:cxx03:
extends: build:windows:x86-64:msvc-14.29:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_CXX11=off"
build:windows:x86-64:msvc-14.29:avx2:
extends: build:windows:x86-64:msvc-14.29:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX2=on"
build:windows:x86-64:msvc-14.29:avx512dq:
extends: build:windows:x86-64:msvc-14.29:default
variables:
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX512DQ=on"
######### MSVC + CUDA ##########################################################
.build:windows:cuda:
extends: .build:windows
variables:
# Compute architectures present in the GitLab CI runners.
EIGEN_CI_CUDA_COMPUTE_ARCH: "50;75"
EIGEN_CI_BUILD_TARGET: buildtests_gpu
EIGEN_CI_ADDITIONAL_ARGS:
-DEIGEN_TEST_CUDA=on
-DEIGEN_CUDA_COMPUTE_ARCH=${EIGEN_CI_CUDA_COMPUTE_ARCH}
tags:
- eigen-runner
- windows
- x86-64
- cuda
# The CUDA 9.2 compiler crashes with an internal error.
# # MSVC 14.16 + CUDA 9.2
# build:windows:x86-64:cuda-9.2:msvc-14.16:
# extends: .build:windows:cuda
# variables:
# # CUDA 9.2 doesn't support sm_75.
# EIGEN_CI_CUDA_COMPUTE_ARCH: "50;70"
# # CUDA 9.2 only supports up to VS 2017.
# EIGEN_CI_MSVC_VER: "14.16"
# EIGEN_CI_TEST_CUSTOM_CXX_FLAGS: "/DEIGEN_STRONG_INLINE=inline;/Os"
# EIGEN_CI_BEFORE_SCRIPT: $$env:CUDA_PATH=$$env:CUDA_PATH_V9_2
# MSVC 14.29 + CUDA 10.2
build:windows:x86-64:cuda-10.2:msvc-14.29:
extends: .build:windows:cuda
variables:
EIGEN_CI_MSVC_VER: "14.29"
EIGEN_CI_BEFORE_SCRIPT: $$env:CUDA_PATH=$$env:CUDA_PATH_V10_2
# MSVC 14.29 + CUDA 11.4
build:windows:x86-64:cuda-11.4:msvc-14.29:
extends: .build:windows:cuda
variables:
EIGEN_CI_MSVC_VER: "14.29"
EIGEN_CI_BEFORE_SCRIPT: $$env:CUDA_PATH=$$env:CUDA_PATH_V11_4
######## MR Smoke Tests ########################################################
# MSVC 14.29 64-bit (VS 2019)
build:windows:x86-64:msvc-14.29:avx512dq:smoketest:
extends: build:windows:x86-64:msvc-14.29:avx512dq
variables:
EIGEN_CI_BUILD_TARGET: buildsmoketests
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# MSVC 14.29 32-bit (VS 2019)
build:windows:x86:msvc-14.29:avx512dq:smoketest:
extends: build:windows:x86-64:msvc-14.29:avx512dq:smoketest
variables:
EIGEN_CI_MSVC_ARCH: "x86"
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

View File

@ -0,0 +1,10 @@
checkformat:clangformat:
stage: checkformat
image: alpine:3.19
only:
- merge_requests
allow_failure: true
before_script:
- apk add --no-cache git clang17-extra-tools python3
script:
- git clang-format --diff --commit ${CI_MERGE_REQUEST_DIFF_BASE_SHA}

40
ci/common.gitlab-ci.yml Normal file
View File

@ -0,0 +1,40 @@
# Base configuration for linux builds and tests.
.common:linux:cross:
image: ubuntu:20.04
variables:
EIGEN_CI_TARGET_ARCH: ""
EIGEN_CI_ADDITIONAL_ARGS: ""
# If host matches target, use the following:
EIGEN_CI_C_COMPILER: ""
EIGEN_CI_CXX_COMPILER: ""
EIGEN_CI_INSTALL: "${EIGEN_CI_C_COMPILER} ${EIGEN_CI_CXX_COMPILER}"
# If host does not match the target, use the following:
EIGEN_CI_CROSS_TARGET_TRIPLE: ""
EIGEN_CI_CROSS_C_COMPILER: ${EIGEN_CI_C_COMPILER}
EIGEN_CI_CROSS_CXX_COMPILER: ${EIGEN_CI_CXX_COMPILER}
EIGEN_CI_CROSS_INSTALL: "${EIGEN_CI_CROSS_C_COMPILER} ${EIGEN_CI_CROSS_CXX_COMPILER}"
before_script:
# Call script in current shell - it sets up some environment variables.
- . ci/scripts/common.linux.before_script.sh
artifacts:
when: always
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG"
paths:
- ${EIGEN_CI_BUILDDIR}/
expire_in: 5 days
# Base configuration for Windows builds and tests.
.common:windows:
variables:
EIGEN_CI_MSVC_ARCH: x64
EIGEN_CI_MSVC_VER: "14.29"
EIGEN_CI_ADDITIONAL_ARGS: ""
EIGEN_CI_BEFORE_SCRIPT: ""
before_script:
- . ci/scripts/common.windows.before_script.ps1
artifacts:
when: always
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_NAME"
paths:
- ${EIGEN_CI_BUILDDIR}/
expire_in: 5 days

43
ci/deploy.gitlab-ci.yml Normal file
View File

@ -0,0 +1,43 @@
# Push a nightly tag if the pipeline succeeded.
deploy:tag:nightly:
stage: deploy
image: alpine:edge
dependencies: []
before_script:
- apk add git
script:
- git tag -f nightly $CI_COMMIT_SHORT_SHA
- git push -f $EIGEN_CI_GIT_PUSH_URL tag nightly
tags:
- linux
- eigen-runner
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_NAMESPACE == "libeigen" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# Upload docs if pipeline succeeded.
deploy:docs:
stage: deploy
image: busybox
dependencies: [ build:linux:doc ]
variables:
PAGES_PREFIX: docs-nightly
script:
- echo "Deploying site to $CI_PAGES_URL"
- mv ${EIGEN_CI_BUILDDIR}/doc/html public
pages:
path_prefix: $PAGES_PREFIX
expire_in: never
artifacts:
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG"
paths:
- public
tags:
- eigen-runner
- linux
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen"
variables:
PAGES_PREFIX: docs-$CI_COMMIT_REF_NAME

View File

@ -0,0 +1,31 @@
#!/bin/bash
set -x
# Create and enter build directory.
rootdir=`pwd`
mkdir -p ${EIGEN_CI_BUILDDIR}
cd ${EIGEN_CI_BUILDDIR}
# Configure build.
cmake -G Ninja \
-DCMAKE_CXX_COMPILER=${EIGEN_CI_CXX_COMPILER} \
-DCMAKE_C_COMPILER=${EIGEN_CI_C_COMPILER} \
-DCMAKE_CXX_COMPILER_TARGET=${EIGEN_CI_CXX_COMPILER_TARGET} \
${EIGEN_CI_ADDITIONAL_ARGS} ${rootdir}
target=""
if [[ ${EIGEN_CI_BUILD_TARGET} ]]; then
target="--target ${EIGEN_CI_BUILD_TARGET}"
fi
# Builds (particularly gcc) sometimes get killed, potentially when running
# out of resources. In that case, keep trying to build the remaining
# targets (k0), then try to build again with a single thread (j1) to minimize
# resource use.
cmake --build . ${target} -- -k0 || cmake --build . ${target} -- -k0 -j1
# Return to root directory.
cd ${rootdir}
set +x

View File

@ -0,0 +1,44 @@
# Find Visual Studio installation directory.
$VS_INSTALL_DIR = &"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
# Run VCVarsAll.bat initialization script and extract environment variables.
# http://allen-mack.blogspot.com/2008/03/replace-visual-studio-command-prompt.html
cmd.exe /c "`"${VS_INSTALL_DIR}\VC\Auxiliary\Build\vcvarsall.bat`" $EIGEN_CI_MSVC_ARCH -vcvars_ver=$EIGEN_CI_MSVC_VER & set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
# Create and enter build directory.
$rootdir = Get-Location
if (-Not (Test-Path ${EIGEN_CI_BUILDDIR})) {
mkdir $EIGEN_CI_BUILDDIR
}
cd $EIGEN_CI_BUILDDIR
# We need to split EIGEN_CI_ADDITIONAL_ARGS, otherwise they are interpreted
# as a single argument. Split by space, unless double-quoted.
$split_args = [regex]::Split(${EIGEN_CI_ADDITIONAL_ARGS}, ' (?=(?:[^"]|"[^"]*")*$)' )
# Configure build.
cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel `
-DEIGEN_TEST_CUSTOM_CXX_FLAGS="${EIGEN_CI_TEST_CUSTOM_CXX_FLAGS}" `
${split_args} "${rootdir}"
$target = ""
if (${EIGEN_CI_BUILD_TARGET}) {
$target = "--target ${EIGEN_CI_BUILD_TARGET}"
}
# Windows builds sometimes fail due heap errors. In that case, try
# building the rest, then try to build again with a single thread.
cmake --build . ${target} -- -k0 || cmake --build . ${target} -- -k0 -j1
$success = $LASTEXITCODE
# Return to root directory.
cd ${rootdir}
# Explicitly propagate exit code to indicate pass/failure of build command.
if($success -ne 0) { Exit $success }

View File

@ -0,0 +1,6 @@
git clone --depth 1 --branch $1 https://github.com/doxygen/doxygen.git
cmake -B doxygen/.build -G Ninja \
-DCMAKE_CXX_COMPILER=${EIGEN_CI_CXX_COMPILER} \
-DCMAKE_C_COMPILER=${EIGEN_CI_C_COMPILER} \
doxygen
cmake --build doxygen/.build -t install

View File

@ -0,0 +1,46 @@
#!/bin/bash
set -x
echo "Running ${CI_JOB_NAME}"
# Get architecture and display CI configuration.
export ARCH=`uname -m`
export NPROC=`nproc`
echo "arch=$ARCH, target=${EIGEN_CI_TARGET_ARCH}"
echo "Processors: ${NPROC}"
echo "CI Variables:"
export | grep EIGEN
# Set noninteractive, otherwise tzdata may be installed and prompt for a
# geographical region.
export DEBIAN_FRONTEND=noninteractive
apt-get update -y > /dev/null
apt-get install -y --no-install-recommends ninja-build cmake git > /dev/null
# Install required dependencies and set up compilers.
# These are required even for testing to ensure that dynamic runtime libraries
# are available.
if [[ "$ARCH" == "${EIGEN_CI_TARGET_ARCH}" || "${EIGEN_CI_TARGET_ARCH}" == "any" ]]; then
apt-get install -y --no-install-recommends ${EIGEN_CI_INSTALL} > /dev/null;
export EIGEN_CI_CXX_IMPLICIT_INCLUDE_DIRECTORIES="";
export EIGEN_CI_CXX_COMPILER_TARGET="";
else
apt-get install -y --no-install-recommends ${EIGEN_CI_CROSS_INSTALL} > /dev/null;
export EIGEN_CI_C_COMPILER=${EIGEN_CI_CROSS_C_COMPILER};
export EIGEN_CI_CXX_COMPILER=${EIGEN_CI_CROSS_CXX_COMPILER};
export EIGEN_CI_CXX_COMPILER_TARGET=${EIGEN_CI_CROSS_TARGET_TRIPLE};
# Tell the compiler where to find headers and libraries if using clang.
# NOTE: this breaks GCC since it messes with include path order
# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129)
if [[ "${EIGEN_CI_CROSS_CXX_COMPILER}" == *"clang"* ]]; then
export CPLUS_INCLUDE_PATH="/usr/${EIGEN_CI_CROSS_TARGET_TRIPLE}/include";
export LIBRARY_PATH="/usr/${EIGEN_CI_CROSS_TARGET_TRIPLE}/lib64";
fi
fi
echo "Compilers: ${EIGEN_CI_C_COMPILER} ${EIGEN_CI_CXX_COMPILER}"
if [ -n "$EIGEN_CI_BEFORE_SCRIPT" ]; then eval "$EIGEN_CI_BEFORE_SCRIPT"; fi
set +x

View File

@ -0,0 +1,8 @@
echo "Running ${CI_JOB_NAME}"
# Print configuration variables.
Get-Variable EIGEN* | Format-Table -Wrap
Get-Variable CMAKE* | Format-Table -Wrap
# Run a custom before-script command.
if ("${EIGEN_CI_BEFORE_SCRIPT}") { Invoke-Expression -Command "${EIGEN_CI_BEFORE_SCRIPT}" }

View File

@ -0,0 +1,19 @@
#!/bin/bash
set -x
# Enter build directory.
rootdir=`pwd`
cd ${EIGEN_CI_BUILDDIR}
# Install xml processor.
apt-get update -y
apt-get install --no-install-recommends -y xsltproc
# Generate test results.
xsltproc ${rootdir}/ci/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > "JUnitTestResults_$CI_JOB_ID.xml"
# Return to root directory.
cd ${rootdir}
set +x

View File

@ -0,0 +1,31 @@
#!/bin/bash
set -x
# Enter build directory.
rootdir=`pwd`
cd ${EIGEN_CI_BUILDDIR}
target=""
if [[ ${EIGEN_CI_CTEST_REGEX} ]]; then
target="-R ${EIGEN_CI_CTEST_REGEX}"
elif [[ ${EIGEN_CI_CTEST_LABEL} ]]; then
target="-L ${EIGEN_CI_CTEST_LABEL}"
fi
# Repeat tests up to three times to ignore flakes. Do not re-run with -T test,
# otherwise we lose test results for those that passed.
# Note: starting with CMake 3.17, we can use --repeat until-pass:3, but we have
# no way of easily installing this on ppc64le.
ctest ${EIGEN_CI_CTEST_ARGS} --parallel ${NPROC} \
--output-on-failure --no-compress-output \
--build-no-clean -T test ${target} || \
ctest ${EIGEN_CI_CTEST_ARGS} --parallel ${NPROC} \
--output-on-failure --no-compress-output --rerun-failed || \
ctest ${EIGEN_CI_CTEST_ARGS} --parallel ${NPROC} \
--output-on-failure --no-compress-output --rerun-failed
# Return to root directory.
cd ${rootdir}
set +x

View File

@ -0,0 +1,17 @@
# Change to build directory.
$rootdir = Get-Location
cd ${EIGEN_CI_BUILDDIR}
# Determine the appropriate test tag and results file.
$TEST_TAG = Get-Content Testing\TAG | select -first 1
# PowerShell equivalent to xsltproc:
$XSL_FILE = Resolve-Path "..\ci\CTest2JUnit.xsl"
$INPUT_FILE = Resolve-Path Testing\$TEST_TAG\Test.xml
$OUTPUT_FILE = Join-Path -Path $pwd -ChildPath JUnitTestResults_$CI_JOB_ID.xml
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform;
$xslt.Load($XSL_FILE)
$xslt.Transform($INPUT_FILE,$OUTPUT_FILE)
# Return to root directory.
cd ${rootdir}

View File

@ -0,0 +1,30 @@
# Change to build directory.
$rootdir = Get-Location
cd $EIGEN_CI_BUILDDIR
# Determine number of processors for parallel tests.
$NPROC=${Env:NUMBER_OF_PROCESSORS}
# Set target based on regex or label.
$target = ""
if (${EIGEN_CI_CTEST_REGEX}) {
$target = "-R","${EIGEN_CI_CTEST_REGEX}"
} elseif (${EIGEN_CI_CTEST_LABEL}) {
$target = "-L","${EIGEN_CI_CTEST_LABEL}"
}
# Repeat tests up to three times to ignore flakes. Do not re-run with -T test,
# otherwise we lose test results for those that passed.
# Note: starting with CMake 3.17, we can use --repeat until-pass:3, but we have
# no way of easily installing this on ppc64le.
ctest $EIGEN_CI_CTEST_ARGS -j$NPROC --output-on-failure --no-compress-output --build-no-clean -T test $target || `
ctest $EIGEN_CI_CTEST_ARGS -j$NPROC --output-on-failure --no-compress-output --rerun-failed || `
ctest $EIGEN_CI_CTEST_ARGS -j$NPROC --output-on-failure --no-compress-output --rerun-failed
$success = $LASTEXITCODE
# Return to root directory.
cd ${rootdir}
# Explicitly propagate exit code to indicate pass/failure of test command.
if($success -ne 0) { Exit $success }

14
ci/scripts/vars.linux.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# Initialize default variables used by the CI.
export EIGEN_CI_ADDITIONAL_ARGS=""
export EIGEN_CI_BEFORE_SCRIPT=""
export EIGEN_CI_BUILD_TARGET="buildtests"
export EIGEN_CI_BUILDDIR=".build"
export EIGEN_CI_C_COMPILER="clang"
export EIGEN_CI_CXX_COMPILER="clang++"
export EIGEN_CI_TEST_CUSTOM_CXX_FLAGS=""
export EIGEN_CI_CTEST_LABEL="Official"
export EIGEN_CI_CTEST_REGEX=""
export EIGEN_CI_CTEST_ARGS=""

View File

@ -0,0 +1,11 @@
# Initialize default variables used by the CI.
$EIGEN_CI_ADDITIONAL_ARGS = ""
$EIGEN_CI_BEFORE_SCRIPT = ""
$EIGEN_CI_BUILD_TARGET = "buildtests"
$EIGEN_CI_BUILDDIR = ".build"
$EIGEN_CI_MSVC_ARCH = "x64"
$EIGEN_CI_MSVC_VER = "14.29"
$EIGEN_CI_TEST_CUSTOM_CXX_FLAGS = "/d2ReducedOptimizeHugeFunctions /DEIGEN_STRONG_INLINE=inline /Os"
$EIGEN_CI_CTEST_LABEL = "Official"
$EIGEN_CI_CTEST_REGEX = ""
$EIGEN_CI_CTEST_ARGS = ""

107
ci/smoketests.gitlab-ci.yml Normal file
View File

@ -0,0 +1,107 @@
.buildsmoketests:linux:base:
stage: buildsmoketests
image: ubuntu:18.04
before_script:
- apt-get update -y
- apt-get install -y --no-install-recommends software-properties-common
- add-apt-repository -y ppa:ubuntu-toolchain-r/test
- apt-get update
- apt-get install --no-install-recommends -y ${EIGEN_CI_CXX_COMPILER}
${EIGEN_CI_CC_COMPILER} cmake ninja-build
script:
- mkdir -p ${BUILDDIR} && cd ${BUILDDIR}
- CXX=${EIGEN_CI_CXX_COMPILER} CC=${EIGEN_CI_CC_COMPILER} cmake -G
${EIGEN_CI_CMAKE_GENEATOR} -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11}
${EIGEN_CI_ADDITIONAL_ARGS} ..
- cmake --build . --target buildsmoketests
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- ${BUILDDIR}/
expire_in: 5 days
only:
- merge_requests
buildsmoketests:x86-64:linux:gcc-10:cxx11-off:
extends: .buildsmoketests:linux:base
variables:
EIGEN_CI_CXX_COMPILER: "g++-10"
EIGEN_CI_CC_COMPILER: "gcc-10"
EIGEN_TEST_CXX11: "off"
buildsmoketests:x86-64:linux:gcc-10:cxx11-on:
extends: .buildsmoketests:linux:base
variables:
EIGEN_CI_CXX_COMPILER: "g++-10"
EIGEN_CI_CC_COMPILER: "gcc-10"
EIGEN_TEST_CXX11: "on"
buildsmoketests:x86-64:linux:clang-10:cxx11-off:
extends: .buildsmoketests:linux:base
variables:
EIGEN_CI_CXX_COMPILER: "clang++-10"
EIGEN_CI_CC_COMPILER: "clang-10"
EIGEN_TEST_CXX11: "off"
buildsmoketests:x86-64:linux:clang-10:cxx11-on:
extends: .buildsmoketests:linux:base
variables:
EIGEN_CI_CXX_COMPILER: "clang++-10"
EIGEN_CI_CC_COMPILER: "clang-10"
EIGEN_TEST_CXX11: "on"
.smoketests:linux:base:
stage: smoketests
image: ubuntu:18.04
before_script:
- apt-get update -y
- apt-get install -y --no-install-recommends software-properties-common
- add-apt-repository -y ppa:ubuntu-toolchain-r/test
- apt-get update
- apt-get install --no-install-recommends -y ${EIGEN_CI_CXX_COMPILER}
${EIGEN_CI_CC_COMPILER} cmake ninja-build xsltproc
script:
- export CXX=${EIGEN_CI_CXX_COMPILER}
- export CC=${EIGEN_CI_CC_COMPILER}
- cd ${BUILDDIR} && ctest --output-on-failure --no-compress-output
--build-no-clean -T test -L smoketest
after_script:
- apt-get update -y
- apt-get install --no-install-recommends -y xsltproc
- cd ${BUILDDIR}
- xsltproc ../ci/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > "JUnitTestResults_$CI_JOB_ID.xml"
artifacts:
reports:
junit:
- ${BUILDDIR}/JUnitTestResults_$CI_JOB_ID.xml
expire_in: 5 days
only:
- merge_requests
smoketests:x86-64:linux:gcc-10:cxx11-off:
extends: .smoketests:linux:base
variables:
EIGEN_CI_CXX_COMPILER: g++-10
EIGEN_CI_CC_COMPILER: gcc-10
needs: [ "buildsmoketests:x86-64:linux:gcc-10:cxx11-off" ]
smoketests:x86-64:linux:gcc-10:cxx11-on:
extends: .smoketests:linux:base
variables:
EIGEN_CI_CXX_COMPILER: g++-10
EIGEN_CI_CC_COMPILER: gcc-10
needs: [ "buildsmoketests:x86-64:linux:gcc-10:cxx11-on" ]
smoketests:x86-64:linux:clang-10:cxx11-off:
extends: .smoketests:linux:base
variables:
EIGEN_CI_CXX_COMPILER: clang++-10
EIGEN_CI_CC_COMPILER: clang-10
needs: [ "buildsmoketests:x86-64:linux:clang-10:cxx11-off" ]
smoketests:x86-64:linux:clang-10:cxx11-on:
extends: .smoketests:linux:base
variables:
EIGEN_CI_CXX_COMPILER: clang++-10
EIGEN_CI_CC_COMPILER: clang-10
needs: [ "buildsmoketests:x86-64:linux:clang-10:cxx11-on" ]

439
ci/test.linux.gitlab-ci.yml Normal file
View File

@ -0,0 +1,439 @@
.test:linux:
extends: .common:linux:cross
stage: test
script:
- . ci/scripts/test.linux.script.sh
after_script:
- . ci/scripts/test.linux.after_script.sh
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen"
##### x86-64 ###################################################################
.test:linux:x86-64:
extends: .test:linux
variables:
EIGEN_CI_TARGET_ARCH: x86_64
EIGEN_CI_CROSS_TARGET_TRIPLE: x86_64-linux-gnu
tags:
- eigen-runner
- linux
- x86-64
# GCC-6 (minimum on Ubuntu 18.04)
.test:linux:x86-64:gcc-6:default:
extends: .test:linux:x86-64
image: ubuntu:18.04
needs: [ build:linux:cross:x86-64:gcc-6:default ]
variables:
EIGEN_CI_INSTALL: g++-6
test:linux:x86-64:gcc-6:default:official:
extends: .test:linux:x86-64:gcc-6:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:gcc-6:default:unsupported:
extends: .test:linux:x86-64:gcc-6:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
# GCC-10 (modern stable)
.test:linux:x86-64:gcc-10:default:
extends: .test:linux:x86-64
needs: [ build:linux:cross:x86-64:gcc-10:default ]
variables:
EIGEN_CI_INSTALL: g++-10
test:linux:x86-64:gcc-10:cxx03:
extends: .test:linux:x86-64:gcc-10:default
needs: [ build:linux:cross:x86-64:gcc-10:cxx03 ]
test:linux:x86-64:gcc-10:default:official:
extends: .test:linux:x86-64:gcc-10:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:gcc-10:default:unsupported:
extends: .test:linux:x86-64:gcc-10:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:x86-64:gcc-10:avx:
extends: .test:linux:x86-64
needs: [ build:linux:cross:x86-64:gcc-10:avx ]
variables:
EIGEN_CI_INSTALL: g++-10
test:linux:x86-64:gcc-10:avx:official:
extends: .test:linux:x86-64:gcc-10:avx
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:gcc-10:avx:unsupported:
extends: .test:linux:x86-64:gcc-10:avx
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:x86-64:gcc-10:avx2:
extends: .test:linux:x86-64
needs: [ build:linux:cross:x86-64:gcc-10:avx2 ]
variables:
EIGEN_CI_INSTALL: g++-10
test:linux:x86-64:gcc-10:avx2:official:
extends: .test:linux:x86-64:gcc-10:avx2
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:gcc-10:avx2:unsupported:
extends: .test:linux:x86-64:gcc-10:avx2
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:x86-64:gcc-10:avx512dq:
extends: .test:linux:x86-64
needs: [ build:linux:cross:x86-64:gcc-10:avx512dq ]
variables:
EIGEN_CI_INSTALL: g++-10
tags:
- eigen-runner
- linux
- x86-64
- avx512
test:linux:x86-64:gcc-10:avx512dq:official:
extends: .test:linux:x86-64:gcc-10:avx512dq
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:gcc-10:avx512dq:unsupported:
extends: .test:linux:x86-64:gcc-10:avx512dq
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
# Clang-6 (minimum on Ubuntu 20.04)
.test:linux:x86-64:clang-6:default:
extends: .test:linux:x86-64
image: ubuntu:20.04
needs: [ build:linux:cross:x86-64:clang-6:default ]
variables:
EIGEN_CI_INSTALL: g++-8 clang-6.0 lld-6.0
test:linux:x86-64:clang-6:default:official:
extends: .test:linux:x86-64:clang-6:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:clang-6:default:unsupported:
extends: .test:linux:x86-64:clang-6:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
# Clang-12 (modern stable)
.test:linux:x86-64:clang-12:default:
extends: .test:linux:x86-64
needs: [ build:linux:cross:x86-64:clang-12:default ]
variables:
EIGEN_CI_INSTALL: clang-12
test:linux:x86-64:clang-12:default:official:
extends: .test:linux:x86-64:clang-12:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:clang-12:default:unsupported:
extends: .test:linux:x86-64:clang-12:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:x86-64:clang-12:avx:
extends: .test:linux:x86-64
needs: [ build:linux:cross:x86-64:clang-12:avx ]
variables:
EIGEN_CI_INSTALL: clang-12
test:linux:x86-64:clang-12:avx:official:
extends: .test:linux:x86-64:clang-12:avx
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:clang-12:avx:unsupported:
extends: .test:linux:x86-64:clang-12:avx
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:x86-64:clang-12:avx2:
extends: .test:linux:x86-64
needs: [ build:linux:cross:x86-64:clang-12:avx2 ]
variables:
EIGEN_CI_INSTALL: clang-12
test:linux:x86-64:clang-12:avx2:official:
extends: .test:linux:x86-64:clang-12:avx2
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:clang-12:avx2:unsupported:
extends: .test:linux:x86-64:clang-12:avx2
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:x86-64:clang-12:avx512dq:
extends: .test:linux:x86-64
needs: [ build:linux:cross:x86-64:clang-12:avx512dq ]
variables:
EIGEN_CI_INSTALL: clang-12
tags:
- eigen-runner
- linux
- x86-64
- avx512
test:linux:x86-64:clang-12:avx512dq:official:
extends: .test:linux:x86-64:clang-12:avx512dq
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:x86-64:clang-12:avx512dq:unsupported:
extends: .test:linux:x86-64:clang-12:avx512dq
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
##### CUDA #####################################################################
.test:linux:cuda:
extends: .test:linux
allow_failure: true
variables:
EIGEN_CI_CTEST_LABEL: gpu
tags:
- eigen-runner
- linux
- x86-64
- cuda
# NVidia no longer provides docker images < CUDA 11.0.3.
# # GCC-7, CUDA-9.2
# test:linux:cuda-9.2:gcc-7:
# extends: .test:linux:cuda
# image: nvidia/cuda:9.2-devel-ubuntu18.04
# needs: [ build:linux:cuda-9.2:gcc-7 ]
# variables:
# EIGEN_CI_CXX_COMPILER: g++-7
# EIGEN_CI_CC_COMPILER: gcc-7
# # Clang-10, CUDA-9.2
# test:linux:cuda-9.2:clang-10:
# extends: .test:linux:cuda
# image: nvidia/cuda:9.2-devel-ubuntu18.04
# needs: [ build:linux:cuda-9.2:clang-10 ]
# variables:
# EIGEN_CI_CXX_COMPILER: clang++-10
# EIGEN_CI_CC_COMPILER: clang-10
# # GCC-8, CUDA-10.2
# test:linux:cuda-10.2:gcc-8:
# extends: .test:linux:cuda
# image: nvidia/cuda:10.2-devel-ubuntu18.04
# needs: [ build:linux:cuda-10.2:gcc-8 ]
# variables:
# EIGEN_CI_CXX_COMPILER: g++-8
# EIGEN_CI_CC_COMPILER: gcc-8
# # Clang-10, CUDA-10.2
# test:linux:cuda-10.2:clang-10:
# extends: .test:linux:cuda
# image: nvidia/cuda:10.2-devel-ubuntu18.04
# needs: [ build:linux:cuda-10.2:clang-10 ]
# variables:
# EIGEN_CI_CXX_COMPILER: clang++-10
# EIGEN_CI_CC_COMPILER: clang-10
# GCC-10, CUDA-11.4
test:linux:cuda-11.4:gcc-10:
extends: .test:linux:cuda
image: nvidia/cuda:11.4.3-devel-ubuntu20.04
needs: [ build:linux:cuda-11.4:gcc-10 ]
variables:
EIGEN_CI_CXX_COMPILER: g++-10
EIGEN_CI_CC_COMPILER: gcc-10
# Clang-12, CUDA-11.4
test:linux:cuda-11.4:clang-12:
extends: .test:linux:cuda
image: nvidia/cuda:11.4.3-devel-ubuntu20.04
needs: [ build:linux:cuda-11.4:clang-12 ]
variables:
EIGEN_CI_CXX_COMPILER: clang++-12
EIGEN_CI_CC_COMPILER: clang-12
# GCC-10, CUDA-12.2
test:linux:cuda-12.2:gcc-10:
extends: .test:linux:cuda
image: nvidia/cuda:12.2.0-devel-ubuntu20.04
needs: [ build:linux:cuda-12.2:gcc-10 ]
variables:
EIGEN_CI_CXX_COMPILER: g++-10
EIGEN_CI_CC_COMPILER: gcc-10
# Clang-12, CUDA-12.2
test:linux:cuda-12.2:clang-12:
extends: .test:linux:cuda
image: nvidia/cuda:12.2.0-devel-ubuntu20.04
needs: [ build:linux:cuda-12.2:clang-12 ]
variables:
EIGEN_CI_CXX_COMPILER: clang++-12
EIGEN_CI_CC_COMPILER: clang-12
##### arm ######################################################################
.test:linux:arm:
extends: .test:linux
variables:
EIGEN_CI_TARGET_ARCH: arm
EIGEN_CI_CROSS_TARGET_TRIPLE: arm-linux-gnueabihf
# Enable cross-compiled arm binary to run on aarch64.
EIGEN_CI_BEFORE_SCRIPT: "ln -s /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ && export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib/"
tags:
- eigen-runner
- linux
- aarch64
.test:linux:arm:gcc-10:default:
extends: .test:linux:arm
needs: [ build:linux:cross:arm:gcc-10:default ]
variables:
EIGEN_CI_CROSS_INSTALL: g++-10-arm-linux-gnueabihf
test:linux:arm:gcc-10:default:official:
extends: .test:linux:arm:gcc-10:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:arm:gcc-10:default:unsupported:
extends: .test:linux:arm:gcc-10:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:arm:clang-12:default:
extends: .test:linux:arm
needs: [ build:linux:cross:arm:clang-12:default ]
variables:
EIGEN_CI_CROSS_INSTALL: g++-10-arm-linux-gnueabihf clang-12
test:linux:arm:clang-12:default:official:
extends: .test:linux:arm:clang-12:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:arm:clang-12:default:unsupported:
extends: .test:linux:arm:clang-12:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
##### aarch64 ##################################################################
.test:linux:aarch64:
extends: .test:linux
variables:
EIGEN_CI_TARGET_ARCH: aarch64
EIGEN_CI_CROSS_TARGET_TRIPLE: aarch64-linux-gnu
tags:
- eigen-runner
- linux
- aarch64
.test:linux:aarch64:gcc-10:default:
extends: .test:linux:aarch64
needs: [ build:linux:cross:aarch64:gcc-10:default ]
variables:
EIGEN_CI_INSTALL: g++-10
test:linux:aarch64:gcc-10:default:official:
extends: .test:linux:aarch64:gcc-10:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:aarch64:gcc-10:default:unsupported:
extends: .test:linux:aarch64:gcc-10:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:aarch64:clang-12:default:
extends: .test:linux:aarch64
needs: [ build:linux:cross:aarch64:clang-12:default ]
variables:
EIGEN_CI_INSTALL: clang-12
test:linux:aarch64:clang-12:default:official:
extends: .test:linux:aarch64:clang-12:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:aarch64:clang-12:default:unsupported:
extends: .test:linux:aarch64:clang-12:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
##### ppc64le ##################################################################
.test:linux:ppc64le:
extends: .test:linux
variables:
EIGEN_CI_TARGET_ARCH: ppc64le
EIGEN_CI_CROSS_TARGET_TRIPLE: powerpc64le-linux-gnu
tags:
- eigen-runner
- linux
- ppc64le
.test:linux:ppc64le:gcc-10:default:
extends: .test:linux:ppc64le
needs: [ build:linux:cross:ppc64le:gcc-10:default ]
variables:
EIGEN_CI_INSTALL: g++-10
test:linux:ppc64le:gcc-10:default:official:
extends: .test:linux:ppc64le:gcc-10:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:ppc64le:gcc-10:default:unsupported:
extends: .test:linux:ppc64le:gcc-10:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:linux:ppc64le:clang-12:default:
extends: .test:linux:ppc64le
needs: [ build:linux:cross:ppc64le:clang-12:default ]
variables:
EIGEN_CI_INSTALL: clang-12
test:linux:ppc64le:clang-12:default:official:
extends: .test:linux:ppc64le:clang-12:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:linux:ppc64le:clang-12:default:unsupported:
extends: .test:linux:ppc64le:clang-12:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
##### MR Smoke Tests ###########################################################
test:linux:x86-64:gcc-10:default:smoketest:
extends: .test:linux:x86-64:gcc-10:default
needs: [ build:linux:cross:x86-64:gcc-10:default:smoketest ]
variables:
EIGEN_CI_CTEST_LABEL: smoketest
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
test:linux:x86-64:clang-12:default:smoketest:
extends: .test:linux:x86-64:clang-12:default
needs: [ build:linux:cross:x86-64:clang-12:default:smoketest ]
variables:
EIGEN_CI_CTEST_LABEL: smoketest
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

View File

@ -0,0 +1,112 @@
.test:windows:
extends: .common:windows
stage: test
script:
- ./ci/scripts/test.windows.script.ps1
after_script:
- ./ci/scripts/test.windows.after_script.ps1
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen"
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen"
tags:
- eigen-runner
- windows
- x86-64
##### MSVC #####################################################################
# MSVC 14.16 (VS 2017)
.test:windows:x86-64:msvc-14.16:default:
extends: .test:windows
needs: [ build:windows:x86-64:msvc-14.16:default ]
test:windows:x86-64:msvc-14.16:default:official:
extends: .test:windows:x86-64:msvc-14.16:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:windows:x86-64:msvc-14.16:default:unsupported:
extends: .test:windows:x86-64:msvc-14.16:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
# MSVC 14.29 (VS 2019)
.test:windows:x86-64:msvc-14.29:default:
extends: .test:windows
needs: [ build:windows:x86-64:msvc-14.29:default ]
test:windows:x86-64:msvc-14.29:default:official:
extends: .test:windows:x86-64:msvc-14.29:default
needs: [ build:windows:x86-64:msvc-14.29:cxx03 ]
test:windows:x86-64:msvc-14.29:default:official:
extends: .test:windows:x86-64:msvc-14.29:default
variables:
EIGEN_CI_CTEST_LABEL: Official
test:windows:x86-64:msvc-14.29:default:unsupported:
extends: .test:windows:x86-64:msvc-14.29:default
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:windows:x86-64:msvc-14.29:avx2:
extends: .test:windows
needs: [ build:windows:x86-64:msvc-14.29:avx2 ]
test:windows:x86-64:msvc-14.29:avx2:official:
extends: .test:windows:x86-64:msvc-14.29:avx2
variables:
EIGEN_CI_CTEST_LABEL: Official
test:windows:x86-64:msvc-14.29:avx2:unsupported:
extends: .test:windows:x86-64:msvc-14.29:avx2
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
.test:windows:x86-64:msvc-14.29:avx512dq:
extends: .test:windows
needs: [ build:windows:x86-64:msvc-14.29:avx512dq ]
tags:
- eigen-runner
- windows
- x86-64
- avx512
test:windows:x86-64:msvc-14.29:avx512dq:official:
extends: .test:windows:x86-64:msvc-14.29:avx512dq
variables:
EIGEN_CI_CTEST_LABEL: Official
test:windows:x86-64:msvc-14.29:avx512dq:unsupported:
extends: .test:windows:x86-64:msvc-14.29:avx512dq
variables:
EIGEN_CI_CTEST_LABEL: Unsupported
##### MSVC + CUDA ##############################################################
.test:windows:cuda:
extends: .test:windows
allow_failure: true
variables:
EIGEN_CI_CTEST_LABEL: gpu
tags:
- eigen-runner
- windows
- x86-64
- cuda
# The CUDA 9.2 compiler crashes with an internal error.
# # MSVC 14.16 + CUDA 9.2
# test:windows:x86-64:cuda-9.2:msvc-14.16:
# extends: .test:windows:cuda
# needs: [ build:windows:x86-64:cuda-9.2:msvc-14.16 ]
# MSVC 14.29 + CUDA 10.2
test:windows:x86-64:cuda-10.2:msvc-14.29:
extends: .test:windows:cuda
needs: [ build:windows:x86-64:cuda-10.2:msvc-14.29 ]
# MSVC 14.29 + CUDA 11.4
test:windows:x86-64:cuda-11.4:msvc-14.29:
extends: .test:windows:cuda
needs: [ build:windows:x86-64:cuda-11.4:msvc-14.29 ]