Updated yml #17
This file contains 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
# .github/workflows/cuda.yml | |
name: CUDA CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
cuda-build-and-test: | |
runs-on: ubuntu-latest | |
container: | |
image: nvidia/cuda:12.6.2-devel-ubuntu22.04 | |
steps: | |
- name: Skip Duplicate Actions | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
skip_after_successful_duplicate: "true" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update | |
apt-get install -y \ | |
cmake \ | |
build-essential \ | |
g++ \ | |
gcc \ | |
libboost-dev \ | |
libboost-all-dev \ | |
libhdf5-dev \ | |
libgmp-dev \ | |
libtbb-dev \ | |
libopenmpi-dev \ | |
openmpi-bin \ | |
libjsoncpp-dev \ | |
python3.7 \ | |
python3-pip \ | |
python3-dev \ | |
wget \ | |
gmsh \ | |
libgmsh-dev \ | |
libmpfr-dev | |
- name: Exporting OpenMP and CUDA environment variables | |
shell: bash | |
run: | | |
echo "export OMP_PROC_BIND=spread" >> $GITHUB_ENV | |
echo "export OMP_PLACES=threads" >> $GITHUB_ENV | |
echo "export CUDA_VISIBLE_DEVICES=0" >> $GITHUB_ENV | |
- name: Install gdown for Google Drive downloads | |
run: pip install gdown | |
- name: Download dependencies | |
run: | | |
mkdir -p .github/dependencies/ | |
gdown "https://drive.google.com/uc?id=1BaMXRJLpsgOCl_lNpe9UcumxB9SfFvP9" -O .github/dependencies/trilinos-install-16.0-serial-omp-mpi-cuda.tar.gz | |
gdown "https://drive.google.com/uc?id=153V-ZeFh47PAbkDta_K8RsUEeqFhXlaF" -O .github/dependencies/cgal-install-6.0.1.tar.gz | |
gdown "https://drive.google.com/uc?id=1z3JnT7Yctd0Hb8NqNEMX28rd3J1kuP7e" -O .github/dependencies/nvcc_wrapper.tar.gz | |
- name: Extract Trilinos | |
run: | | |
mkdir -p /usr/local/Trilinos | |
tar -xzvf .github/dependencies/trilinos-install-16.0-serial-omp-mpi-cuda.tar.gz -C /usr/local/Trilinos | |
- name: Extract CGAL | |
run: | | |
mkdir -p /usr/local/CGAL | |
tar -xzvf .github/dependencies/cgal-install-6.0.1.tar.gz -C /usr/local/CGAL | |
- name: Extract nvcc_wrapper | |
run: | | |
tar -xzvf .github/dependencies/nvcc_wrapper.tar.gz -C /usr/local/bin | |
chmod +x /usr/local/bin/nvcc_wrapper | |
- name: Configure CMake | |
run: | | |
mkdir -pv build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Release .. | |
- name: Build | |
run: | | |
cd build | |
make -j$(nproc) | |
- name: Run Tests | |
run: | | |
cd build | |
ctest --output-on-failure | |
- name: Upload Test Artifacts | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs | |
path: build/logs/ |