diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2fa68825..d3466b80 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/conda/environment_dev_linux.yml b/conda/environment_dev_linux.yml index 952db690..c1f401bd 100644 --- a/conda/environment_dev_linux.yml +++ b/conda/environment_dev_linux.yml @@ -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 diff --git a/setup.py b/setup.py index 456c5c19..4a1ad254 100755 --- a/setup.py +++ b/setup.py @@ -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")