mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-18 07:39:37 +08:00
Add possibility to split test suit build targets and improved CI configuration
- Introduce CMake option `EIGEN_SPLIT_TESTSUITE` that allows to divide the single test build target into several subtargets - Add CI pipeline for merge request that can be run by GitLab's shared runners - Add nightly CI pipeline
This commit is contained in:
parent
d10b27fe37
commit
fe8c3ef3cb
1
.gitignore
vendored
1
.gitignore
vendored
@ -35,3 +35,4 @@ lapack/reference
|
||||
.*project
|
||||
.settings
|
||||
Makefile
|
||||
!ci/build-tests.gitlab-ci.yml
|
||||
|
@ -13,78 +13,10 @@ stages:
|
||||
- doc
|
||||
|
||||
variables:
|
||||
CMAKE_GENERATOR: "Ninja"
|
||||
BUILDDIR: builddir
|
||||
BUILDDIR: builddir
|
||||
EIGEN_CI_CMAKE_GENEATOR: "Ninja"
|
||||
EIGEN_CI_TESTSUITE_SIZE: 15
|
||||
|
||||
.build-tests:
|
||||
allow_failure: true
|
||||
stage: build
|
||||
image: fedora:31
|
||||
before_script:
|
||||
- dnf -y install gcc-c++-9.2.1 cmake make ninja-build
|
||||
script:
|
||||
- cmake -B ${BUILDDIR} -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11}
|
||||
- cmake --build ${BUILDDIR} --target buildtests
|
||||
cache:
|
||||
key: "build-cache-cxx11-${EIGEN_TEST_CXX11}"
|
||||
paths:
|
||||
- ${BUILDDIR}/
|
||||
policy: push
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ${BUILDDIR}/
|
||||
expire_in: 5 days
|
||||
|
||||
.run_tests:
|
||||
allow_failure: true
|
||||
stage: test
|
||||
image: fedora:31
|
||||
before_script:
|
||||
- dnf -y install gcc-c++-9.2.1 cmake make ninja-build
|
||||
script:
|
||||
- cd ${BUILDDIR} && ctest --output-on-failure
|
||||
cache:
|
||||
key: "build-cache-cxx11-${EIGEN_TEST_CXX11}"
|
||||
paths:
|
||||
- ${BUILDDIR}/
|
||||
policy: pull
|
||||
|
||||
build-test-cxx11-on:
|
||||
extends: .build-tests
|
||||
variables:
|
||||
EIGEN_TEST_CXX11: "ON"
|
||||
|
||||
build-test-cxx11-off:
|
||||
extends: .build-tests
|
||||
variables:
|
||||
EIGEN_TEST_CXX11: "OFF"
|
||||
|
||||
run-tests-cxx11-on:
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_TEST_CXX11: "ON"
|
||||
needs: ["build-test-cxx11-on"]
|
||||
|
||||
run-tests-cxx11-off:
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_TEST_CXX11: "OFF"
|
||||
needs: ["build-test-cxx11-off"]
|
||||
|
||||
build-doc:
|
||||
image: fedora:31
|
||||
only:
|
||||
- schedules
|
||||
stage: doc
|
||||
before_script:
|
||||
- dnf -y install gcc-c++-9.2.1 cmake make doxygen doxygen-latex
|
||||
script:
|
||||
- cmake -G "Unix Makefiles" -B ${BUILDDIR} -DCMAKE_BUILD_TYPE=Release
|
||||
- cmake --build ${BUILDDIR} --target doc
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_JOB_ID"
|
||||
paths:
|
||||
- ${BUILDDIR}/doc/html
|
||||
expire_in: 2 days
|
||||
needs: []
|
||||
include:
|
||||
- "/ci/build-tests.gitlab-ci.yml"
|
||||
- "/ci/run-tests.gitlab-ci.yml"
|
||||
|
@ -664,3 +664,7 @@ install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/UseEigen3.cmake
|
||||
# Add uninstall target
|
||||
add_custom_target ( uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/EigenUninstall.cmake)
|
||||
|
||||
if (EIGEN_SPLIT_TESTSUITE)
|
||||
ei_split_testsuite("${EIGEN_SPLIT_TESTSUITE}")
|
||||
endif()
|
120
ci/CTest2JUnit.xsl
Normal file
120
ci/CTest2JUnit.xsl
Normal 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>
|
131
ci/build-tests.gitlab-ci.yml
Normal file
131
ci/build-tests.gitlab-ci.yml
Normal file
@ -0,0 +1,131 @@
|
||||
.build-tests-base:
|
||||
stage: build
|
||||
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}
|
||||
- echo "CXX=${EIGEN_CI_CXX_COMPILER} CC=${EIGEN_CI_CC_COMPILER} cmake -G ${EIGEN_CI_CMAKE_GENEATOR} -DEIGEN_SPLIT_TESTSUITE=${EIGEN_CI_TESTSUITE_SIZE} -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11} ${EIGEN_CI_ADDITIONAL_ARGS} .."
|
||||
- CXX=${EIGEN_CI_CXX_COMPILER} CC=${EIGEN_CI_CC_COMPILER} cmake -G ${EIGEN_CI_CMAKE_GENEATOR} -DEIGEN_SPLIT_TESTSUITE=${EIGEN_CI_TESTSUITE_SIZE} -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11} ${EIGEN_CI_ADDITIONAL_ARGS}..
|
||||
- echo "cmake --build . --target buildtestspart${EIGEN_CI_TESTSUITE_PART}"
|
||||
- cmake --build . --target buildtestspart${EIGEN_CI_TESTSUITE_PART}
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ${BUILDDIR}/
|
||||
expire_in: 5 days
|
||||
|
||||
# Base for all build jobs building the whole testsuite in one job. Note that
|
||||
# this cannot be run on GitLab's shared runners due to their timeout.
|
||||
.build-tests-single-base:
|
||||
extends: .build-tests-base
|
||||
script:
|
||||
- mkdir -p ${BUILDDIR} && cd ${BUILDDIR}
|
||||
- echo "CXX=${EIGEN_CI_CXX_COMPILER} CC=${EIGEN_CI_CC_COMPILER} cmake -G ${EIGEN_CI_CMAKE_GENEATOR} -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11} ${EIGEN_CI_CXX_FLAGS} ${EIGEN_CI_ADDITIONAL_ARGS}.."
|
||||
- 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}..
|
||||
- echo "cmake --build . --target buildtests"
|
||||
- cmake --build . --target buildtests
|
||||
tags:
|
||||
- eigen-runner
|
||||
- x86
|
||||
- linux
|
||||
only:
|
||||
- schedules
|
||||
|
||||
# Base for all build jobs using a splitted testsuite such that the job can be
|
||||
# run on GitLab's own shared runners
|
||||
.build-tests-split-base:
|
||||
extends: .build-tests-base
|
||||
script:
|
||||
- mkdir -p ${BUILDDIR} && cd ${BUILDDIR}
|
||||
- echo "CXX=${EIGEN_CI_CXX_COMPILER} CC=${EIGEN_CI_CC_COMPILER} cmake -G ${EIGEN_CI_CMAKE_GENEATOR} -DEIGEN_SPLIT_TESTSUITE=${EIGEN_CI_TESTSUITE_SIZE} -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11} ${EIGEN_CI_CXX_FLAGS} -DEIGEN_TEST_AVX=On -DEIGEN_TEST_AVX2=On .."
|
||||
- CXX=${EIGEN_CI_CXX_COMPILER} CC=${EIGEN_CI_CC_COMPILER} cmake -G ${EIGEN_CI_CMAKE_GENEATOR} -DEIGEN_SPLIT_TESTSUITE=${EIGEN_CI_TESTSUITE_SIZE} -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11} -DEIGEN_TEST_AVX=On -DEIGEN_TEST_AVX2=On ..
|
||||
- echo "cmake --build . --target buildtestspart${EIGEN_CI_TESTSUITE_PART}"
|
||||
- cmake --build . --target buildtestspart${EIGEN_CI_TESTSUITE_PART}
|
||||
only:
|
||||
- merge_requests
|
||||
|
||||
########################## Nightly running jobs ################################
|
||||
|
||||
# GCC 4.8
|
||||
# This is the oldest GCC version we support
|
||||
build-tests-g++-4.8-cxx11-on:
|
||||
extends: .build-tests-single-base
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: "g++-4.8"
|
||||
EIGEN_CI_CC_COMPILER: "gcc-4.8"
|
||||
EIGEN_TEST_CXX11: "on"
|
||||
|
||||
build-tests-g++-4.8-cxx11-off:
|
||||
extends: .build-tests-single-base
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: "g++-4.8"
|
||||
EIGEN_CI_CC_COMPILER: "gcc-4.8"
|
||||
EIGEN_TEST_CXX11: "off"
|
||||
|
||||
# Clang 10
|
||||
build-tests-clang++-10-cxx11-on:
|
||||
extends: .build-tests-single-base
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: "clang++-10"
|
||||
EIGEN_CI_CC_COMPILER: "clang-10"
|
||||
EIGEN_TEST_CXX11: "on"
|
||||
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX=On -DEIGEN_TEST_AVX2=On"
|
||||
|
||||
build-tests-clang++-10-cxx11-off:
|
||||
extends: .build-tests-single-base
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: "clang++-10"
|
||||
EIGEN_CI_CC_COMPILER: "clang-10"
|
||||
EIGEN_TEST_CXX11: "off"
|
||||
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX=On -DEIGEN_TEST_AVX2=On"
|
||||
|
||||
# GCC 10
|
||||
build-tests-g++-10-cxx11-off:
|
||||
extends: .build-tests-single-base
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: "g++-10"
|
||||
EIGEN_CI_CC_COMPILER: "gcc-10"
|
||||
EIGEN_TEST_CXX11: "off"
|
||||
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX=On -DEIGEN_TEST_AVX2=On"
|
||||
|
||||
build-tests-g++-10-cxx11-on:
|
||||
extends: .build-tests-single-base
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: "g++-10"
|
||||
EIGEN_CI_CC_COMPILER: "gcc-10"
|
||||
EIGEN_TEST_CXX11: "on"
|
||||
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX=On -DEIGEN_TEST_AVX2=On"
|
||||
|
||||
########################### Merge request jobs #################################
|
||||
|
||||
# GCC 10
|
||||
build-tests-g++-9-cxx11-on-mr:
|
||||
only:
|
||||
- merge_requests
|
||||
extends: .build-tests-split-base
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: "g++-9"
|
||||
EIGEN_CI_CC_COMPILER: "gcc-9"
|
||||
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX=On -DEIGEN_TEST_AVX2=On"
|
||||
parallel:
|
||||
matrix:
|
||||
- EIGEN_CI_TESTSUITE_PART: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
|
||||
EIGEN_TEST_CXX11: "on"
|
||||
|
||||
build-tests-g++-9-cxx11-off-mr:
|
||||
only:
|
||||
- merge_requests
|
||||
extends: .build-tests-split-base
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: "g++-9"
|
||||
EIGEN_CI_CC_COMPILER: "gcc-9"
|
||||
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_AVX=On -DEIGEN_TEST_AVX2=On"
|
||||
parallel:
|
||||
matrix:
|
||||
- EIGEN_CI_TESTSUITE_PART: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
|
||||
EIGEN_TEST_CXX11: "off"
|
128
ci/run-tests.gitlab-ci.yml
Normal file
128
ci/run-tests.gitlab-ci.yml
Normal file
@ -0,0 +1,128 @@
|
||||
.run_tests:
|
||||
allow_failure: true
|
||||
stage: test
|
||||
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:
|
||||
- echo "cd ${BUILDDIR} && ctest --output-on-failure --no-compress-output --build-no-clean -T test"
|
||||
- cd ${BUILDDIR} && ctest --output-on-failure --no-compress-output --build-no-clean -T test
|
||||
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
|
||||
|
||||
########################## Nightly running jobs ################################
|
||||
# GCC 4.8
|
||||
run-tests-g++-4.8-cxx11-on:
|
||||
only:
|
||||
- schedules
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: g++-4.8
|
||||
EIGEN_CI_CC_COMPILER: gcc-4.8
|
||||
needs: [ "build-tests-g++-4.8-cxx11-on" ]
|
||||
tags:
|
||||
- eigen-runner
|
||||
- x86
|
||||
- linux
|
||||
|
||||
run-tests-g++-4.8-cxx11-off:
|
||||
only:
|
||||
- schedules
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: g++-4.8
|
||||
EIGEN_CI_CC_COMPILER: gcc-4.8
|
||||
needs: [ "build-tests-g++-4.8-cxx11-off" ]
|
||||
tags:
|
||||
- eigen-runner
|
||||
- x86
|
||||
- linux
|
||||
|
||||
# Clang 10
|
||||
run-tests-clang++-10-cxx11-on:
|
||||
only:
|
||||
- schedules
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: clang++-10
|
||||
EIGEN_CI_CC_COMPILER: clang-10
|
||||
needs: [ "build-tests-clang++-10-cxx11-on" ]
|
||||
tags:
|
||||
- eigen-runner
|
||||
- x86
|
||||
- linux
|
||||
|
||||
run-tests-clang++-10-cxx11-off:
|
||||
only:
|
||||
- schedules
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: clang++-10
|
||||
EIGEN_CI_CC_COMPILER: clang-10
|
||||
needs: [ "build-tests-clang++-10-cxx11-off" ]
|
||||
tags:
|
||||
- eigen-runner
|
||||
- x86
|
||||
- linux
|
||||
|
||||
# GCC 10
|
||||
run-tests-g++-10-cxx11-on:
|
||||
only:
|
||||
- schedules
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: g++-10
|
||||
EIGEN_CI_CC_COMPILER: gcc-10
|
||||
needs: [ "build-tests-g++-10-cxx11-on" ]
|
||||
tags:
|
||||
- eigen-runner
|
||||
- x86
|
||||
- linux
|
||||
|
||||
run-tests-g++-10-cxx11-off:
|
||||
only:
|
||||
- schedules
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: g++-10
|
||||
EIGEN_CI_CC_COMPILER: gcc-10
|
||||
needs: [ "build-tests-g++-10-cxx11-off" ]
|
||||
tags:
|
||||
- eigen-runner
|
||||
- x86
|
||||
- linux
|
||||
|
||||
########################### Merge request jobs #################################
|
||||
|
||||
# GCC 10
|
||||
run-tests-g++-9-cxx11-on-mr:
|
||||
only:
|
||||
- merge_requests
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: g++-9
|
||||
EIGEN_CI_CC_COMPILER: gcc-9
|
||||
dependencies:
|
||||
- build-tests-g++-9-cxx11-on-mr
|
||||
|
||||
run-tests-g++-9-cxx11-off-mr:
|
||||
only:
|
||||
- merge_requests
|
||||
extends: .run_tests
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: g++-9
|
||||
EIGEN_CI_CC_COMPILER: gcc-9
|
||||
dependencies:
|
||||
- build-tests-g++-9-cxx11-off-mr
|
@ -648,3 +648,63 @@ macro(ei_test_get_compilerver_from_cxx_version_string)
|
||||
ei_test1_get_compilerver_from_cxx_version_string("g++-mp-4.4 (GCC) 4.4.6" "g++" "4.4.6")
|
||||
ei_test1_get_compilerver_from_cxx_version_string("g++-mp-4.4 (GCC) 2011" "g++" "4.4")
|
||||
endmacro()
|
||||
|
||||
# Split all tests listed in EIGEN_TESTS_LIST into num_splits many targets
|
||||
# named buildtestspartN with N = { 0, ..., num_splits-1}.
|
||||
#
|
||||
# The intention behind the existance of this macro is the size of Eigen's
|
||||
# testsuite. Together with the relativly big compile-times building all tests
|
||||
# can take a substantial amount of time depending on the available hardware.
|
||||
#
|
||||
# The last buildtestspartN target will build possible remaining tests.
|
||||
#
|
||||
# An example:
|
||||
#
|
||||
# EIGEN_TESTS_LIST= [ test1, test2, test3, test4, test5, test6, test7 ]
|
||||
#
|
||||
# A call to ei_split_testsuite(3) creates the following targets with dependencies
|
||||
#
|
||||
# Target Dependencies
|
||||
# ------ ------------
|
||||
# buildtestspart0 test1, test2
|
||||
# buildtestspart1 test3, test4
|
||||
# buildtestspart2 test5, test6, test7
|
||||
#
|
||||
macro(ei_split_testsuite num_splits)
|
||||
get_property(EIGEN_TESTS_LIST GLOBAL PROPERTY EIGEN_TESTS_LIST)
|
||||
|
||||
# Translate EIGEN_TESTS_LIST into a CMake list
|
||||
string(REGEX REPLACE "\n" " " EIGEN_TESTS_LIST "${EIGEN_TESTS_LIST}")
|
||||
set(EIGEN_TESTS_LIST "${EIGEN_TESTS_LIST}")
|
||||
separate_arguments(EIGEN_TESTS_LIST)
|
||||
|
||||
set(eigen_test_count "0")
|
||||
foreach(t IN ITEMS ${EIGEN_TESTS_LIST})
|
||||
math(EXPR eigen_test_count "${eigen_test_count}+1")
|
||||
endforeach()
|
||||
|
||||
# Get number of tests per target
|
||||
math(EXPR num_tests_per_target "${eigen_test_count}/${num_splits} - ${eigen_test_count}/${num_splits} % 1")
|
||||
|
||||
set(test_idx "0")
|
||||
math(EXPR target_bound "${num_splits}-1")
|
||||
foreach(part RANGE "0" "${target_bound}")
|
||||
# Create target
|
||||
set(current_target "buildtestspart${part}")
|
||||
add_custom_target("${current_target}")
|
||||
math(EXPR upper_bound "${test_idx} + ${num_tests_per_target} - 1")
|
||||
foreach(test_idx RANGE "${test_idx}" "${upper_bound}")
|
||||
list(GET EIGEN_TESTS_LIST "${test_idx}" curr_test)
|
||||
add_dependencies("${current_target}" "${curr_test}")
|
||||
endforeach()
|
||||
math(EXPR test_idx "${test_idx} + ${num_tests_per_target}")
|
||||
endforeach()
|
||||
|
||||
# Handle the possibly remaining tests
|
||||
math(EXPR test_idx "${num_splits} * ${num_tests_per_target}")
|
||||
math(EXPR target_bound "${eigen_test_count} - 1")
|
||||
foreach(test_idx RANGE "${test_idx}" "${target_bound}")
|
||||
list(GET EIGEN_TESTS_LIST "${test_idx}" curr_test)
|
||||
add_dependencies("${current_target}" "${curr_test}")
|
||||
endforeach()
|
||||
endmacro(ei_split_testsuite num_splits)
|
||||
|
@ -443,16 +443,11 @@ if (EIGEN_TEST_HIP)
|
||||
message(FATAL_ERROR "HIP_PLATFORM = nvcc is not supported within Eigen")
|
||||
else ()
|
||||
message(FATAL_ERROR "Unknown HIP_PLATFORM = ${HIP_PLATFORM}")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else ()
|
||||
|
||||
message(FATAL_ERROR "EIGEN_TEST_HIP is ON, but the specified HIP_PATH (${HIP_PATH}) does not exist")
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
option(EIGEN_TEST_BUILD_DOCUMENTATION "Test building the doxygen documentation" OFF)
|
||||
|
Loading…
x
Reference in New Issue
Block a user