Skip to content

Commit

Permalink
Merge pull request #40 from ymyzk/gh-actions-packaging
Browse files Browse the repository at this point in the history
Build Python packages on GitHub Actions
  • Loading branch information
ymyzk authored Oct 12, 2019
2 parents 98b52d5 + 06375bb commit 67df89d
Showing 1 changed file with 113 additions and 0 deletions.
113 changes: 113 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Packaging

on: [push]

jobs:
build_sdist:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Create packages
run: python setup.py sdist
- uses: actions/upload-artifact@v1
with:
name: wsgi_lineprof_dist
path: dist

build_wheel_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build manylinux1/manylinux2010 wheel
run: |
docker info
./scripts/build_manylinux_wrapper.sh
- uses: actions/upload-artifact@master
with:
name: wsgi_lineprof_dist
path: dist/wheelhouse

build_wheel_macos:
runs-on: macos-latest
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Create packages
run: python setup.py bdist_wheel
- name: delocate for macOS wheels
run: |
python -m pip install --upgrade delocate
delocate-addplat --rm-orig \
-p macosx_10_15_x86_64 \
-p macosx_10_14_x86_64 \
-p macosx_10_13_x86_64 \
-p macosx_10_12_x86_64 \
-p macosx_10_11_x86_64 \
-p macosx_10_10_x86_64 \
dist/*.whl
- uses: actions/upload-artifact@master
with:
name: wsgi_lineprof_dist
path: dist

build_wheel_windows:
runs-on: windows-2016
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
# Install Microsoft Visual C++ Compiler for Python 2.7
# http://aka.ms/vcpython27
- name: Install MSVC++ for Python 2.7
if: matrix.python-version == 2.7
run: choco install vcpython27 -y
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Create packages
run: python setup.py bdist_wheel
- uses: actions/upload-artifact@master
with:
name: wsgi_lineprof_dist
path: dist

build:
needs:
- build_sdist
- build_wheel_linux
- build_wheel_macos
- build_wheel_windows
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v1
with:
name: wsgi_lineprof_dist
path: dist
- name: Show result
run: ls -l dist

0 comments on commit 67df89d

Please sign in to comment.