Skip to content

Commit

Permalink
Merge d244fe6 into f3a7aad
Browse files Browse the repository at this point in the history
  • Loading branch information
maxscheurer committed Jan 13, 2022
2 parents f3a7aad + d244fe6 commit 6edc9bc
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 206 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,59 @@ jobs:
coveralls --service=github --merge=coverage.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

#
# Test Conda Python
#
test_conda:
name: Conda Python ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {version: '3.9', os: ubuntu-latest, documentation: False}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: adcc-dev
environment-file: conda/environment_dev_linux.yml
python-version: ${{ matrix.version }}
auto-activate-base: false
- name: Dump siteconfig with coverage flags for C++
run: |
mkdir $HOME/.adcc/
echo 'coverage = True' > $HOME/.adcc/siteconfig.py
- name: Build and test adcc
shell: bash -l {0}
run: |
conda info
conda list
pip install pyscf
# python -c "import psi4"
python setup.py test -a '--cov=adcc'
python setup.py cpptest -v
#
- name: Upload coverage to codecov
run: |
pip install codecov
codecov -X gcov
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/opt/*' '/Applications/*' '/Library/*' '/usr/*' "${HOME}"'/.cache/*' "${HOME}"'/.local/*' "${PWD}"'/build/*' "${PWD}"'/libadcc/tests/*' --output-file coverage.info
lcov --list coverage.info
codecov -X gcov -f coverage.info
#
- name: Upload coverage to coveralls
# Note: Needs to be after the above step, because it parses the coverage.info
run: |
pip install coveralls
sudo gem install coveralls-lcov
coveralls-lcov -v -n coverage.info > coverage.json
coveralls --service=github --merge=coverage.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

#
# Test source code formatting
#
Expand Down
52 changes: 1 addition & 51 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,54 +28,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}

publish_conda:
name: Publish 📦 to Conda
needs: publish_pypi
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v2

- name: Install deps on macos
if: contains( matrix.os, 'macos')
run: brew install coreutils || true

- name: Install macOS SDK
if: contains( matrix.os, 'macos')
working-directory: /Users/runner
run: |
curl -fsSL https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.9.sdk.tar.xz > ~/MacOSX10.9.sdk.tar.xz
tar -xzf ~/MacOSX10.9.sdk.tar.xz
rm ~/MacOSX10.9.sdk.tar.xz
- name: Download and verify miniconda
run: |
if [[ "${{ matrix.os }}" =~ ^macos ]]; then
md5sum () { command md5 -r "$@"; }
MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh
else
MINICONDA=Miniconda3-latest-Linux-x86_64.sh
fi
MINICONDA_MD5=$(curl -s https://repo.anaconda.com/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p')
curl -fsSL https://repo.anaconda.com/miniconda/$MINICONDA > miniconda.sh
if [[ $MINICONDA_MD5 != $(md5sum miniconda.sh | cut -d ' ' -f 1) ]]; then
echo "Miniconda MD5 mismatch"
exit 1
fi
- name: Install miniconda
run: |
bash miniconda.sh -b -p "$HOME/miniconda"
rm miniconda.sh
- name: Build and Deploy
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
source $HOME/miniconda/bin/activate
bash scripts/upload_to_anaconda.sh
password: ${{ secrets.pypi_password }}
16 changes: 0 additions & 16 deletions conda/build.sh

This file was deleted.

18 changes: 0 additions & 18 deletions conda/conda_build_config.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions conda/config_dev.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions conda/config_main.yaml

This file was deleted.

23 changes: 23 additions & 0 deletions conda/environment_dev_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: adcc-dev
channels:
- conda-forge
dependencies:
# Build
- python
- gcc_linux-64 =9.4
- gxx_linux-64 =9.4
- libtensorlight =3.0.1=hc894906_1
- pybind11 >=2.6
# Run
- numpy >=1.14
- scipy >=1.2
- tqdm >=4.30
- h5py >=2.9
- opt_einsum >=3.0
# Tests
- pandas >=0.25.0
- cppe >=0.3.1
- pytest
- pytest-cov
- pyyaml
- lcov
77 changes: 0 additions & 77 deletions conda/meta.yaml.in

This file was deleted.

37 changes: 0 additions & 37 deletions scripts/upload_to_anaconda.sh

This file was deleted.

0 comments on commit 6edc9bc

Please sign in to comment.