forked from pyscf/pyscf
-
Notifications
You must be signed in to change notification settings - Fork 20
94 lines (90 loc) · 3.25 KB
/
ci.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
# https://docs.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions
#
# Contributors to the evolution of this form:
#
# sunqm
# fishjojo
# mjw99
# yangcal
# maxscheurer
#
name: CI
#FIXME: workflow dependency not working on non-default branch?
#on:
# workflow_run:
# workflows:
# - Lint
# types:
# - completed
on: [push, pull_request]
jobs:
linux-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ["3.8", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install and Test
run: ./.github/workflows/run_ci.sh
- name: Upload to codecov
if: matrix.python-version == "3.8"
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
linux-build-aarch64:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
pyver: [cp39-cp39]
env:
img: quay.io/pypa/manylinux2014_aarch64
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
- name: Build Wheel
run: |
docker run --rm -v ${{ github.workspace }}:/src/pyscf:rw --workdir=/src/pyscf ${{ env.img }} \
bash -exc '/opt/python/${{ matrix.pyver }}/bin/pip install --upgrade pip setuptools && \
/opt/python/${{ matrix.pyver }}/bin/pip install "numpy!=1.16,!=1.17" "scipy!=1.5" h5py pytest pytest-cov pytest-timer pyberny geometric && \
yum install -y epel-release && \
yum-config-manager --enable epel && \
yum install -y openblas-devel gcc cmake curl && \
cd ./pyscf/lib && curl -o deps.tar.gz -L "https://github.com/pyscf/pyscf-build-deps/blob/master/pyscf-2.2-aarch64-deps.tar.gz?raw=true" && \
tar xzf deps.tar.gz && \
mkdir build && cd build && \
cmake -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF -DBUILD_LIBCINT=OFF .. && \
make -j2 && cd .. && rm -Rf build && cd ../.. && \
export OMP_NUM_THREADS=1 && export PYTHONPATH=$(pwd):$PYTHONPATH && \
echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > .pyscf_conf.py && \
echo "dftd3_DFTD3PATH = './pyscf/lib/deps/lib'" >> .pyscf_conf.py && \
echo "scf_hf_SCF_mute_chkfile = True" >> .pyscf_conf.py && \
ulimit -s 20000 && /opt/python/${{ matrix.pyver }}/bin/pytest pyscf/ --ignore=pyscf/adc --ignore=pyscf/pbc/df --ignore=pyscf/pbc/cc -s -c setup.cfg pyscf'
macos-build:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install and Test
run: ./.github/workflows/run_ci.sh
- name: Upload to codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}