Skip to content

Commit

Permalink
Merge with upstream development
Browse files Browse the repository at this point in the history
  • Loading branch information
akashdhruv committed Oct 21, 2024
2 parents 134d269 + e3adba1 commit 8f91462
Show file tree
Hide file tree
Showing 802 changed files with 66,781 additions and 44,954 deletions.
7 changes: 7 additions & 0 deletions .codespell-ignore-words
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Blocs
BOUN
inout
parms
pres
rime
wth
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
skip = .git,*.ipynb,*.bib,*.ps,*.patch,*~,CHANGES,*/Submodules,*/tmp_build_dir,Cell_D_*
ignore-words = .codespell-ignore-words
uri-ignore-words-list = *
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

updates:
- package-ecosystem: gitsubmodule
schedule:
interval: "monthly"
directory: /
allow:
- dependency-name: "Submodules/AMReX"
6 changes: 3 additions & 3 deletions .github/workflows/c-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: cpp-linter
on: [pull_request]
jobs:
cpp-linter:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -30,7 +30,7 @@ jobs:
run: python3 Submodules/cpp-linter-action/run_on_changed_files.py ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -header-filter=Source/ -ignore-files="AMReX|GoogleTest" -run-linter

- name: Archive clang tidy report
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: clang-tidy-report
path: clang-tidy-report.txt
38 changes: 34 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -46,12 +46,24 @@ jobs:
# Install MPI
${{matrix.install_deps}}
- name: Install CCache
run: Submodules/AMReX/.github/workflows/dependencies/dependencies_ccache.sh

- name: Set Up Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Configure CMake
run: |
cmake \
-B${{runner.workspace}}/ERF/build-${{matrix.os}} \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/ERF/install \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DERF_DIM:STRING=3 \
-DERF_ENABLE_MPI:BOOL=ON \
-DERF_ENABLE_TESTS:BOOL=ON \
Expand All @@ -63,7 +75,25 @@ jobs:
- name: Build
run: |
cmake --build ${{runner.workspace}}/ERF/build-${{matrix.os}} --parallel ${{env.NPROCS}};
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=600M
ccache -z
cmake --build ${{runner.workspace}}/ERF/build-${{matrix.os}} --parallel ${{env.NPROCS}} \
2>&1 | tee -a ${{runner.workspace}}/build-output.txt;
ccache -s
du -hs ~/.cache/ccache
- name: Report
run: |
egrep "warning:|error:" ${{runner.workspace}}/build-output.txt \
| egrep -v "Submodules/amrex" | egrep -v "lto-wrapper: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > ${{runner.workspace}}/build-output-warnings.txt
cat ${{runner.workspace}}/build-output-warnings.txt
export return=$(tail -n 1 ${{runner.workspace}}/build-output-warnings.txt | awk '{print $2}')
exit ${return}
- name: Regression Tests
run: |
Expand All @@ -81,14 +111,14 @@ jobs:
# cd ..
# gcovr -g -k -r . --xml regressioncov.html # -v
# - name: Success artifacts
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# if: success()
# with:
# name: build-and-test
# path: |
# ${{runner.workspace}}/ERF/regressioncov.html
# - name: Failing test artifacts
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: build-and-test
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/cleanup-cache-postpr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CleanUpCachePostPR

on:
workflow_run:
workflows: [PostPR]
types:
- completed

jobs:
CleanUpCcacheCachePostPR:
name: Clean Up Ccache Cache Post PR
runs-on: ubuntu-22.04
permissions:
actions: write
contents: read
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Clean up ccache
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
# For debugging cat ${GITHUB_EVENT_PATH} to see the payload.
pr_head_sha=${{ github.event.workflow_run.head_sha }}
pr_number=$(gh pr list --state all --search $pr_head_sha --json number --jq '.[0].number')
echo "Post-PR cache cleanup for PR ${pr_number}"
BRANCH=refs/pull/${pr_number}/merge
# Setting this to not fail the workflow while deleting cache keys.
set +e
keys=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH | cut -f 1)
# $keys might contain spaces. Thus we set IFS to \n.
IFS=$'\n'
for k in $keys
do
gh actions-cache delete "$k" -R $REPO -B $BRANCH --confirm
done
unset IFS
67 changes: 67 additions & 0 deletions .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CleanUpCache

on:
workflow_run:
workflows: [ERF CI, ERF CUDA CI, ERF CI (hip), ERF CI (sycl), Linux GCC, MacOS]
types:
- completed

jobs:
CleanUpCcacheCache:
name: Clean Up Ccache Cache for ${{ github.event.workflow_run.name }}
runs-on: ubuntu-22.04
permissions:
actions: write
contents: read
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Clean up ccache
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
# push or pull_request or schedule or ...
EVENT=${{ github.event.workflow_run.event }}
# Triggering workflow run name (e.g., LinuxClang)
WORKFLOW_NAME="${{ github.event.workflow_run.name }}"
# For debugging, cat ${GITHUB_EVENT_PATH} to see the payload.
if [[ $EVENT == "pull_request" ]]; then
pr_head_sha=${{ github.event.workflow_run.head_sha }}
pr_number=$(gh pr list --search $pr_head_sha --json number --jq '.[0].number')
echo "Clean up cache for PR ${pr_number}"
BRANCH=refs/pull/${pr_number}/merge
else
BRANCH=refs/heads/${{ github.event.workflow_run.head_branch }}
fi
# Setting this to not fail the workflow while deleting cache keys.
set +e
# In our cache keys, substring after `-git-` is git hash, substring
# before that is a unique id for jobs (e.g., `ccache-LinuxClang-configure-2d`).
# The goal is to keep the last used key of each job and delete all others.
# something like ccache-LinuxClang-
keyprefix="ccache-${WORKFLOW_NAME}-"
cached_jobs=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH --key "$keyprefix" | awk -F '-git-' '{print $1}' | sort | uniq)
# cached_jobs is something like "ccache-LinuxClang-configure-1d ccache-LinuxClang-configure-2d".
# It might also contain spaces. Thus we set IFS to \n.
IFS=$'\n'
for j in $cached_jobs
do
# Delete all entries except the last used one
old_keys=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH --key "${j}-git-" --sort last-used | cut -f 1 | tail -n +2)
for k in $old_keys
do
gh actions-cache delete "$k" -R $REPO -B $BRANCH --confirm
done
done
unset IFS
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: codespell

on: [push, pull_request]

concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-codespell
cancel-in-progress: true

jobs:
codespell:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Install codespell
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends python3-pip
pip3 install --user codespell
- name: Run codespell
run: codespell
33 changes: 31 additions & 2 deletions .github/workflows/cuda-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,51 @@ jobs:
uses: styfle/[email protected]
with:
access_token: ${{github.token}}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Prepare CUDA environment
run: Submodules/AMReX/.github/workflows/dependencies/dependencies_nvcc.sh ${{matrix.cuda_ver}}
- name: Install CCache
run: Submodules/AMReX/.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Configure and build
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=600M
ccache -z
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
which nvcc || echo "nvcc not in PATH!"
cmake -Bbuild-${{matrix.cuda_pkg}} \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON \
-DERF_DIM:STRING=3 \
-DERF_ENABLE_MPI:BOOL=ON \
-DERF_ENABLE_CUDA:BOOL=ON \
-DERF_ENABLE_REGRESSION_TESTS_ONLY:BOOL=ON .
cmake --build build-${{matrix.cuda_pkg}} -- -j $(nproc)
cmake --build build-${{matrix.cuda_pkg}} -- -j $(nproc) \
2>&1 | tee -a ${{runner.workspace}}/build-${{matrix.cuda_pkg}}-output.txt;
ccache -s
du -hs ~/.cache/ccache
- name: Report
run: |
egrep "warning:|error:" ${{runner.workspace}}/build-${{matrix.cuda_pkg}}-output.txt \
| egrep -v "Submodules/amrex" | egrep -v "lto-wrapper: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > ${{runner.workspace}}/build-${{matrix.cuda_pkg}}-output-warnings.txt
cat ${{runner.workspace}}/build-${{matrix.cuda_pkg}}-output-warnings.txt
export return=$(tail -n 1 ${{runner.workspace}}/build-${{matrix.cuda_pkg}}-output-warnings.txt | awk '{print $2}')
exit ${return}
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ concurrency:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Dependencies
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ on: [push]

jobs:
paper:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled
Expand Down
Loading

0 comments on commit 8f91462

Please sign in to comment.