-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from ymyzk/gh-actions-packaging
Build Python packages on GitHub Actions
- Loading branch information
Showing
1 changed file
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |