Files
hdf5/.github/workflows/codeql.yml
T
dependabot[bot] 13ee56c5d3 Bump the github-actions group with 11 updates (#6138)
Bumps the github-actions group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `3` | `6` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `6.0.0` | `7.0.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `5.0.0` | `6.0.0` |
| [actions/cache](https://github.com/actions/cache) | `4.3.0` | `5.0.1` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3` | `4` |
| [azure/trusted-signing-action](https://github.com/azure/trusted-signing-action) | `0.5.10` | `0.5.11` |
| [cygwin/cygwin-install-action](https://github.com/cygwin/cygwin-install-action) | `b9bf9147075ee9811ac11beee9351eeb93e2f2fb` | `7d2dc1e241644c3318bed9ec74115d1929baa681` |
| [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) | `1.3.0` | `1.3.4` |
| [msys2/setup-msys2](https://github.com/msys2/setup-msys2) | `2.29.0` | `2.30.0` |
| [vmactions/openbsd-vm](https://github.com/vmactions/openbsd-vm) | `1.2.5` | `1.3.1` |
| [mpi4py/setup-mpi](https://github.com/mpi4py/setup-mpi) | `1.4.0` | `1.4.1` |
2026-01-02 11:13:52 -06:00

101 lines
2.6 KiB
YAML

name: "CodeQL"
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
schedule:
- cron: "16 7 * * 0"
workflow_dispatch: # Allow manual triggering
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
steps:
- name: Install Dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install -y \
openmpi-bin openmpi-common mpi-default-dev \
zlib1g-dev libaec-dev
# Set env vars
echo "CC=mpicc" >> $GITHUB_ENV
echo "FC=mpif90" >> $GITHUB_ENV
echo "F77=mpif90" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v6
- name: Configure HDF5
run: |
mkdir build; cd build
cmake -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=$PWD/hdf5 \
-DCMAKE_BUILD_TYPE=Debug \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
-DHDF5_ENABLE_SUBFILING_VFD:BOOL=ON \
-DHDF5_BUILD_TOOLS:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_STATIC_LIBS:BOOL=OFF \
-DHDF5_BUILD_FORTRAN:BOOL=OFF \
-DHDF5_BUILD_JAVA:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DHDF5_BUILD_EXAMPLES:BOOL=OFF \
-DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=ON \
-DZLIB_INCLUDE_DIR=/usr/include \
-DZLIB_LIBRARY=/usr/lib/x86_64-linux-gnu/libz.so \
..
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: c-cpp
build-mode: manual
queries: +security-and-quality
config: |
query-filters:
- exclude:
id: cpp/toctou-race-condition
- exclude:
id: cpp/short-global-name
- name: Build
run: |
cd build
cmake --build . --config Debug
shell: bash
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:c-cpp"
output: sarif-results
upload: failure-only
- name: filter-sarif
uses: advanced-security/filter-sarif@v1
with:
patterns: |
-**/test/**
-**/testpar/**
-**/tools/test/**
input: sarif-results/cpp.sarif
output: sarif-results/cpp.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: sarif-results/cpp.sarif