Skip to content

Merge pull request #4 from lasp/fix/freestanding-no-malloc-guards #19

Merge pull request #4 from lasp/fix/freestanding-no-malloc-guards

Merge pull request #4 from lasp/fix/freestanding-no-malloc-guards #19

Workflow file for this run

name: Smoketests
# Runs Eigen's smoke test subset (the ~124 tests in cmake/EigenSmokeTestList.cmake).
#
# These jobs deliberately do NOT run in a container. Upstream's GitLab CI uses
# `image: ubuntu:18.04` on Eigen's own self-hosted runners, and this workflow
# started as a port of it, but on GitHub-hosted runners the agent injects its own
# Node binary to run JavaScript actions. Node 24 needs glibc >= 2.28 and Ubuntu
# 18.04 ships 2.27, so actions/checkout could never start:
# /__e/node24/bin/node: ... version `GLIBC_2.28' not found
# Running directly on the runner image keeps the actions working. Ubuntu 18.04 is
# also EOL, so its apt archives no longer answer.
#
# See .github/workflows/README.md for what is and is not covered here.
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [feature/freestanding]
workflow_dispatch:
env:
BUILDDIR: builddir
EIGEN_CI_CMAKE_GENERATOR: Ninja
EIGEN_CI_ADDITIONAL_ARGS: ""
jobs:
smoketest:
name: smoketest (${{ matrix.name }})
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
# gcc-13 is what the downstream flight software builds with, so it gets
# both C++03 and C++11. clang-18 keeps a second front end in the loop but
# only with C++11: Eigen 3.4.0's `meta` test does not compile under
# clang in C++03 mode. See .github/workflows/README.md.
# gcc-4.8 and clang-10, which the GitLab matrix used, are not installable
# on current runner images.
- name: gcc-13-cxx11-off
cc: gcc-13
cxx: g++-13
cxx11: "off"
- name: gcc-13-cxx11-on
cc: gcc-13
cxx: g++-13
cxx11: "on"
- name: clang-18-cxx11-on
cc: clang-18
cxx: clang++-18
cxx11: "on"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install toolchain and helpers
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends \
"${{ matrix.cxx }}" "${{ matrix.cc }}" cmake ninja-build xsltproc
- name: Configure smoketests
run: |
mkdir -p "$BUILDDIR"
cd "$BUILDDIR"
CC="${{ matrix.cc }}" CXX="${{ matrix.cxx }}" cmake -G "$EIGEN_CI_CMAKE_GENERATOR" -DEIGEN_TEST_CXX11="${{ matrix.cxx11 }}" $EIGEN_CI_ADDITIONAL_ARGS ..
- name: Build smoketests target
run: |
cd "$BUILDDIR"
cmake --build . --target buildsmoketests --parallel "$(nproc)"
- name: Run smoketests
run: |
cd "$BUILDDIR"
ctest --output-on-failure --no-compress-output -T test -L smoketest -j "$(nproc)"
- name: Convert CTest logs to JUnit
if: always()
run: |
cd "$BUILDDIR"
TAG=$(head -n 1 < Testing/TAG)
xsltproc ../ci/CTest2JUnit.xsl "Testing/$TAG/Test.xml" > "JUnitTestResults_${{ matrix.name }}.xml"
- name: Upload JUnit report
if: always()
uses: actions/upload-artifact@v4
with:
name: smoketest-report-${{ matrix.name }}
path: ${{ env.BUILDDIR }}/JUnitTestResults_${{ matrix.name }}.xml
if-no-files-found: error