Skip to content

Commit

Permalink
Add CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Jan 4, 2024
1 parent 1198d65 commit f78880b
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 9 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,72 @@ jobs:
ccache -s
du -hs ~/.cache/ccache
test_openpmd:
name: openPMD I/O Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh 15
.github/workflows/dependencies/dependencies_clang-tidy.sh 15
.github/workflows/dependencies/dependencies_ccache.sh
- name: Install openPMD
run: |
sudo apt-get install -y --no-install-recommends libhdf5-mpi-dev
wget -q https://github.com/openPMD/openPMD-api/archive/refs/tags/0.15.2.tar.gz
tar xfz 0.15.2.tar.gz
cd openPMD-api-0.15.2
mkdir build
cd build
cmake .. -DopenPMD_USE_PYTHON=OFF
make -j2
sudo make install
- name: Set Up Cache
uses: actions/cache@v3
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Build & Test
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor"}
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=200M
export CCACHE_EXTRAFILES=${{ github.workspace }}/.clang-tidy
export CCACHE_LOGFILE=${{ github.workspace }}/ccache.log.txt
ccache -z
mkdir build
cd build
cmake .. \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_SPACEDIM=3 \
-DAMReX_MPI=ON \
-DAMReX_OMP=OFF \
-DAMReX_FORTRAN=OFF \
-DAMReX_EB=OFF \
-DAMReX_LINEAR_SOLVERS=OFF \
-DAMReX_AMRLEVEL=OFF \
-DAMReX_PARTICLES=ON \
-DCMAKE_C_COMPILER=$(which clang-15) \
-DCMAKE_CXX_COMPILER=$(which clang++-15) \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j 2
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j2 -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-15 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
ccache -s
du -hs ~/.cache/ccache
save_pr_number:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
Expand Down
18 changes: 9 additions & 9 deletions Tests/openPMDTests/ptls/inputs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@

# Domain size

#nx = 32 # number of grid points along the x axis
#ny = 32 # number of grid points along the y axis
#nz = 32 # number of grid points along the z axis
nx = 32 # number of grid points along the x axis
ny = 32 # number of grid points along the y axis
nz = 32 # number of grid points along the z axis

#nx = 64 # number of grid points along the x axis
#ny = 64 # number of grid points along the y axis
#nz = 64 # number of grid points along the z axis

nx = 128 # number of grid points along the x axis
ny = 128 # number of grid points along the y axis
nz = 128 # number of grid points along the z axis
#nx = 128 # number of grid points along the x axis
#ny = 128 # number of grid points along the y axis
#nz = 128 # number of grid points along the z axis

# Maximum allowable size of each subdomain in the problem domain;
# this is used to decompose the domain for parallel calculations.
max_grid_size = 32
max_grid_size = 16

# Number of particles per cell
nppc = 10
nppc = 2

# Verbosity
verbose = true # set to true to get more verbosity

nlevs=2
nlevs=2

0 comments on commit f78880b

Please sign in to comment.