Skip to content

Commit

Permalink
Merge pull request #4 from tskisner/wheel
Browse files Browse the repository at this point in the history
Work on deployment with cibuildwheel
  • Loading branch information
tskisner authored Jun 7, 2020
2 parents 561a8f6 + b577194 commit 8212a7a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 59 deletions.
78 changes: 39 additions & 39 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,50 +7,50 @@ name: Deploy Release
# tags:
# - '*'

# on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}

# jobs:
# py36:
# name: Python 3.6 wheels on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest]
# env:
# CIBW_BUILD: cp36-macosx_x86_64 cp36-manylinux_x86_64
# CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# CIBW_MANYLINUX_I686_IMAGE: manylinux2014
# CIBW_BUILD_VERBOSITY: 3
# CIBW_BEFORE_BUILD_LINUX: ./test_scripts/install_deps_cibuildwheel_linux.sh && pip install -e .[mpi]
# CIBW_BEFORE_BUILD_MACOS: ./test_scripts/install_deps_cibuildwheel_macos.sh && pip install -e .[mpi]
# CIBW_BEFORE_TEST: echo "" >/dev/null
# CIBW_TEST_COMMAND: mpirun -np 2 python -c 'import pshmem; pshmem.test()'
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# name: Install Python
# with:
# python-version: '3.7'
# - name: Install cibuildwheel
# run: |
# python -m pip install twine cibuildwheel==1.4.2
# - name: Build wheel
# run: |
# python -m cibuildwheel --output-dir wheelhouse
# - uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: ./wheelhouse

jobs:
wheels:
name: Python wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
env:
CIBW_BUILD: cp36-macosx_x86_64 cp36-manylinux_x86_64 cp37-macosx_x86_64 cp37-manylinux_x86_64 cp38-macosx_x86_64 cp38-manylinux_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BUILD_VERBOSITY: 3
CIBW_ENVIRONMENT_LINUX: "PATH=/usr/lib64/mpich-3.2/bin:${PATH}"
CIBW_BEFORE_BUILD_LINUX: ./test_scripts/install_deps_cibuildwheel_linux.sh
CIBW_BEFORE_BUILD_MACOS: ./test_scripts/install_deps_cibuildwheel_macos.sh
CIBW_BEFORE_TEST: pip3 install numpy && pip3 install mpi4py
CIBW_TEST_COMMAND: mpirun -np 2 python -c 'import pshmem; pshmem.test()'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install twine cibuildwheel==1.4.2
- name: Build wheel
run: |
mkdir -p wheelhouse && python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse

# - name: Upload to PyPI
# run: |
# python -m twine upload wheelhouse/toast*.whl
# python -m twine upload wheelhouse/pshmem*.whl
10 changes: 0 additions & 10 deletions test_scripts/install_deps_cibuildwheel_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,3 @@ popd >/dev/null 2>&1
# Install mpich
yum -y update
yum -y install mpich-3.2-devel.x86_64 mpich-3.2-autoload.x86_64

# Load MPI compiler
source /etc/profile.d/modules.sh
source /etc/profile.d/mpich-3.2-x86_64.sh

# Install mpi4py
# pip3 install setuptools
# pip3 install wheel
# pip3 install numpy
# pip3 install mpi4py
6 changes: 0 additions & 6 deletions test_scripts/install_deps_cibuildwheel_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ popd >/dev/null 2>&1

# Install mpich
brew install mpich

# Install mpi4py
# pip3 install setuptools
# pip3 install wheel
# pip3 install numpy
# pip3 install mpi4py
4 changes: 0 additions & 4 deletions test_scripts/install_deps_github_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ pushd $(dirname $0) >/dev/null 2>&1
topdir=$(pwd)
popd >/dev/null 2>&1

echo "Before brew mpich: python = $(which python3), pip = $(which pip3)"

# Install mpich
brew install mpich

echo "After brew mpich: python = $(which python3), pip = $(which pip3)"

# Install mpi4py
pip3 install setuptools
pip3 install wheel
Expand Down

0 comments on commit 8212a7a

Please sign in to comment.