Skip to content

Commit e769fda

Browse files
committed
Build manylinux2014_aarch64 container for wheel builds.
1 parent aaf36d5 commit e769fda

File tree

2 files changed

+59
-6
lines changed

2 files changed

+59
-6
lines changed

.github/workflows/build-docker-images.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- 'cryptography-manylinux/**'
1919

2020
jobs:
21+
# Build containers for x86
2122
build:
2223
runs-on: ubuntu-latest
2324
strategy:
@@ -28,19 +29,16 @@ jobs:
2829
- {TAG_NAME: "pyca/cryptography-runner-centos8-fips", DOCKERFILE_PATH: "runners/centos8", BUILD_ARGS: "--build-arg FIPS=1"}
2930

3031
- {TAG_NAME: "pyca/cryptography-runner-fedora", DOCKERFILE_PATH: "runners/fedora"}
31-
- {TAG_NAME: "pyca/cryptography-runner-alpine", DOCKERFILE_PATH: "runners/alpine"}
3232

3333
- {TAG_NAME: "pyca/cryptography-runner-stretch", DOCKERFILE_PATH: "runners/debian", BUILD_ARGS: "--build-arg RELEASE=stretch"}
3434
- {TAG_NAME: "pyca/cryptography-runner-buster", DOCKERFILE_PATH: "runners/debian", BUILD_ARGS: "--build-arg RELEASE=buster"}
3535
- {TAG_NAME: "pyca/cryptography-runner-bullseye", DOCKERFILE_PATH: "runners/debian", BUILD_ARGS: "--build-arg RELEASE=bullseye"}
3636
- {TAG_NAME: "pyca/cryptography-runner-sid", DOCKERFILE_PATH: "runners/debian", BUILD_ARGS: "--build-arg RELEASE=sid"}
3737

38-
- {TAG_NAME: "pyca/cryptography-runner-ubuntu-bionic", DOCKERFILE_PATH: "runners/ubuntu", BUILD_ARGS: "--build-arg RELEASE=bionic"}
39-
- {TAG_NAME: "pyca/cryptography-runner-ubuntu-focal", DOCKERFILE_PATH: "runners/ubuntu", BUILD_ARGS: "--build-arg RELEASE=focal"}
40-
- {TAG_NAME: "pyca/cryptography-runner-ubuntu-rolling", DOCKERFILE_PATH: "runners/ubuntu", BUILD_ARGS: "--build-arg RELEASE=rolling"}
38+
- {TAG_NAME: "pyca/cryptography-runner-alpine", DOCKERFILE_PATH: "runners/alpine"}
4139

42-
- {TAG_NAME: "pyca/cryptography-manylinux1:x86_64", DOCKERFILE_PATH: "cryptography-manylinux", BUILD_ARGS: "-f cryptography-manylinux/Dockerfile-manylinux1"}
43-
- {TAG_NAME: "pyca/cryptography-manylinux2010:x86_64", DOCKERFILE_PATH: "cryptography-manylinux", BUILD_ARGS: "-f cryptography-manylinux/Dockerfile-manylinux2010"}
40+
- {TAG_NAME: "pyca/cryptography-manylinux1", DOCKERFILE_PATH: "cryptography-manylinux", BUILD_ARGS: "-f cryptography-manylinux/Dockerfile-manylinux1"}
41+
- {TAG_NAME: "pyca/cryptography-manylinux2010", DOCKERFILE_PATH: "cryptography-manylinux", BUILD_ARGS: "-f cryptography-manylinux/Dockerfile-manylinux2010"}
4442

4543
name: "Building docker image ${{ matrix.IMAGE.TAG_NAME }}"
4644
steps:
@@ -61,3 +59,43 @@ jobs:
6159
- name: Push image
6260
run: docker push ${{ matrix.IMAGE.TAG_NAME }}
6361
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
62+
63+
# Build the manylinux2014_aarch64 container
64+
build_manylinux2014_aarch64:
65+
runs-on: ubuntu-latest
66+
strategy:
67+
matrix:
68+
IMAGE:
69+
- {TAG_NAME: "pyca/cryptography-manylinux2014_aarch64", DOCKERFILE_PATH: "cryptography-manylinux", BUILD_ARGS: "-f cryptography-manylinux/Dockerfile-manylinux2014_aarch64"}
70+
71+
name: "Building docker image ${{ matrix.IMAGE.TAG_NAME }}"
72+
steps:
73+
- uses: actions/checkout@master
74+
- name: Docker Buildx
75+
id: buildx
76+
uses: crazy-max/[email protected]
77+
with:
78+
buildx-version: latest
79+
qemu-version: latest
80+
# Pull the previous image, but if it fails return true anyway.
81+
# Sometimes we add new docker images and if they've never been pushed
82+
# they can't be pulled.
83+
- name: Pull existing image
84+
run: docker pull ${{ matrix.IMAGE.TAG_NAME }}:latest || true
85+
- name: Build image
86+
run: >
87+
docker buildx build --platform linux/arm64 --pull --cache-from ${{ matrix.IMAGE.TAG_NAME }}
88+
--cache-to "type=local,dest=/tmp/.buildx-cache" --output "type=image,push=false"
89+
-t ${{ matrix.IMAGE.TAG_NAME }} ${{ matrix.IMAGE.DOCKERFILE_PATH }} ${{ matrix.IMAGE.BUILD_ARGS }}
90+
- name: Login to docker
91+
run: 'docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"'
92+
env:
93+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
94+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
95+
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
96+
- name: Push image
97+
run: >
98+
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache"
99+
--platform linux/arm64 --output "type=image,push=true" -t ${{ matrix.IMAGE.TAG_NAME }}
100+
${{ matrix.IMAGE.DOCKERFILE_PATH }} ${{ matrix.IMAGE.BUILD_ARGS }}
101+
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM quay.io/pypa/manylinux2014_aarch64
2+
MAINTAINER Python Cryptographic Authority
3+
WORKDIR /root
4+
# RUN yum -y install prelink && yum -y clean all
5+
RUN yum -y clean all
6+
ADD install_libffi.sh /root/install_libffi.sh
7+
RUN sh install_libffi.sh manylinux2014
8+
ADD install_openssl.sh /root/install_openssl.sh
9+
ADD openssl-version.sh /root/openssl-version.sh
10+
RUN sh install_openssl.sh manylinux2014
11+
ADD install_virtualenv.sh /root/install_virtualenv.sh
12+
RUN sh install_virtualenv.sh manylinux2014
13+
14+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
15+
ENV PATH="/root/.cargo/bin:$PATH"

0 commit comments

Comments
 (0)