Skip to content

Commit 6d85d07

Browse files
committed
Setup manylinux wheels.
1 parent 58bae5f commit 6d85d07

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/python-package.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,43 @@ jobs:
108108
- name: Confirm package import
109109
run: |
110110
python -c "import tcod"
111+
112+
linux_wheels:
113+
runs-on: "ubuntu-20.04"
114+
steps:
115+
- uses: actions/checkout@v1
116+
- name: Checkout submodules
117+
run: |
118+
git submodule update --init --recursive --depth 1
119+
- name: Set up Python
120+
uses: actions/setup-python@v2
121+
with:
122+
python-version: "3.x"
123+
- name: Install Python dependencies
124+
run: |
125+
python -m pip install --upgrade pip
126+
pip install twine cibuildwheel==2.0.0
127+
- name: Build wheels
128+
run: |
129+
python -m cibuildwheel --output-dir wheelhouse
130+
env:
131+
CIBW_BUILD: cp36-* pp*
132+
CIBW_ARCHS_LINUX: "x86_64"
133+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
134+
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux2014
135+
CIBW_BEFORE_ALL_LINUX: yum install -y SDL2-devel
136+
CIBW_BEFORE_TEST: pip install numpy
137+
CIBW_TEST_COMMAND: python -c "import tcod"
138+
- name: Archive wheel
139+
uses: actions/upload-artifact@v2
140+
with:
141+
name: wheel-linux
142+
path: wheelhouse/*.whl
143+
retention-days: 1
144+
- name: Upload to PyPI
145+
if: startsWith(github.ref, 'refs/tags/')
146+
env:
147+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
148+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
149+
run: |
150+
twine upload --skip-existing wheelhouse/*

0 commit comments

Comments
 (0)