From 4124b10c694b8ad08b251c6cd534e9601de8f572 Mon Sep 17 00:00:00 2001 From: Pedro Camargo Date: Fri, 31 Jan 2020 21:09:26 +1000 Subject: [PATCH] New github workflows (#88) --- .../{pythonpublish.yml => build_mac.yml} | 21 +++------- .github/workflows/build_windows.yml | 40 +++++++++++++++++++ 2 files changed, 45 insertions(+), 16 deletions(-) rename .github/workflows/{pythonpublish.yml => build_mac.yml} (52%) create mode 100644 .github/workflows/build_windows.yml diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/build_mac.yml similarity index 52% rename from .github/workflows/pythonpublish.yml rename to .github/workflows/build_mac.yml index 3e048e17c..705a47ac7 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/build_mac.yml @@ -1,4 +1,4 @@ -name: Upload Python Package +name: Upload MacOS Python Package on: release: @@ -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 @@ -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 + diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 000000000..a574c7299 --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -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