Skip to content

Commit

Permalink
Newer conda gcc (#165)
Browse files Browse the repository at this point in the history
* newer_conda_gcc

* conda without coverage

* no coverage

* Wno array bounds
  • Loading branch information
maxscheurer authored Apr 29, 2023
1 parent fa5f086 commit 1a8f47b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 25 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,38 +123,41 @@ jobs:
with:
activate-environment: adcc-dev
environment-file: conda/environment_dev_linux.yml
miniforge-variant: Mambaforge
use-mamba: true
miniforge-version: latest
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: Dump siteconfig with coverage flags for C++
# run: |
# mkdir $HOME/.adcc/
# echo 'coverage = True' > $HOME/.adcc/siteconfig.py
- name: Build and test adcc
run: |
conda info
conda list
# python -c "import psi4"
python setup.py test -a '--cov=adcc'
python setup.py test
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 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 }}
# - 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
7 changes: 4 additions & 3 deletions conda/environment_dev_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ channels:
dependencies:
# Build
- python
- gcc_linux-64 =9.4
- gxx_linux-64 =9.4
- libtensorlight =3.0.1=hc894906_1
- gcc_linux-64 >=12
- gxx_linux-64 >=12
- libtensorlight =3.0.1=h3cb4726_2
- pybind11 >=2.6
- pip
# Run
- numpy >=1.14
- scipy >=1.2
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ def libadcc_extension():
flags["extra_compile_args"] += ["-Wno-unused-command-line-argument",
"-Wno-undefined-var-template",
"-Wno-bitwise-instead-of-logical"]
if sys.platform.startswith("linux"):
# otherwise fails with -O3 on gcc>=12
flags["extra_compile_args"] += ["-Wno-array-bounds"]

platform_autoinstall = (
sys.platform.startswith("linux") or sys.platform.startswith("darwin")
Expand Down

0 comments on commit 1a8f47b

Please sign in to comment.