Skip to content

Commit

Permalink
Update workflow for building wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk committed Dec 1, 2024
1 parent 1f03744 commit 0778cc3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
compiler: gnu
version: 8

- os: macos-12
- os: macos-13
build: cmake
build-type: debug
compiler: gnu
Expand All @@ -36,7 +36,7 @@ jobs:
compiler: gnu
version: 9

- os: macos-12
- os: macos-13
build: meson
build-type: debug
compiler: gnu
Expand Down Expand Up @@ -228,6 +228,8 @@ jobs:
- name: Upload coverage report
if: ${{ matrix.build-type == 'coverage' }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}


python:
Expand Down Expand Up @@ -256,6 +258,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- run: pip3 install coverage

- name: Install dependencies
uses: mamba-org/setup-micromamba@v1
with:
Expand Down Expand Up @@ -299,12 +303,12 @@ jobs:
PKG_CONFIG_PATH: ${{ env.PKG_CONFIG_PATH }}:${{ env.DFTD3_PREFIX }}/lib/pkgconfig

- name: Test Python API
run: pytest --pyargs dftd3 --cov=dftd3 -vv
run: pytest --pyargs dftd3 --cov=dftd3 --cov-report term --cov-report xml:coverage.xml -vv
env:
LD_LIBRARY_PATH: ${{ env.LD_LIBRARY_PATH }}:${{ env.DFTD3_PREFIX }}/lib
DYLD_LIBRARY_PATH: ${{ env.DYLD_LIBRARY_PATH }}:${{ env.DFTD3_PREFIX }}/lib

- run: pip3 install coverage

- name: Upload coverage report
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
20 changes: 6 additions & 14 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,8 @@ jobs:
os:
- ubuntu-latest
- windows-latest
- macos-12
- macos-latest
python: ['38', '39', '310', '311', '312', '313']
exclude:
- os: windows-latest
python: '39'
- os: windows-latest
python: '310'
- os: macos-latest
python: '38'
- macos-13
- macos-14

defaults:
run:
Expand All @@ -103,19 +95,19 @@ jobs:
env:
CIBW_CONFIG_SETTINGS: setup-args="-Ds-dftd3:openmp=false"
CIBW_ARCHS: auto64
CIBW_BUILD: "*${{ matrix.python }}-*"
CIBW_SKIP: "{cp38-macosx_arm64,pp37-win_amd64,pp39-win_amd64}"
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-latest' && 'arm64' || 'x86_64' }}
CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-14' && 'arm64' || 'x86_64' }}
CIBW_ENVIRONMENT_MACOS: >
CC=gcc-14 CXX=g++-14 FC=gfortran-14
MACOSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-latest' && '14.0' || '12.0' }}
MACOSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-14' && '14.0' || '13.0' }}
CIBW_BEFORE_ALL_MACOS: brew install gcc@14
CIBW_BEFORE_BUILD_WINDOWS: choco upgrade mingw && pip install delvewheel
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel show {wheel} && delvewheel repair -w {dest_dir} {wheel} --no-mangle-all"

- uses: actions/upload-artifact@v4
with:
name: dftd3-python-${{ matrix.os }}-${{ matrix.python }}
name: dftd3-python-${{ matrix.os }}
path: "*.whl"

release:
Expand Down

0 comments on commit 0778cc3

Please sign in to comment.