Skip to content

Commit 0fe7711

Browse files
committed
Add manylinux image build
1 parent 10f98e1 commit 0fe7711

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and push manylinux image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- image/*
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
build-and-push-image:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Get current time
17+
uses: 1466587594/get-current-time@v2
18+
id: current-time
19+
with:
20+
format: YYYYMMDD
21+
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v1
27+
28+
- name: Login to DockerHub
29+
uses: docker/login-action@v1
30+
with:
31+
username: danielbok
32+
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v2
36+
id: docker_build
37+
with:
38+
context: ci
39+
file: ci/nlopt_manylinux2014_x86_64.Dockerfile
40+
push: true
41+
tags: |
42+
danielbok/nlopt_manylinux2014_x86_64:latest
43+
danielbok/nlopt_manylinux2014_x86_64:${{ steps.current-time.outputs.formattedTime }}
44+
45+
- name: Image digest
46+
run: echo ${{ steps.docker_build.outputs.digest }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM quay.io/pypa/manylinux2014_x86_64:2020-12-25-6634688
2+
3+
# cmake already version 3, thus no need to update cmake
4+
5+
# add swig
6+
RUN yum update -y && \
7+
curl -L https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4.0.2.tar.gz/download --output /tmp/swig.tar.gz && \
8+
mkdir -p /tmp/swig && \
9+
tar -xvzf /tmp/swig.tar.gz -C /tmp/swig --strip-components 1 &> /dev/null && \
10+
pushd /tmp/swig && \
11+
./configure --without-alllang --with-python3 && make -j2 && make install > /dev/null && \
12+
popd

0 commit comments

Comments
 (0)