Skip to content

CI

CI #92

Workflow file for this run

name: CI
on:
push:
branches: [ v2.x ]
pull_request:
branches: [ 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.2.89"
gcc: "8.5.*"
nvcc: "10.2"
# Latest supported versions
- name: Linux (CUDA 11.8)
cuda: "11.8.0"
gcc: "10.3.*"
nvcc: "11.8"
steps:
- name: Check out
uses: actions/checkout@v2
- name: Install Mamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: false
extra-specs: ""
cache-env: true
cache-downloads: true
- name: Install CUDA Toolkit
uses: Jimver/[email protected]
with:
cuda: ${{ matrix.cuda }}
linux-local-args: '["--toolkit", "--override"]'
- name: Prepare dependencies
run: |
sed -i -e "/cudatoolkit/c\ - cudatoolkit ${{ matrix.cuda }}" \
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \
-e "/nvcc_linux-64/c\ - nvcc_linux-64 ${{ matrix.nvcc }}" \
environment.yml
- name: Show dependency file
run: cat environment.yml
- name: Install dependencies
run: micromamba env create -n uammd -f environment.yml
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