Skip to content

Linux

Linux #174

Workflow file for this run

name: Linux
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
# Weely tests run on Sundays at 4 AM UTC (12 AM EST):
- cron: "0 4 * * 0"
jobs:
unix:
runs-on: ubuntu-20.04
name: Linux (Python ${{ matrix.python-version }}, OpenMM ${{ matrix.openmm-version }}, CUDA ${{ matrix.cuda-version }})
strategy:
fail-fast: false
matrix:
include:
# Oldest supported versions
- python-version: "3.9"
openmm-version: "7.7"
cuda-version: "11.0.3"
gcc-version: "9.4"
nvcc-version: "11.0"
# Latest supported versions
- python-version: "3.11"
openmm-version: "8.1"
cuda-version: "11.8.0"
gcc-version: "13.2"
nvcc-version: "11.8"
steps:
- name: "Check out"
uses: actions/checkout@v3
- name: "Install CUDA Toolkit on Linux"
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: ${{ matrix.cuda-version }}
method: 'network'
- name: "Install AMD OpenCL on Linux"
run: source devtools/scripts/install_amd_opencl.sh
- name: "Update the conda enviroment file"
uses: cschleiden/replace-tokens@v1
with:
tokenPrefix: '@'
tokenSuffix: '@'
files: devtools/conda-envs/build-ubuntu-20.04.yml
env:
CUDATOOLKIT_VERSION: ${{ matrix.cuda-version }}
GCC_VERSION: ${{ matrix.gcc-version }}
OPENMM_VERSION: ${{ matrix.openmm-version }}
- uses: conda-incubator/setup-miniconda@v2
name: "Install dependencies with conda"
with:
activate-environment: build
environment-file: devtools/conda-envs/build-ubuntu-20.04.yml
python-version: ${{ matrix.python-version }}
- name: "List conda packages"
shell: bash -l {0}
run: conda list
- name: "Configure"
shell: bash -l {0}
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCUDA_TOOLKIT_ROOT_DIR=${CUDA_PATH} \
-DCUDA_CUDA_LIBRARY=${CUDA_PATH}/lib64/stubs
- name: "Build"
shell: bash -l {0}
run: |
cd build
make -j2 install
make -j2 PythonInstall
- name: "List plugins"
shell: bash -l {0}
run: |
python -c "import openmm as mm; print('---Loaded---', *mm.pluginLoadedLibNames, '---Failed---', *mm.Platform.getPluginLoadFailures(), sep='\n')"
- name: "Run C++ test"
shell: bash -l {0}
run: |
cd build
ctest --output-on-failure --exclude-regex 'TestCuda'
- name: "Run Python test"
shell: bash -l {0}
run: |
cd build/python/tests
pytest --verbose -k 'not Cuda' Test*