Skip to content

New pyshtools release #103

New pyshtools release

New pyshtools release #103

Workflow file for this run

name: Build PYPI wheels for pyshtools
on: [repository_dispatch, push, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-latest]
include:
- os: macos-latest
platform: arm64
- os: ubuntu-latest
platform: x86_64
env:
REPO_DIR: SHTOOLS
BUILD_COMMIT: master
PROJECT_SPEC: pyshtools
UNICODE_WIDTH: 32
MB_PYTHON_VERSION: ${{ matrix.python-version }}
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
MB_ML_VER: 2014
NP_BUILD_DEP: numpy
NP_TEST_DEP: numpy
TRAVIS_BUILD_DIR: ${{ github.workspace }}
PLAT: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Update submodules
run: |
git submodule update --remote
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Environment variables
run: |
if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
- name: Build and Install Wheels
run: |
python -m pip install --upgrade pip
pip install virtualenv
pip install twine
source multibuild/common_utils.sh
source multibuild/travis_steps.sh
before_install
build_index_wheel $PROJECT_SPEC # download source from pypi
# build_wheel $REPO_DIR $PLAT # versioneer does not work with submodules
install_run $PLAT
- name: Upload wheels
env:
# PYPI repository
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# PYPITEST repository
# TWINE_USERNAME: ${{ secrets.PYPITEST_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPITEST_PASSWORD }}
# TWINE_REPOSITORY_URL: 'https://test.pypi.org/legacy/'
run: |
twine upload --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/*
# Upload wheels to PYPITEST
#twine upload --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/*