Add Github workflow to build custom manylinux image

This commit is contained in:
Robert Taylor 2023-07-16 16:52:55 +00:00 committed by Rob Taylor
parent e5baf38a39
commit 874a96e33b
2 changed files with 68 additions and 0 deletions

View File

@ -21,9 +21,57 @@ concurrency:
permissions: permissions:
contents: read # to fetch code (actions/checkout) contents: read # to fetch code (actions/checkout)
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-manylinux2014
jobs: jobs:
build-custom-manylinux:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed Dockerfile
id: changed-files-specific
uses: tj-actions/changed-files@v37
with:
files: |
Dockerfile-manylinux
- name: Log in to the Container registry
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
if: steps.changed-files-specific.outputs.any_changed == 'true'
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./Dockerfile-manylinux
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_wheels: build_wheels:
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }} name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
needs: build-custom-manylinux
runs-on: ${{ matrix.buildplat[0] }} runs-on: ${{ matrix.buildplat[0] }}
strategy: strategy:
# Ensure that a wheel builder finishes even if another fails # Ensure that a wheel builder finishes even if another fails

20
Dockerfile-manylinux Normal file
View File

@ -0,0 +1,20 @@
FROM quay.io/pypa/manylinux2014_x86_64:2023-07-14-55e4124
RUN yum -y install epel-release && \
yum repolist
RUN yum install -y \
qt5-qtbase-devel qt5-qtsvg-devel \
rapidjson-devel bison flex doxygen bzip2-devel flex-devel \
boost-devel \
boost-python boost-filesystem \
boost-regex boost-wave \
python36-devel libxml2-devel \
qwt-devel \
ccache \
eigen3-devel \
wget
RUN wget http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz;
RUN tar -xzf lemon-1.3.1.tar.gz; cd lemon-1.3.1; mkdir build; cd build; cmake ..; make install; cd ../..