Cleanup tests #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ExaGOOP-CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{github.ref}}-${{github.head_ref}}-ci | |
cancel-in-progress: true | |
jobs: | |
Formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Check formatting | |
uses: DoozyX/[email protected] | |
with: | |
source: './Source' | |
exclude: '.' | |
extensions: 'H,h,cpp' | |
clangFormatVersion: 20 | |
CPU-GNUmake: | |
needs: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Ccache | |
run: | | |
wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz | |
tar xvf ccache-4.8-linux-x86_64.tar.xz | |
sudo cp -f ccache-4.8-linux-x86_64/ccache /usr/local/bin/ | |
- name: Set Up Ccache | |
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: DamBreak debug make | |
working-directory: ./Tests/Dam_Break | |
run: | | |
# echo "::add-matcher::.github/problem-matchers/gcc.json" | |
set -eu -o pipefail | |
ccache -z | |
make -j ${{env.NPROCS}} KEEP_BUILDINFO_CPP=TRUE USE_CCACHE=TRUE COMP=gnu USE_MPI=FALSE DEBUG=TRUE 2>&1 | tee -a build-output.txt | |
- name: DamBreak ccache report | |
working-directory: ./Tests/Dam_Break | |
run: | | |
ccache -s | |
du -hs ~/.cache/ccache | |
- name: DamBreak debug test | |
working-directory: ./Tests/Dam_Break | |
run: ./ExaGOOP3d.gnu.DEBUG.ex inputs_dambreak.in amr.max_step=1 amr.plot_int=-1 amr.check_int=-1 | |
#- name: DamBreak debug report | |
# working-directory: ./Tests/Dam_Break | |
# run: | | |
# egrep "Warning:|Error:|warning:|error:" build-output.txt \ | |
# | egrep -v "Submodules/amrex|GNUmakefile" \ | |
# | egrep -v "ld: warning:" | sort | uniq \ | |
# | awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > warnings.txt | |
# cat warnings.txt | |
# export return=$(tail -n 1 warnings.txt | awk '{print $2}') | |
# exit ${return} | |
GPU-Nvidia: | |
name: GPU-CUDA | |
needs: [Formatting, CPU-GNUmake] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
enable_eb: [EB-ON] | |
include: | |
- enable_eb: EB-ON | |
use_eb: "ON" | |
fail-fast: false | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup | |
run: | | |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV | |
echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV | |
echo "CCACHE_COMPRESSLEVEL=10" >> $GITHUB_ENV | |
echo "CCACHE_LOGFILE=${{github.workspace}}/ccache.log.txt" >> $GITHUB_ENV | |
echo "CCACHE_MAXSIZE=300M" >> $GITHUB_ENV | |
- name: Dependencies | |
run: | | |
${{github.workspace}}/Submodules/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb | |
sudo dpkg -i cuda-keyring_1.1-1_all.deb | |
sudo apt-get update | |
sudo apt-get install -y cuda-command-line-tools-12-6 \ | |
cuda-compiler-12-6 cuda-minimal-build-12-6 \ | |
cuda-nvml-dev-12-6 cuda-nvtx-12-6 \ | |
libcurand-dev-12-6 cuda-cupti-dev-12-6 \ | |
libcusolver-dev-12-6 libcusparse-dev-12-6 \ | |
libcublas-dev-12-6 libcurand-dev-12-6 libnvjitlink-12-6 | |
- name: Install Ccache | |
run: | | |
wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz | |
tar xvf ccache-4.8-linux-x86_64.tar.xz | |
sudo cp -f ccache-4.8-linux-x86_64/ccache /usr/local/bin/ | |
- name: Set Up Ccache | |
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 | |
run: | | |
export PATH=/usr/local/nvidia/bin:/usr/local/cuda-12.6/bin:${PATH} | |
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda-12.6/lib:${LD_LIBRARY_PATH} | |
cmake -Bbuild-cuda \ | |
-DCMAKE_BUILD_TYPE:STRING=Release \ | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
-DEXAGOOP_ENABLE_MPI:BOOL=OFF \ | |
-DEXAGOOP_ENABLE_CUDA:BOOL=ON \ | |
-DEXAGOOP_ENABLE_EB:BOOL=${{matrix.use_eb}} \ | |
-DAMReX_CUDA_ERROR_CAPTURE_THIS:BOOL=ON \ | |
-DCMAKE_CUDA_ARCHITECTURES:STRING=80 \ | |
-DCMAKE_CUDA_COMPILER_LAUNCHER:STRING=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ | |
${{github.workspace}} | |
- name: Build | |
run: | | |
ccache -z | |
cmake --build build-cuda --parallel ${{env.NPROCS}} | |
- name: Ccache Report | |
run: | | |
ccache -s | |
du -hs ~/.cache/ccache | |
GPU-AMD: | |
name: GPU-HIP | |
needs: [Formatting, CPU-GNUmake] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup | |
run: | | |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV | |
echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV | |
echo "CCACHE_COMPRESSLEVEL=10" >> $GITHUB_ENV | |
echo "CCACHE_LOGFILE=${{github.workspace}}/ccache.log.txt" >> $GITHUB_ENV | |
echo "CCACHE_MAXSIZE=200M" >> $GITHUB_ENV | |
- name: Dependencies | |
run: | | |
${{github.workspace}}/Submodules/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh | |
sudo mkdir --parents --mode=0755 /etc/apt/keyrings | |
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null | |
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.3.3 noble main" | sudo tee --append /etc/apt/sources.list.d/rocm.list | |
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 | |
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' | sudo tee -a /etc/profile.d/rocm.sh | |
sudo apt-get update | |
sudo apt-get install -y rocm-dev rocrand-dev rocprim-dev hiprand-dev rocsparse-dev | |
- name: Install Ccache | |
run: | | |
wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz | |
tar xvf ccache-4.8-linux-x86_64.tar.xz | |
sudo cp -f ccache-4.8-linux-x86_64/ccache /usr/local/bin/ | |
- name: Set Up Ccache | |
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 | |
run: | | |
source /etc/profile.d/rocm.sh | |
which clang | |
which clang++ | |
which hipcc | |
hipcc --version | |
hipconfig --full | |
cmake -B${{runner.workspace}}/build-hip \ | |
-DCMAKE_BUILD_TYPE:STRING=Release \ | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
-DCMAKE_CXX_COMPILER:STRING=$(which clang++) \ | |
-DCMAKE_C_COMPILER:STRING=$(which clang) \ | |
-DEXAGOOP_ENABLE_MPI:BOOL=OFF \ | |
-DEXAGOOP_ENABLE_HIP:BOOL=ON \ | |
-DAMReX_AMD_ARCH:STRING=gfx90a \ | |
-DCMAKE_HIP_ARCHITECTURES:STRING=gfx90a \ | |
-DAMDGPU_TARGETS:STRING=gfx90a \ | |
-DGPU_TARGETS:STRING=gfx90a \ | |
-DAMReX_GPU_RDC:BOOL=OFF \ | |
-DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ | |
${{github.workspace}} | |
- name: Build | |
run: | | |
#echo "::add-matcher::.github/problem-matchers/gcc.json" | |
source /etc/profile.d/rocm.sh | |
ccache -z | |
cmake --build ${{runner.workspace}}/build-hip --parallel ${{env.NPROCS}} | |
- name: Ccache Report | |
run: | | |
ccache -s | |
du -hs ~/.cache/ccache | |
GPU-Intel: | |
name: GPU-SYCL | |
needs: [Formatting, CPU-GNUmake] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup | |
run: | | |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV | |
echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV | |
echo "CCACHE_COMPRESSLEVEL=10" >> $GITHUB_ENV | |
echo "CCACHE_LOGFILE=${{github.workspace}}/ccache.log.txt" >> $GITHUB_ENV | |
echo "CCACHE_MAXSIZE=200M" >> $GITHUB_ENV | |
echo "CCACHE_DEPEND=1" >> $GITHUB_ENV | |
- name: Dependencies | |
run: | | |
${{github.workspace}}/Submodules/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh | |
sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | |
sudo apt-get update | |
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp=2024.2.1-1079 intel-oneapi-mkl-devel=2024.2.2-15 | |
- name: Install Ccache | |
run: | | |
wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz | |
tar xvf ccache-4.8-linux-x86_64.tar.xz | |
sudo cp -f ccache-4.8-linux-x86_64/ccache /usr/local/bin/ | |
- name: Set Up Ccache | |
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 | |
run: | | |
set +e | |
source /opt/intel/oneapi/setvars.sh | |
set -e | |
cmake -B${{runner.workspace}}/build-sycl \ | |
-DCMAKE_BUILD_TYPE:STRING=Release \ | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
-DCMAKE_CXX_COMPILER:STRING=$(which icpx) \ | |
-DCMAKE_C_COMPILER:STRING=$(which icx) \ | |
-DCMAKE_CXX_FLAGS:STRING=-fsycl \ | |
-DEXAGOOP_ENABLE_MPI:BOOL=OFF \ | |
-DEXAGOOP_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ | |
-DEXAGOOP_ENABLE_SYCL:BOOL=ON \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ | |
${{github.workspace}} | |
- name: Build | |
run: | | |
set +e | |
source /opt/intel/oneapi/setvars.sh | |
set -e | |
ccache -z | |
cmake --build ${{runner.workspace}}/build-sycl --parallel ${{env.NPROCS}} | |
- name: Ccache Report | |
run: | | |
ccache -s | |
du -hs ~/.cache/ccache | |
Lint-codeql: | |
needs: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: cpp | |
queries: +security-and-quality | |
config-file: ./.github/codeql/codeql-config.yml | |
- name: Configure | |
run: | | |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV | |
cmake -B${{runner.workspace}}/build-codeql \ | |
-DCMAKE_BUILD_TYPE:STRING=Debug \ | |
-DCMAKE_CXX_COMPILER:STRING=clang++ \ | |
-DCMAKE_C_COMPILER:STRING=clang \ | |
-DEXAGOOP_ENABLE_MPI:BOOL=OFF \ | |
-DEXAGOOP_ENABLE_OPENMP:BOOL=OFF \ | |
-DEXAGOOP_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ | |
-DEXAGOOP_ENABLE_CLANG_TIDY:BOOL=OFF \ | |
${{github.workspace}} | |
- name: Build | |
run: | | |
cmake --build ${{runner.workspace}}/build-codeql --parallel ${{env.NPROCS}} | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:cpp" | |
upload: False | |
output: sarif-results | |
- name: Filter CodeQL sarif | |
uses: advanced-security/filter-sarif@v1 | |
with: | |
patterns: '**/Submodules/amrex/**' | |
input: sarif-results/cpp.sarif | |
output: sarif-results/cpp.sarif | |
- name: Upload CodeQL sarif | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: sarif-results/cpp.sarif |