forked from pyscf/gpu4pyscf
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (65 loc) · 2.5 KB
/
unittest.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: self hosted CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
single-gpu:
runs-on: [self-hosted, Linux, X64, v100]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install --upgrade pip
pip3 install pytest-benchmark
pip3 install flake8 pytest coverage pytest-cov pyscf-dispersion
pip3 install pyscf --upgrade
pip3 install git+https://github.com/pyscf/properties --upgrade
pip3 install numpy --upgrade
pip3 install h5py --upgrade
pip3 install gpu4pyscf-libxc-cuda12x --upgrade
pip3 install cupy-cuda12x --upgrade
git config --global core.compression 9
- name: Build GPU4PySCF
run: |
export CUDA_HOME=/usr/local/cuda
export CMAKE_CONFIGURE_ARGS="-DBUILD_LIBXC=OFF -DCUDA_ARCHITECTURES=70-real -DBUILD_CUTLASS=ON"
sh build.sh
- name: Test with pytest
run: |
echo $GITHUB_WORKSPACE
export PYTHONPATH="${PYTHONPATH}:$(pwd)"
pytest -m "not benchmark" --cov=$GITHUB_WORKSPACE
multi-gpu:
runs-on: [self-hosted, Linux, X64, 2T4]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install --upgrade pip
pip3 install pytest-benchmark
pip3 install flake8 pytest coverage pytest-cov pyscf-dispersion
pip3 install pyscf --upgrade
pip3 install git+https://github.com/pyscf/properties --upgrade
pip3 install numpy --upgrade
pip3 install h5py --upgrade
pip3 install gpu4pyscf-libxc-cuda12x --upgrade
pip3 install cupy-cuda12x --upgrade
git config --global core.compression 9
- name: Build GPU4PySCF
run: |
export CUDA_HOME=/usr/local/cuda
export CMAKE_CONFIGURE_ARGS="-DBUILD_LIBXC=OFF -DCUDA_ARCHITECTURES=70-real -DBUILD_CUTLASS=ON"
sh build.sh
- name: Test with pytest
run: |
echo $GITHUB_WORKSPACE
export PYTHONPATH="${PYTHONPATH}:$(pwd)"
pytest -m "not benchmark" --cov=$GITHUB_WORKSPACE