Skip to content

Commit

Permalink
New github workflows (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrocamargo authored Jan 31, 2020
1 parent ba0b7ca commit 4124b10
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package
name: Upload MacOS Python Package

on:
release:
Expand All @@ -9,7 +9,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: [ '3.5', '3.6', '3.7' ]
python-version: [ '3.5', '3.6', '3.7', '3.8' ]
steps:
- uses: actions/checkout@v1
- name: Set Python environment
Expand All @@ -24,22 +24,11 @@ jobs:
pip install numpy cython pyaml pyqt5 pyshp
- name: Build
run: |
if ["$RUNNER_OS" == "Windows"]; then
choco install visualstudio2019community
choco install -y microsoft-build-tools visualcppbuildtools --version 14.0.25420.1
fi
python setup.py sdist bdist_wheel
run: python setup.py sdist bdist_wheel

- name: Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
pip install auditwheel
auditwheel repair dist/aequilibrae*whl -w /output
twine upload output/*
else
twine upload dist/*
fi
run: twine upload dist/*.whl

40 changes: 40 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Upload Windows Python Package

on:
release:
types: [prereleased, published]

jobs:
deploy:
runs-on: windows-latest
strategy:
matrix:
python-version: [ '3.5', '3.6', '3.7', '3.8' ]
steps:
- uses: actions/checkout@v1
- name: Set Python environment
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install numpy cython pyaml pyqt5 pyshp
choco install visualstudio2019community
choco install -y microsoft-build-tools visualcppbuildtools --version 14.0.25420.1
- name: Compile library
run: |
cd aequilibrae/paths
python setup_Assignment.py build_ext --inplace
cd ..
cd ..
- name: Build
run: |
python setup.py sdist bdist_wheel
twine upload dist/*.whl
if [${{ matrix.python-version }} == '3.7']; then
twine upload dist/*.gz

0 comments on commit 4124b10

Please sign in to comment.