Skip to content

Commit

Permalink
Merge branch 'develop' into feature/dirk-ext-prec
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Roberts committed Oct 17, 2024
2 parents 674baef + 554fa92 commit eabd237
Show file tree
Hide file tree
Showing 135 changed files with 1,704 additions and 911 deletions.
45 changes: 45 additions & 0 deletions .github/actions/apply-style/checkout.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

###
# Attempt to find the branch of the PR from the detached head state
##

echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Attempting to find branch that matches commit..."

# Get the current commit SHA
current_commit_sha=$(git rev-parse HEAD)
# List all branches containing the current commit SHA
branches=$(git branch -r --contains $current_commit_sha)

echo "all branches:"
echo "$(git branch -a)"
echo "branches with SHA $current_commit_sha:"
echo "$branches"

# Loop over the string split by whitespace
branch=""
num_branches_found=0
for _possible_branch in $branches; do
# Skip items that start with "pull/"
if [[ $_possible_branch == pull/* ]]; then
continue
fi
if [[ $_possible_branch == origin/* ]]; then
_possible_branch=$(echo "$_possible_branch" | sed 's/origin\///')
fi
echo "Possible Branch: $_possible_branch"
branch=$_possible_branch
num_branches_found=$((num_branches_found+1))
done

if [ "$num_branches_found" -ne 1 ]; then
echo "Error: Unable to find a single branch that matched git sha $current_commit_sha"
exit 1
fi

echo "Found branch: $branch"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

git checkout $branch
git submodule update --init --recursive
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ updates:
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
target-branch: "develop"
58 changes: 57 additions & 1 deletion .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ name: Checks - formatting
on:
pull_request:
workflow_dispatch:
issue_comment:
types: [created]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
format_check:
if: ${{ github.event_name != 'issue_comment' || (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
runs-on: ubuntu-latest
container:
image: ghcr.io/llnl/sundials_spack_cache:llvm-17.0.4-h4lflucc3v2vage45opbo2didtcuigsn.spack
Expand Down Expand Up @@ -37,10 +44,18 @@ jobs:
run: clang-format --version

- name: Check out repository code
if: github.event_name != 'issue_comment'
uses: actions/checkout@v4
with:
submodules: true

- name: Check out repository code
if: github.event_name == 'issue_comment'
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 0

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

Expand All @@ -56,9 +71,50 @@ jobs:
run: /usr/bin/git diff > format.patch

- name: Archive diff as a patch if we failed
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: format.patch
path: |
${{ github.workspace }}/format.patch
apply_format:
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
needs: format_check
runs-on: ubuntu-latest
steps:
# Checkout the GitHub created reference for the PR.
# The only way to do this is by using the "issue" number
# but that is really the PR number in this context.
# This is due to using an `issue_comment` event which
# is due to the GitHub Actions API that does not have
# a `pull_request_comment` event or something similar.
# This leaves us in a detached head state which is corrected
# in `apply-style/checkout.sh`
- name: Checkout repository code
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 0

- name: Checkout the right git ref
run: ./.github/actions/apply-style/checkout.sh

- name: Download the git diff from format_check
uses: actions/download-artifact@v4
with:
name: format.patch

- name: Apply patch
run: |
git apply format.patch
rm format.patch
- name: Commit fixes
run: |
git config user.name "format-robot"
git config user.email "[email protected]"
if [ -n "$(git status --porcelain)" ]; then
git commit -am 'apply format updates'
git push
fi
58 changes: 57 additions & 1 deletion .github/workflows/check-spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ name: Checks - spelling
on:
pull_request:
workflow_dispatch:
issue_comment:
types: [created]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
spelling_check:
if: ${{ github.event_name != 'issue_comment' || (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
runs-on: ubuntu-latest
steps:
- name: Install python3-pip
Expand All @@ -20,10 +27,18 @@ jobs:
run: codespell --version

- name: Check out repository code
if: github.event_name != 'issue_comment'
uses: actions/checkout@v4
with:
submodules: true

- name: Check out repository code
if: github.event_name == 'issue_comment'
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 0

- name: Run codespell
run: |
./scripts/spelling.sh
Expand All @@ -36,9 +51,50 @@ jobs:
run: /usr/bin/git diff > spelling.patch

- name: Archive diff as a patch if we failed
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: spelling.patch
path: |
${{ github.workspace }}/spelling.patch
apply_spelling:
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
needs: spelling_check
runs-on: ubuntu-latest
steps:
# Checkout the GitHub created reference for the PR.
# The only way to do this is by using the "issue" number
# but that is really the PR number in this context.
# This is due to using an `issue_comment` event which
# is due to the GitHub Actions API that does not have
# a `pull_request_comment` event or something similar.
# This leaves us in a detached head state which is corrected
# in `apply-style/checkout.sh`
- name: Checkout repository code
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 0

- name: Checkout the right git ref
run: ./.github/actions/apply-style/checkout.sh

- name: Download the git diff from spelling_check
uses: actions/download-artifact@v4
with:
name: spelling.patch

- name: Apply patch
run: |
git apply spelling.patch
rm spelling.patch
- name: Commit fixes
run: |
git config user.name "format-robot"
git config user.email "[email protected]"
if [ -n "$(git status --porcelain)" ]; then
git commit -am 'apply spelling updates'
git push
fi
63 changes: 59 additions & 4 deletions .github/workflows/check-swig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,41 @@ name: Checks - swig
on:
pull_request:
workflow_dispatch:
issue_comment:
types: [created]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
swig:
swig_check:
if: ${{ github.event_name != 'issue_comment' || (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
runs-on: ubuntu-latest

steps:
- name: Install swig
run: |
git clone https://github.com/sundials-codes/swig
cd swig
./autogen.sh
./configure --prefix=/usr/
make
make
sudo make install
swig -version
- name: Check out repository code
if: github.event_name != 'issue_comment'
uses: actions/checkout@v4
with:
submodules: true

- name: Check out repository code
if: github.event_name == 'issue_comment'
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 0

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

Expand All @@ -41,9 +55,50 @@ jobs:
run: /usr/bin/git diff > swig.patch

- name: Archive diff as a patch if we failed
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: swig.patch
path: |
${{ github.workspace }}/swig.patch
apply_swig:
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
needs: swig_check
runs-on: ubuntu-latest
steps:
# Checkout the GitHub created reference for the PR.
# The only way to do this is by using the "issue" number
# but that is really the PR number in this context.
# This is due to using an `issue_comment` event which
# is due to the GitHub Actions API that does not have
# a `pull_request_comment` event or something similar.
# This leaves us in a detached head state which is corrected
# in `apply-style/checkout.sh`
- name: Checkout repository code
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 0

- name: Checkout the right git ref
run: ./.github/actions/apply-style/checkout.sh

- name: Download the git diff from swig_check
uses: actions/download-artifact@v4
with:
name: swig.patch

- name: Apply patch
run: |
git apply swig.patch
rm swig.patch
- name: Commit fixes
run: |
git config user.name "format-robot"
git config user.email "[email protected]"
if [ -n "$(git status --porcelain)" ]; then
git commit -am 'apply swig updates'
git push
fi
4 changes: 2 additions & 2 deletions .github/workflows/spack-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
indexsize: ${{ matrix.indexsize }}
precision: ${{ matrix.precision }}
- name: Archive build files from failed build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: build_files
path: |
${{ github.workspace }}/test/build_*
!${{ github.workspace }}/test/build_*/Testing/output
- name: Archive output files from failed build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: output_files
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ jobs:
env:
CMAKE_BUILD_TYPE: ${{ matrix.buildtype }}
- name: Archive build files from failed build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: build_files
path: |
${{ github.workspace }}/test/build_*
!${{ github.workspace }}/test/build_*/Testing/output
- name: Archive output files from failed build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: output_files
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ specific linker flags e.g., MKL.

### Bug Fixes

Fixed a [bug](https://github.com/LLNL/sundials/issues/581) in the sparse matrix
implementation of `SUNMatScaleAddI` which caused out of bounds writes unless
`indexvals` were in ascending order for each row/column.

Fixed `ARKodeResize` not using the default `hscale` when an argument of `0` was
provided.

Expand All @@ -39,8 +43,14 @@ repeatedly.
Fixed compilation errors when building the Trilinos Teptra NVector with CUDA
support.

Fixed a CMake configuration issue related to aliasing an `ALIAS` target when
using `ENABLE_KLU=ON` in combination with a static-only build of SuiteSparse.

### Deprecation Notices

The ARKODE stepper specific functions to retrieve the number of right-hand side
function evaluations have been deprecated. Use `ARKodeGetNumRhsEvals` instead.

## Changes to SUNDIALS in release 7.1.1

### Bug Fixes
Expand Down
Loading

0 comments on commit eabd237

Please sign in to comment.