Skip to content

Commit

Permalink
Merge branch 'development' of github.com:ejyoo921/amrex into development
Browse files Browse the repository at this point in the history
  • Loading branch information
ejyoo921 committed Apr 8, 2024
2 parents a27c2a2 + 2a3955a commit 443eb35
Show file tree
Hide file tree
Showing 167 changed files with 1,901 additions and 938 deletions.
6 changes: 6 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Checks: >
clang-diagnostic-*,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-init-variables,
Expand All @@ -24,6 +25,7 @@ Checks: >
google-global-names-in-headers,
misc-*,
-misc-const-correctness,
-misc-include-cleaner,
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
modernize-*,
Expand All @@ -34,6 +36,7 @@ Checks: >
performance-*,
portability-*,
readability-*,
-readability-avoid-unconditional-preprocessor-if,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-function-size,
Expand All @@ -48,3 +51,6 @@ Checks: >
# Files not ending with nolint.H will be filtered in.
HeaderFilterRegex: '([^n].....|[^o]....|[^l]...|[^i]..|[^n].|[^t])\.H$'

# Only available in clang-tidy >= 17
HeaderFileExtensions: ['', "H", 'h', 'hh', 'hpp', 'hxx']
8 changes: 4 additions & 4 deletions .github/workflows/bittree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 15
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-15 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 15
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-15 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh 7
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
export PATH=/tmp/my-amrex/bin:$PATH
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh 14
.github/workflows/dependencies/dependencies_clang-tidy.sh 14
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-14 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
Expand All @@ -135,7 +135,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh 14
.github/workflows/dependencies/dependencies_clang-tidy.sh 14
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -160,7 +160,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-14 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -eu -o pipefail

# `man apt.conf`:
# Number of retries to perform. If this is non-zero APT will retry
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

if [[ ! -f /etc/apt/trusted.gpg.d/apt.llvm.org.asc ]]; then
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
fi

source /etc/os-release # set UBUNTU_CODENAME

sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME} main"
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-$1 main"

sudo apt-get update

sudo apt-get install -y --no-install-recommends \
clang-tidy-$1 libomp-$1-dev
53 changes: 27 additions & 26 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh 8
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
export PATH=/tmp/my-amrex/bin:$PATH
Expand All @@ -76,7 +76,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --test-dir build --output-on-failure
Expand All @@ -124,7 +124,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --test-dir build --output-on-failure
Expand All @@ -172,7 +172,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --test-dir build --output-on-failure
Expand All @@ -222,7 +222,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh 10
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
# Let's not use clang-tidy for this test because it wants to use C++20.
# ${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
# make -j4 -k -f clang-tidy-ccache-misses.mak \
# CLANG_TIDY=clang-tidy-12 \
# CLANG_TIDY=clang-tidy-17 \
# CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
Expand All @@ -281,7 +281,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh 8
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -305,6 +305,7 @@ jobs:
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_FLATTEN_FOR=OFF \
-DAMReX_ASSERTIONS=ON \
-DAMReX_TESTING=ON \
-DAMReX_BOUND_CHECK=ON \
Expand All @@ -321,7 +322,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
Expand All @@ -338,7 +339,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh 12
.github/workflows/dependencies/dependencies_clang-tidy.sh 14
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -385,7 +386,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-14 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
Expand All @@ -402,7 +403,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -427,7 +428,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -442,7 +443,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 15
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -467,7 +468,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-15 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -482,7 +483,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -507,7 +508,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -522,7 +523,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -547,7 +548,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -562,7 +563,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -586,7 +587,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -601,7 +602,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -631,7 +632,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand Down
Loading

0 comments on commit 443eb35

Please sign in to comment.