Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added build & deploy for Windows #225

Merged
merged 5 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 40 additions & 5 deletions .github/workflows/build_deploy_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'fix_deploy/*'

jobs:
deploy_wheels:
deploy_wheels_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -21,18 +21,18 @@ jobs:
run: |
python -m pip install --upgrade setuptools wheel pip twine numpy

- name: Deploy wheels - Build manylinux2014 binary wheels - py37/py38 - x86_64
- name: Deploy wheels - Build manylinux2014 binary wheels - py3.x - x86_64
uses: RalfG/python-wheels-manylinux-build@v0.3.1-manylinux2014_x86_64
with:
python-versions: 'cp37-cp37m cp38-cp38'
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
build-requirements: 'numpy'
system-packages: 'gcc-gfortran'
pre-build-command: 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/; export SOLCORE_WITH_PDD=1'

- name: Deploy wheels - Build manylinux2014 binary wheels - py37/py38 - i686
- name: Deploy wheels - Build manylinux2014 binary wheels - py3.x - i686
uses: RalfG/python-wheels-manylinux-build@v0.3.1-manylinux2014_i686
with:
python-versions: 'cp37-cp37m cp38-cp38'
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
build-requirements: 'numpy==1.21.4'
system-packages: 'gcc-gfortran'
pre-build-command: 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/; export SOLCORE_WITH_PDD=1'
Expand All @@ -43,3 +43,38 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/*-manylinux*.whl

deploy_wheels_windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
name: Building for windows ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install python dependencies
run: |
python -m pip install --upgrade setuptools wheel pip twine numpy==1.21.4

- name: Build Solcore Windows
env:
FC: gfortran
CC: gcc
SOLCORE_WITH_PDD: 1
run: |
echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg
python setup.py sdist bdist_wheel
shell: powershell

- name: Publish wheels to PyPI
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/*-win_amd64*.whl
6 changes: 3 additions & 3 deletions .github/workflows/test_unit_and_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -101,10 +101,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8]
python-version: ["3.7", "3.8"]
exclude:
- os: windows-latest
python-version: 3.8
python-version: "3.8"

steps:
- uses: actions/checkout@v2
Expand Down