Skip to content

Commit

Permalink
Build wheels with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Feb 9, 2021
1 parent 2eee1be commit a55d978
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 31 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
tags:
- '*.*.*'

name: Build linux wheels

jobs:
build:
name: Create Release
runs-on: ubuntu-latest

steps:
- name: Install python dependencies
run: >
sudo apt-get install -y
python3-dev
python3-pip
python3-setuptools
python3-distutils
- name: Install build dependencies
run: >
sudo python3 -m pip install cython
- name: Checkout code
uses: actions/checkout@v2

- name: Create sdist package
run: python3 setup.py sdist

- name: Build image
run: docker build -t cysystemd:manylinux -f Dockerfile.manylinux .

- name: Build wheels
run: >
docker run --rm
-v $(pwd):/app/src:ro
-v $(pwd)/dist:/app/dst
--entrypoint /bin/bash
cysystemd:manylinux
/app/src/scripts/make-wheels.sh
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
25 changes: 0 additions & 25 deletions .github/workflows/build.yml

This file was deleted.

2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ RUN apt-get update && apt-get install -y \
RUN pip install -U "setuptools<40"
RUN pip3 install -U setuptools
#############################################
FROM quay.io/pypa/manylinux2014_x86_64 as manylinux
RUN yum install -y systemd-devel
2 changes: 2 additions & 0 deletions Dockerfile.manylinux
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM quay.io/pypa/manylinux2014_x86_64
RUN yum install -y systemd-devel
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ images:
docker build -t cysystemd:debian10 --target debian10 .
docker build -t cysystemd:xenial --target xenial .
docker build -t cysystemd:bionic --target bionic .
docker build -t cysystemd:manylinux --target manylinux .

rpm_centos7: images sdist
docker run -i --rm \
Expand Down Expand Up @@ -141,10 +140,13 @@ deb_bionic: images sdist
--python-install-lib /usr/lib/python3.6/dist-packages/ \
-f -s python -t deb /app

linux_wheel: images
wheel_images:
docker build -t cysystemd:manylinux --target manylinux .

linux_wheel: wheel_images
docker run -it --rm \
-v `pwd`:/app/src:ro \
-v `pwd`/dist:/app/dst \
-v $(shell pwd):/app/src:ro \
-v $(shell pwd)/dist:/app/dst \
--entrypoint /bin/bash \
cysystemd:manylinux \
/app/src/scripts/make-wheels.sh

0 comments on commit a55d978

Please sign in to comment.