Create a DPDintegrator class #185
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
name: CI | ||
on: | ||
push: | ||
branches: [ master, v2.x ] | ||
pull_request: | ||
branches: [ master, v2.x ] | ||
schedule: | ||
# Run every Sunday at midnight | ||
- cron: '0 0 * * 0' | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
jobs: | ||
build: | ||
name: ${{ matrix.name }} | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Oldest supported versions | ||
- name: Linux (CUDA 10.2) | ||
cuda: "10.*" | ||
gcc: "7.*" | ||
cuda12: 'false' | ||
# Latest supported versions | ||
- name: Linux (CUDA 12) | ||
cuda: "12.*" | ||
gcc: "11.*" | ||
cuda12: 'true' | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v2 | ||
- name: Manage disk space | ||
run: | | ||
sudo mkdir -p /opt/empty_dir || true | ||
for d in \ | ||
/opt/ghc \ | ||
/opt/hostedtoolcache \ | ||
/usr/lib/jvm \ | ||
/usr/local/.ghcup \ | ||
/usr/local/lib/android \ | ||
/usr/local/share/powershell \ | ||
/usr/share/dotnet \ | ||
/usr/share/swift \ | ||
; do | ||
sudo rsync --stats -a --delete /opt/empty_dir/ $d || true | ||
done | ||
sudo apt-get purge -y -f firefox \ | ||
google-chrome-stable \ | ||
microsoft-edge-stable gcc | ||
sudo apt-get autoremove -y >& /dev/null | ||
sudo apt-get autoclean -y >& /dev/null | ||
sudo docker image prune --all --force | ||
df -h | ||
- name: Prepare dependencies (CUDA <12) | ||
if: ${{ matrix.cuda12 == 'false'}} | ||
run: | | ||
sed -i -e "/cuda-version/c\ - cudatoolkit-dev ${{ matrix.cuda }}" \ | ||
-e "/cuda-libraries-dev/d" \ | ||
-e "/cuda-nvcc/d" \ | ||
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}\n - gcc_linux-64" \ | ||
environment.yml | ||
- name: Prepare dependencies (CUDA >=12) | ||
if: ${{ matrix.cuda12 == 'true' }} | ||
run: | | ||
sed -i -e "/cuda-version/c\ - cuda-version ${{ matrix.cuda }}" \ | ||
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \ | ||
environment.yml | ||
- name: Show dependency file | ||
run: cat environment.yml | ||
- name: Install Mamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: environment.yml | ||
cache-environment: false | ||
cache-downloads: true | ||
env: | ||
CONDA_OVERRIDE_CUDA: ${{ matrix.nvcc }} | ||
- name: List environment | ||
run: | | ||
micromamba activate uammd | ||
micromamba list | ||
- name: Configure and compile examples | ||
run: | | ||
micromamba activate uammd | ||
mkdir examples/build && cd examples/build | ||
cmake -DCMAKE_VERBOSE_MAKEFILE=yes .. | ||
make -j3 | ||
- name: Configure and compile tests | ||
run: | | ||
micromamba activate uammd | ||
mkdir test/build && cd test/build | ||
cmake -DCMAKE_VERBOSE_MAKEFILE=yes .. | ||
make -j3 | ||
- name: Check header installation | ||
run: | | ||
micromamba activate uammd | ||
mkdir build && cd build | ||
cmake -DCMAKE_INSTALL_PREFIX=yes .. | ||
make install | ||
echo "#include<uammd.cuh>" > test.cu | ||
echo "int main(){return 0;}" >> test.cu | ||
echo "${CONDA_PREFIX}" | ||
nvcc -std=c++14 -I"${CONDA_PREFIX}/include/uammd" -I"${CONDA_PREFIX}/include/uammd/third_party" test.cu -o /tmp/test | ||