Skip to content

fix(cfloat): isnormal() returns false for +-0 (IEEE / std::isnormal) #3779

fix(cfloat): isnormal() returns false for +-0 (IEEE / std::isnormal)

fix(cfloat): isnormal() returns false for +-0 (IEEE / std::isnormal) #3779

Workflow file for this run

name: CMake
on:
push:
branches: ['**']
paths-ignore:
- '**.md'
- 'docs/**'
- 'docs-site/**'
- '.github/FUNDING.yml'
- 'CITATION.cff'
- 'LICENSE'
- '.clang-format'
- '.clang-tidy'
- '.gitignore'
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened, ready_for_review ]
paths-ignore:
- '**.md'
- 'docs/**'
- 'docs-site/**'
- '.github/FUNDING.yml'
- 'CITATION.cff'
- 'LICENSE'
- '.clang-format'
- '.clang-tidy'
- '.gitignore'
permissions:
contents: read
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
# Force Node.js 24 for all JavaScript actions (eliminates Node.js 20 deprecation warnings)
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
# Fast tier: Linux GCC + Clang with CI_LITE (~15 min)
# Runs on every trigger including draft PRs
fast:
concurrency:
group: cmake-fast-${{ matrix.artifact }}-${{ github.ref }}
cancel-in-progress: true
name: "${{ matrix.name }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Linux x64 (GCC) [fast]
artifact: linux-x64-gcc-fast
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON -DUNIVERSAL_TEST_INSTALL=ON
- name: Linux x64 (Clang) [fast]
artifact: linux-x64-clang-fast
compiler: clang
cc: clang
cxx: clang++
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON -DUNIVERSAL_TEST_INSTALL=ON
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Clang
if: matrix.compiler == 'clang'
run: |
sudo apt-get update
sudo apt-get install -y clang
- name: Install and configure ccache
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: ${{ matrix.artifact }}
max-size: "1G"
# Save the ccache only on pushes to main: PR/branch runs restore the warm
# main cache but do not create new ones. Without this every PR run saved a
# fresh cache and a CI burst evicted the warm caches under GitHub's 10GB
# limit, dropping the hit rate to ~1% and turning ~1-min cached builds into
# ~9-min cold rebuilds (#1009).
save: ${{ github.ref == 'refs/heads/main' }}
- name: Set ccache compiler launcher
run: |
echo "CMAKE_C_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER || '' }}
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER || '' }}
${{ matrix.cmake_flags }}
${{ matrix.cc && format('-DCMAKE_C_COMPILER={0}', matrix.cc) || '' }}
${{ matrix.cxx && format('-DCMAKE_CXX_COMPILER={0}', matrix.cxx) || '' }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -j 4 -C ${{env.BUILD_TYPE}} --output-on-failure
- name: Rerun failed tests
if: failure()
run: |
cd "${{github.workspace}}/build"
ctest -C ${{env.BUILD_TYPE}} --rerun-failed --output-on-failure
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-logs-${{ matrix.artifact }}
path: |
${{github.workspace}}/build/Testing
${{github.workspace}}/build/CMakeCache.txt
${{github.workspace}}/build/CMakeFiles/CMakeOutput.log
${{github.workspace}}/build/CMakeFiles/CMakeError.log
# Full tier: 11-platform matrix with full CI (~45 min)
# Skipped for draft PRs and feature-branch pushes
full:
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false)
concurrency:
group: cmake-${{ matrix.artifact }}-${{ github.ref }}
cancel-in-progress: true
# The CMake configure and build commands are platform agnostic and work equally well on Windows or Mac.
# Use a matrix build to enable cross-platform coverage.
name: "${{ matrix.name }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
include:
# Full CI build on Linux (primary platforms)
- os: ubuntu-latest
name: Linux x64 (GCC)
artifact: linux-x64-gcc
cmake_flags: -DUNIVERSAL_BUILD_CI=ON
- os: ubuntu-latest
name: Linux x64 (Clang)
artifact: linux-x64-clang
compiler: clang
cc: clang
cxx: clang++
cmake_flags: -DUNIVERSAL_BUILD_CI=ON
# Lite CI build on Windows and macOS (portability checks)
- os: windows-latest
name: Windows x64 (MSVC)
artifact: windows-x64-msvc
cmake_generator: Ninja
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON
- os: macos-latest
name: macOS ARM64 (Apple Clang)
artifact: macos-arm64
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON
- os: macos-15-intel
name: macOS x64 (Apple Clang)
artifact: macos-x64
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON
# RISC-V cross-compilation with QEMU emulation
- os: ubuntu-latest
name: Linux RISC-V 64 (GCC cross)
artifact: linux-riscv64-gcc
cross: riscv64
toolchain: cmake/toolchains/riscv64-linux-gnu.cmake
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON
# IBM POWER cross-compilation with QEMU emulation
- os: ubuntu-latest
name: Linux POWER 64 LE (GCC cross)
artifact: linux-ppc64le-gcc
cross: ppc64le
toolchain: cmake/toolchains/ppc64le-linux-gnu.cmake
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON
# ARM64 cross-compilation with QEMU emulation
- os: ubuntu-latest
name: Linux ARM64 (GCC cross)
artifact: linux-aarch64-gcc
cross: aarch64
toolchain: cmake/toolchains/aarch64-linux-gnu.cmake
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON
# Windows cross-compilation with MinGW-w64
- os: ubuntu-latest
name: Windows x64 (MinGW GCC cross)
artifact: windows-x64-mingw
cross: mingw
toolchain: cmake/toolchains/x86_64-w64-mingw32.cmake
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON
# Android aarch64 cross-compilation (Clang, 128-bit long double)
- os: ubuntu-latest
name: Android ARM64 (NDK Clang cross)
artifact: android-arm64-clang
cross: android
toolchain: cmake/toolchains/aarch64-linux-android.cmake
cmake_flags: -DUNIVERSAL_BUILD_CI_LITE=ON
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Clang
if: matrix.compiler == 'clang'
run: |
sudo apt-get update
sudo apt-get install -y clang
- name: Install RISC-V cross-compiler and QEMU
if: matrix.cross == 'riscv64'
run: |
sudo apt-get update
sudo apt-get install -y g++-riscv64-linux-gnu qemu-user-static
# Set sysroot so QEMU can find the RISC-V dynamic linker and libs,
# whether invoked via CMAKE_CROSSCOMPILING_EMULATOR or binfmt_misc
echo "QEMU_LD_PREFIX=/usr/riscv64-linux-gnu" >> $GITHUB_ENV
- name: Install POWER cross-compiler and QEMU
if: matrix.cross == 'ppc64le'
run: |
sudo apt-get update
sudo apt-get install -y g++-powerpc64le-linux-gnu qemu-user-static
echo "QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu" >> $GITHUB_ENV
- name: Install ARM64 cross-compiler and QEMU
if: matrix.cross == 'aarch64'
run: |
sudo apt-get update
sudo apt-get install -y g++-aarch64-linux-gnu qemu-user-static
echo "QEMU_LD_PREFIX=/usr/aarch64-linux-gnu" >> $GITHUB_ENV
- name: Install MinGW-w64 cross-compiler and Wine
if: matrix.cross == 'mingw'
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y g++-mingw-w64-x86-64 wine wine64
# ccache for Linux and macOS
- name: Install and configure ccache
if: runner.os != 'Windows'
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: ${{ matrix.artifact }}
max-size: "1G"
# Save the ccache only on pushes to main: PR/branch runs restore the warm
# main cache but do not create new ones. Without this every PR run saved a
# fresh cache and a CI burst evicted the warm caches under GitHub's 10GB
# limit, dropping the hit rate to ~1% and turning ~1-min cached builds into
# ~9-min cold rebuilds (#1009).
save: ${{ github.ref == 'refs/heads/main' }}
- name: Set ccache compiler launcher
if: runner.os != 'Windows'
run: |
echo "CMAKE_C_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
# MSVC environment for Ninja generator (must precede sccache and cmake)
- name: Set up MSVC dev environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
# sccache for Windows (Ninja generator invokes cl.exe through sccache)
- name: Install and configure sccache
if: runner.os == 'Windows'
uses: mozilla-actions/sccache-action@v0.0.9
- name: Set sccache compiler launcher
if: runner.os == 'Windows'
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $env:GITHUB_ENV
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $env:GITHUB_ENV
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $env:GITHUB_ENV
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
${{ matrix.cmake_generator && format('-G {0}', matrix.cmake_generator) || '' }}
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER || '' }}
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER || '' }}
${{ matrix.cmake_flags }}
${{ matrix.toolchain && format('-DCMAKE_TOOLCHAIN_FILE={0}/{1}', github.workspace, matrix.toolchain) || '' }}
${{ matrix.cc && format('-DCMAKE_C_COMPILER={0}', matrix.cc) || '' }}
${{ matrix.cxx && format('-DCMAKE_CXX_COMPILER={0}', matrix.cxx) || '' }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2
- name: Test
if: matrix.cross != 'android'
working-directory: ${{github.workspace}}/build
run: ctest -j 4 -C ${{env.BUILD_TYPE}} --output-on-failure
- name: Rerun failed tests
if: failure() && matrix.cross != 'android'
run: |
cd "${{github.workspace}}/build"
ctest -C ${{env.BUILD_TYPE}} --rerun-failed --output-on-failure
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-logs-${{ matrix.artifact }}
path: |
${{github.workspace}}/build/Testing
${{github.workspace}}/build/CMakeCache.txt
${{github.workspace}}/build/CMakeFiles/CMakeOutput.log
${{github.workspace}}/build/CMakeFiles/CMakeError.log