-
Notifications
You must be signed in to change notification settings - Fork 1
132 lines (129 loc) · 4.57 KB
/
build.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: tests
on:
# uncoment the two line below to run the workflow for every even day of the month at 24:00h
schedule:
- cron: '0 0 */2 * *'
push:
branches:
- main
# uncomment below if the workflow must run for every push to a PR pointing to the main branch
pull_request:
branches:
- main
jobs:
build:
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest'] #, 'windows-latest']
python-version: ['3.11'] #['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
include:
- os: ubuntu-latest
CONDA_OS: linux-64
- os: macos-latest
CONDA_OS: osx-64
steps:
- uses: actions/checkout@v4
- name: Set up conda environment with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test
auto-activate-base: false
- name: Conda info
shell: bash -l {0}
run: |
conda activate test
conda info
conda list
conda config --show-sources
conda config --show
- name: Python info
shell: bash -l {0}
run: |
conda activate test
which python
which pip
python --version
- name: Install qc2
shell: bash -l {0}
run : |
conda activate test
python -m pip install .[dev,publishing,pennylane]
- name: PSI4 install for tests
shell: bash -l {0}
run : |
conda activate test
conda install psi4 -c conda-forge/label/libint_dev -c conda-forge # these conda channels my change in the future
- name: PSI4 info
shell: bash -l {0}
run : |
conda activate test
which psi4
psi4 --version
python -c "import psi4"
#- name: Install Cmake and compilers for ROSE and DIRAC installation
# shell: bash -l {0}
# run: |
# conda activate test
# conda install -c anaconda cmake
# conda install conda-forge::blas
# conda install conda-forge::lapack
# if [[ ${{ matrix.os }} == 'macos-latest' ]]; then
# conda install -c conda-forge gfortran clang clangxx
# else
# conda install -c conda-forge gfortran gcc gxx
# fi
#- name: install HDF5 libraries
# shell: bash -l {0}
# run: |
# conda activate test
# conda install -c anaconda hdf5
#- name: ROSE install for tests
# shell: bash -l {0}
# run: |
# conda activate test
# git clone https://gitlab.com/quantum_rose/rose.git
# cd rose
# if [[ ${{ matrix.os }} == 'macos-latest' ]]; then
# cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBLAS_LIBRARIES=$CONDA_PREFIX/lib/libblas.dylib -DLAPACK_LIBRARIES=$CONDA_PREFIX/lib/liblapack.dylib
# else
# cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBLAS_LIBRARIES=$CONDA_PREFIX/lib/libblas.so -DLAPACK_LIBRARIES=$CONDA_PREFIX/lib/liblapack.so
# fi
# cmake --build build
# cmake --install build
# echo `pwd`/bin >> $GITHUB_PATH
# pip install ./ase_rose
# cd ..
#- name: DIRAC install for tests
# shell: bash -l {0}
# run: |
# conda activate test
# git clone --depth 1 --recursive https://gitlab.com/dirac/dirac.git
# cd dirac
# if [[ ${{ matrix.os }} == 'macos-latest' ]]; then
# ./setup --prefix=$CONDA_PREFIX --blas=$CONDA_PREFIX/lib/libblas.dylib --lapack=$CONDA_PREFIX/lib/liblapack.dylib --pcmsolver=OFF --exatensor=OFF
# else
# ./setup --prefix=$CONDA_PREFIX --blas=$CONDA_PREFIX/lib/libblas.so --lapack=$CONDA_PREFIX/lib/liblapack.so --pcmsolver=OFF --exatensor=OFF
# cd build
# make -j
# make install
# echo `pwd`/bin >> $GITHUB_PATH
# cd ..
- name: Run unit tests
shell: bash -l {0}
run : |
python -m pytest --cov --cov-report=xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Verify that we can build the package
shell: bash -l {0}
run: |
conda activate test
python setup.py sdist bdist_wheel