Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,59 @@

jobs:
format_check:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: ubuntu-latest
container:
image: ghcr.io/llnl/sundials_spack_cache:llvm-17.0.4-h4lflucc3v2vage45opbo2didtcuigsn.spack
steps:
- name: Install git
run: |
apt update
apt install -y git python3-pip

- name: Install black
run: pip install black

- name: Print black version
run: black --version

- name: Install cmake-format
run: pip install cmakelang

- name: Print cmake-format version
run: cmake-format --version

- name: Install fprettify
run: pip install fprettify

- name: Print fprettify version
run: fprettify --version

- name: Print clang-format version
run: clang-format --version

- name: Check out repository code
uses: actions/checkout@v5

- name: Add safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Run checker on code
run: |
./scripts/format.sh .

- name: Run git diff to see if anything changed
run: /usr/bin/git diff --exit-code

- name: Run git diff if we failed
if: failure()
run: /usr/bin/git diff > format.patch

- name: Archive diff as a patch if we failed
uses: actions/upload-artifact@v4
if: failure()
with:
name: format.patch
path: |
${{ github.workspace }}/format.patch

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/check-spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,39 @@

jobs:
spelling_check:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: ubuntu-latest
steps:
- name: Install python3-pip
run: |
sudo apt update
sudo apt install -y --no-install-recommends python3-pip

- name: Install codespell
run: pip install codespell

- name: Print codespell version
run: codespell --version

- name: Check out repository code
uses: actions/checkout@v5

- name: Run codespell
run: |
./scripts/spelling.sh

- name: Run git diff to see if anything changed
run: /usr/bin/git diff --exit-code

- name: Run git diff if we failed
if: failure()
run: /usr/bin/git diff > spelling.patch

- name: Archive diff as a patch if we failed
uses: actions/upload-artifact@v4
if: failure()
with:
name: spelling.patch
path: |
${{ github.workspace }}/spelling.patch

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/check-swig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,47 @@

jobs:
swig_check:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: ubuntu-latest
steps:
- name: Install pcre
run: |
sudo apt install libpcre3-dev

- name: Install swig
run: |
git clone https://github.com/sundials-codes/swig
cd swig
./autogen.sh
./configure --prefix=/usr/
make
sudo make install
swig -version

- name: Check out repository code
uses: actions/checkout@v5

- name: Add safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Run swig on code
run: |
cd swig
make all32
make all64

- name: Run git diff to see if anything changed
run: /usr/bin/git diff --exit-code

- name: Run git diff if we failed
if: failure()
run: /usr/bin/git diff > swig.patch

- name: Archive diff as a patch if we failed
uses: actions/upload-artifact@v4
if: failure()
with:
name: swig.patch
path: |
${{ github.workspace }}/swig.patch

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/macos-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,32 @@

jobs:
build_and_test:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: macos-latest

steps:
- uses: actions/checkout@v5

- name: Configure CMake
# Configure CMake in a 'build' subdirectory.
run: |
cmake \
-B ${{github.workspace}}/build \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-D ENABLE_ALL_WARNINGS=ON \
-D ENABLE_WARNINGS_AS_ERRORS=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/test-address-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,47 @@

jobs:
sanitizer_build_and_test:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: ubuntu-latest
container:
image: ghcr.io/llnl/sundials-ci-int${{ matrix.indexsize }}-${{ matrix.precision }}:latest
options: --user root
strategy:
fail-fast: false
max-parallel: 2
matrix:
indexsize: [32, 64]
precision: ['double']
buildtype: ['Debug']
# Address sanitizer is enabled in test_driver.sh with TPLs OFF
tpls: ['OFF']

steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: true
- name: Run test_driver.sh
uses: ./.github/actions/test-driver
with:
indexsize: ${{ matrix.indexsize }}
precision: ${{ matrix.precision }}
tpls: ${{ matrix.tpls }}
env:
CMAKE_BUILD_TYPE: ${{ matrix.buildtype }}
- name: Archive build files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: build_files_${{ matrix.indexsize }}_${{ matrix.precision }}_${{ matrix.buildtype }}_${{ matrix.tpls }}
path: |
${{ github.workspace }}/test/build_*
!${{ github.workspace }}/test/build_*/Testing/output
- name: Archive output files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: output_files_${{ matrix.indexsize }}_${{ matrix.precision }}_${{ matrix.buildtype }}_${{ matrix.tpls }}
path: |
${{ github.workspace }}/test/build_*/Testing/

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
4 changes: 4 additions & 0 deletions .github/workflows/ubuntu-latest-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,104 +15,108 @@

jobs:
build_cycle_log_levels:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: ubuntu-latest

strategy:
fail-fast: false
max-parallel: 2
matrix:
# Level 2 is also used in other builds (it's the default) but include it
# here to ensure it's tested with all warning flags
logging_level: [0, 1, 2, 3, 4, 5]

steps:
- uses: actions/checkout@v5

- name: Configure CMake
# Configure CMake in a 'build' subdirectory.
run: |
cmake \
-B ${{github.workspace}}/build \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-D CMAKE_C_COMPILER=$(which clang) \
-D CMAKE_CXX_COMPILER=$(which clang++) \
-D SUNDIALS_LOGGING_LEVEL=${{matrix.logging_level}} \
-D ENABLE_ALL_WARNINGS=ON \
-D ENABLE_WARNINGS_AS_ERRORS=ON \
-D SUNDIALS_TEST_ENABLE_DEV_TESTS=ON \
-D SUNDIALS_TEST_ENABLE_UNIT_TESTS=ON \
-D SUNDIALS_TEST_ENABLE_GTEST=OFF \
-D SUNDIALS_TEST_FLOAT_PRECISION=4 \
-D SUNDIALS_TEST_INTEGER_PRECISION=10

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
# Run logging tests
run: |
ctest \
--test-dir ${{github.workspace}}/build \
--label-regex logging \
--verbose

- name: Archive build files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: build_files_logging_level_${{ matrix.logging_level }}
path: |
${{ github.workspace }}/build
!${{ github.workspace }}/build/Testing/output

- name: Archive output files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: output_files_logging_level_${{ matrix.logging_level }}
path: |
${{ github.workspace }}/build/Testing/

build_cycle_profiling:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: ubuntu-latest

strategy:
matrix:
profiling: ['OFF', 'ON']

steps:
- uses: actions/checkout@v5

- name: Configure CMake
# Configure CMake in a 'build' subdirectory.
run: |
cmake \
-B ${{github.workspace}}/build \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-D CMAKE_C_COMPILER=$(which clang) \
-D CMAKE_CXX_COMPILER=$(which clang++) \
-D SUNDIALS_BUILD_WITH_PROFILING=${{matrix.profiling}} \
-D ENABLE_ALL_WARNINGS=ON \
-D ENABLE_WARNINGS_AS_ERRORS=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Archive build files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: build_files_profiling_${{ matrix.profiling }}
path: |
${{ github.workspace }}/build
!${{ github.workspace }}/build/Testing/output

- name: Archive output files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: output_files_profiling_${{ matrix.profiling }}
path: |
${{ github.workspace }}/build/Testing/

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu-latest-oneapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,33 @@

jobs:
build:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

strategy:
matrix:
ONEAPI_VERSION: [
'2024.2.1-0-devel-ubuntu22.04',
'latest' # 2025.0.0-0-devel-ubuntu24.04 at the time of commit
]

runs-on: ubuntu-latest
container: intel/oneapi-basekit:${{ matrix.ONEAPI_VERSION }}

steps:
- uses: actions/checkout@v5

- name: Configure CMake
run: |
cmake \
-B ${{github.workspace}}/build \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-D CMAKE_C_COMPILER=$(which icx) \
-D CMAKE_CXX_COMPILER=$(which icpx) \
-D CMAKE_CXX_FLAGS="-fsycl" \
-D SUNDIALS_BUILD_WITH_PROFILING=ON \
-D ENABLE_ALL_WARNINGS=ON \
-D ENABLE_WARNINGS_AS_ERRORS=ON \
-D ENABLE_SYCL=ON

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,55 +16,57 @@

jobs:
build_and_test:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: ubuntu-latest
container:
image: ghcr.io/llnl/sundials-ci-int${{ matrix.indexsize }}-${{ matrix.precision }}:latest
options: --user root
strategy:
fail-fast: false
max-parallel: 2
matrix:
indexsize: [32, 64]
precision: ['single', 'double', 'extended']
buildtype: ['Debug', 'Release', 'RelWithDebInfo']
tpls: ['ON']
exclude:
- buildtype: Debug
precision: single
- buildtype: Debug
precision: extended
- buildtype: Release
precision: single
- buildtype: Release
precision: extended
- buildtype: RelWithDebInfo
precision: double

steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: true
- name: Run test_driver.sh
uses: ./.github/actions/test-driver
with:
indexsize: ${{ matrix.indexsize }}
precision: ${{ matrix.precision }}
tpls: ${{ matrix.tpls }}
env:
CMAKE_BUILD_TYPE: ${{ matrix.buildtype }}
- name: Archive build files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: build_files_${{ matrix.indexsize }}_${{ matrix.precision }}_${{ matrix.buildtype }}_${{ matrix.tpls }}
path: |
${{ github.workspace }}/test/build_*
!${{ github.workspace }}/test/build_*/Testing/output
- name: Archive output files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: output_files_${{ matrix.indexsize }}_${{ matrix.precision }}_${{ matrix.buildtype }}_${{ matrix.tpls }}
path: |
${{ github.workspace }}/test/build_*/Testing/

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/windows-latest-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,38 @@

jobs:
build_and_test:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: windows-latest

steps:
- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: intel
version: '2025.0'

- name: Install Ninja
run: choco install ninja

- uses: actions/checkout@v5

- name: Configure CMake (Static)
run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_ENABLE_UNIT_TESTS=OFF -DEXAMPLES_ENABLE_CXX=ON

- name: Build (Static)
run: cmake --build ${{github.workspace}}/build_static --verbose

- name: Test (Static)
working-directory: ${{github.workspace}}/build_static
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

- name: Configure CMake (Shared)
run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_ENABLE_UNIT_TESTS=OFF -DEXAMPLES_ENABLE_CXX=ON

- name: Build (Shared)
run: cmake --build ${{github.workspace}}/build_shared --verbose

- name: Test (Shared)
working-directory: ${{github.workspace}}/build_shared
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/windows-latest-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,88 +14,90 @@

jobs:
build_and_test:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: windows-latest

defaults:
run:
# Use MSYS2 as default shell
shell: msys2 {0}

strategy:
matrix:
msystem: [MINGW64, MINGW32]
include:
- msystem: MINGW64
target-prefix: mingw-w64-x86_64
install-tpls: true
- msystem: MINGW32
target-prefix: mingw-w64-i686
install-tpls: false

steps:
- uses: actions/checkout@v5

- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
release: false
install: >-
base-devel
${{ matrix.target-prefix }}-cmake
${{ matrix.target-prefix }}-gcc
${{ matrix.target-prefix }}-gcc-fortran
${{ matrix.install-tpls && format('{0}-openblas', matrix.target-prefix) || '' }}
${{ matrix.install-tpls && format('{0}-suitesparse', matrix.target-prefix) || '' }}

- name: Configure CMake (Static)
# Configure CMake in a 'build' subdirectory
run: |
cmake \
-G "MSYS Makefiles" \
-B ${GITHUB_WORKSPACE}/build_static \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_C_FLAGS=-Wno-deprecated-declarations \
-DBUILD_FORTRAN_MODULE_INTERFACE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DSUNDIALS_BUILD_WITH_PROFILING=ON \
-DSUNDIALS_LOGGING_LEVEL=2 \
-DSUNDIALS_TEST_ENABLE_UNIT_TESTS=OFF \
-DEXAMPLES_ENABLE_CXX=ON \
-DENABLE_KLU=${{ matrix.install-tpls && 'ON' || 'OFF' }}

- name: Build (Static)
# Build program
run: cmake --build ${GITHUB_WORKSPACE}/build_static --verbose

- name: Test (Static)
working-directory: ${{github.workspace}}/build_static
# Execute tests
run: ctest --output-on-failure

# TODO(CJB): shared libraries with the fortran interfaces turned on
# fail to link correctly with this toolchain see https://github.com/LLNL/sundials/issues/507.
- name: Configure CMake (Shared)
# Configure CMake in a 'build' subdirectory
run: |
cmake \
-G "MSYS Makefiles" \
-B ${GITHUB_WORKSPACE}/build_shared \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_C_FLAGS=-Wno-deprecated-declarations \
-DBUILD_FORTRAN_MODULE_INTERFACE=OFF \
-DBUILD_STATIC_LIBS=OFF \
-DSUNDIALS_BUILD_WITH_PROFILING=ON \
-DSUNDIALS_LOGGING_LEVEL=2 \
-DSUNDIALS_TEST_ENABLE_UNIT_TESTS=OFF \
-DEXAMPLES_ENABLE_CXX=ON \
-DENABLE_KLU=${{ matrix.install-tpls && 'ON' || 'OFF' }}

- name: Build (Shared)
# Build program
run: cmake --build ${GITHUB_WORKSPACE}/build_shared --verbose

- name: Test (Shared)
working-directory: ${{github.workspace}}/build_shared
# Execute tests
run: ctest --output-on-failure

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions .github/workflows/windows-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@

jobs:
build_and_test:
if: contains(github.event.head_commit.message, '[run-ci]') # This job only runs if commit message contains '[run-ci]'

runs-on: windows-latest

steps:
- uses: actions/checkout@v5

- name: Configure CMake
run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_ENABLE_UNIT_TESTS=ON -DEXAMPLES_ENABLE_CXX=ON

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Loading