-
Notifications
You must be signed in to change notification settings - Fork 1
104 lines (90 loc) · 2.86 KB
/
Linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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: "10.0"
gcc-version: "9.4"
nvcc-version: "10.0"
# Latest supported versions
- python-version: "3.11"
openmm-version: "8.1"
cuda-version: "11.8"
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*