Skip to content

Commit 07fd809

Browse files
committed
Merge branch 'staging' into release
2 parents 7cd6ac3 + 11946a7 commit 07fd809

1,246 files changed

Lines changed: 26920 additions & 141475 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 170 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: CI
22

33
env:
4-
HDF5_VERSION: 1.10.10
5-
HDF5_CACHE_VERSION: v2
4+
HDF5_VERSION: 1.12.2
5+
HDF5_CACHE_VERSION: v3
66

77
on:
88
push:
@@ -192,15 +192,15 @@ jobs:
192192
193193
Get-ChildItem -Recurse "$zlib_prefix\lib","$zlib_prefix\include"
194194
195-
- name: Restore HDF5 1.10.10 cache
195+
- name: Restore HDF5 1.12.2 cache
196196
if: runner.os == 'Windows'
197197
id: cache-hdf5
198198
uses: actions/cache/restore@v5
199199
with:
200200
path: ${{ runner.temp }}\hdf5-${{ env.HDF5_VERSION }}-install
201201
key: hdf5-${{ runner.os }}-${{ matrix.compiler }}-${{ env.HDF5_VERSION }}-${{ env.HDF5_CACHE_VERSION }}
202202

203-
- name: Build HDF5 1.10.10
203+
- name: Build HDF5 1.12.2
204204
if: runner.os == 'Windows' && steps.cache-hdf5.outputs.cache-hit != 'true'
205205
shell: powershell
206206
run: |
@@ -213,7 +213,7 @@ jobs:
213213
$hdf5_prefix = "$env:RUNNER_TEMP\hdf5-$hdf5_version-install"
214214
215215
Invoke-WebRequest `
216-
-Uri "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-$hdf5_version/src/hdf5-$hdf5_version.tar.gz" `
216+
-Uri "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-$hdf5_version/src/hdf5-$hdf5_version.tar.gz" `
217217
-OutFile $hdf5_archive
218218
tar -xzf $hdf5_archive -C $env:RUNNER_TEMP
219219
@@ -239,7 +239,7 @@ jobs:
239239
cmake --build $hdf5_build --parallel --config Release
240240
cmake --install $hdf5_build --config Release
241241
242-
- name: Save HDF5 1.10.10 cache
242+
- name: Save HDF5 1.12.2 cache
243243
if: runner.os == 'Windows' && steps.cache-hdf5.outputs.cache-hit != 'true'
244244
uses: actions/cache/save@v5
245245
with:
@@ -301,6 +301,14 @@ jobs:
301301
cmake_args+=(-DHDF5_CXX_COMPILER_EXECUTABLE="$HDF5_CXX_COMPILER_EXECUTABLE")
302302
fi
303303
304+
# macOS: std::stop_token in Apple's libc++ requires deployment target >= 14.4.
305+
# The runner sets MACOSX_DEPLOYMENT_TARGET=14.0 in the environment; CMake reads
306+
# this with FORCE, overriding any CMakeLists.txt value, so we must override it
307+
# explicitly on the command line with a higher value.
308+
if [[ "$RUNNER_OS" == "macOS" ]]; then
309+
cmake_args+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=14.4)
310+
fi
311+
304312
cmake "${cmake_args[@]}"
305313
306314
- name: Configure Windows
@@ -345,10 +353,156 @@ jobs:
345353
name: status-${{ matrix.os }}-${{ matrix.compiler }}
346354
path: badge-status/status-${{ matrix.os }}-${{ matrix.compiler }}.json
347355

356+
asan:
357+
name: asan / ubuntu-24.04 / clang-20
358+
runs-on: ubuntu-24.04
359+
timeout-minutes: 45
360+
361+
concurrency:
362+
group: asan-${{ github.ref }}
363+
cancel-in-progress: true
364+
365+
steps:
366+
- name: Checkout
367+
uses: actions/checkout@v6
368+
with:
369+
fetch-depth: 0
370+
371+
- name: Install dependencies
372+
shell: bash
373+
run: |
374+
set -euxo pipefail
375+
sudo apt-get update
376+
sudo apt-get install -y cmake ninja-build wget gnupg lsb-release software-properties-common libhdf5-dev
377+
wget https://apt.llvm.org/llvm.sh
378+
chmod +x llvm.sh
379+
sudo ./llvm.sh 20 all
380+
echo "CC=$(command -v clang-20)" >> "$GITHUB_ENV"
381+
echo "CXX=$(command -v clang++-20)" >> "$GITHUB_ENV"
382+
383+
- name: Configure
384+
shell: bash
385+
run: |
386+
set -euxo pipefail
387+
cmake -S . -B build -G Ninja \
388+
-DCMAKE_C_COMPILER="$CC" \
389+
-DCMAKE_CXX_COMPILER="$CXX" \
390+
-DCMAKE_CXX_STANDARD=17 \
391+
-DCMAKE_BUILD_TYPE=Debug \
392+
-DCMAKE_C_FLAGS="-fsanitize=address -fno-omit-frame-pointer -O1 -g" \
393+
-DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer -O1 -g" \
394+
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" \
395+
-DH5CPP_BUILD_TESTS=ON
396+
397+
- name: Build
398+
shell: bash
399+
run: cmake --build build --parallel
400+
401+
- name: Test
402+
shell: bash
403+
env:
404+
ASAN_OPTIONS: "detect_leaks=1:halt_on_error=1:abort_on_error=1:strict_string_checks=1"
405+
run: ctest --test-dir build --output-on-failure
406+
407+
- name: Record Badge Status
408+
if: always()
409+
shell: bash
410+
run: |
411+
set -euxo pipefail
412+
mkdir -p badge-status
413+
cat <<EOF > badge-status/status-asan.json
414+
{
415+
"os": "ubuntu-24.04",
416+
"compiler": "clang-20",
417+
"label": "asan",
418+
"status": "${{ job.status }}"
419+
}
420+
EOF
421+
422+
- name: Upload Status Artifact
423+
if: always()
424+
uses: actions/upload-artifact@v7
425+
with:
426+
name: status-asan
427+
path: badge-status/status-asan.json
428+
429+
ubsan:
430+
name: ubsan / ubuntu-24.04 / clang-20
431+
runs-on: ubuntu-24.04
432+
timeout-minutes: 45
433+
434+
concurrency:
435+
group: ubsan-${{ github.ref }}
436+
cancel-in-progress: true
437+
438+
steps:
439+
- name: Checkout
440+
uses: actions/checkout@v6
441+
with:
442+
fetch-depth: 0
443+
444+
- name: Install dependencies
445+
shell: bash
446+
run: |
447+
set -euxo pipefail
448+
sudo apt-get update
449+
sudo apt-get install -y cmake ninja-build wget gnupg lsb-release software-properties-common libhdf5-dev
450+
wget https://apt.llvm.org/llvm.sh
451+
chmod +x llvm.sh
452+
sudo ./llvm.sh 20 all
453+
echo "CC=$(command -v clang-20)" >> "$GITHUB_ENV"
454+
echo "CXX=$(command -v clang++-20)" >> "$GITHUB_ENV"
455+
456+
- name: Configure
457+
shell: bash
458+
run: |
459+
set -euxo pipefail
460+
cmake -S . -B build -G Ninja \
461+
-DCMAKE_C_COMPILER="$CC" \
462+
-DCMAKE_CXX_COMPILER="$CXX" \
463+
-DCMAKE_CXX_STANDARD=17 \
464+
-DCMAKE_BUILD_TYPE=Debug \
465+
-DCMAKE_C_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer -O1 -g" \
466+
-DCMAKE_CXX_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer -O1 -g" \
467+
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=undefined" \
468+
-DH5CPP_BUILD_TESTS=ON
469+
470+
- name: Build
471+
shell: bash
472+
run: cmake --build build --parallel
473+
474+
- name: Test
475+
shell: bash
476+
env:
477+
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
478+
run: ctest --test-dir build --output-on-failure
479+
480+
- name: Record Badge Status
481+
if: always()
482+
shell: bash
483+
run: |
484+
set -euxo pipefail
485+
mkdir -p badge-status
486+
cat <<EOF > badge-status/status-ubsan.json
487+
{
488+
"os": "ubuntu-24.04",
489+
"compiler": "clang-20",
490+
"label": "ubsan",
491+
"status": "${{ job.status }}"
492+
}
493+
EOF
494+
495+
- name: Upload Status Artifact
496+
if: always()
497+
uses: actions/upload-artifact@v7
498+
with:
499+
name: status-ubsan
500+
path: badge-status/status-ubsan.json
501+
348502
badge:
349503
name: Generate SVG Badges
350504
if: always()
351-
needs: build
505+
needs: [build, asan, ubsan]
352506
runs-on: ubuntu-24.04
353507

354508
steps:
@@ -393,6 +547,7 @@ jobs:
393547
os=$(jq -r '.os' "$status_file")
394548
compiler=$(jq -r '.compiler' "$status_file")
395549
status=$(jq -r '.status' "$status_file")
550+
custom_label=$(jq -r '.label // ""' "$status_file")
396551
397552
prefix="unknown"
398553
symbol="%3F"
@@ -421,8 +576,13 @@ jobs:
421576
;;
422577
esac
423578
424-
label="${os}-${compiler}"
425-
badge="$badge_dir/${label}.svg"
579+
if [[ -n "$custom_label" ]]; then
580+
badge_name="$custom_label"
581+
else
582+
badge_name="${os}-${compiler}"
583+
fi
584+
585+
badge="$badge_dir/${badge_name}.svg"
426586
url="https://img.shields.io/badge/${prefix}-${symbol}-${color}.svg"
427587
428588
echo "$url -> $badge"
@@ -484,7 +644,7 @@ jobs:
484644
485645
cmake -S . -B build -G Ninja \
486646
-DCMAKE_BUILD_TYPE=Debug \
487-
-DCMAKE_CXX_STANDARD=17 \
647+
-DCMAKE_CXX_STANDARD=20 \
488648
-DCMAKE_C_COMPILER=gcc-14 \
489649
-DCMAKE_CXX_COMPILER=g++-14 \
490650
-DCMAKE_C_FLAGS="--coverage -O0 -g" \

0 commit comments

Comments
 (0)