Skip to content

Commit 519b16b

Browse files
authored
build armv7l images (#669)
* build armv7l images * Update build-docker-images.yml * Don't use `enable-ec_nistp_64_gcc_128` on armv7l * hack? * We are an armv4 build
1 parent 747430e commit 519b16b

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ jobs:
6666
- {TAG_NAME: "cryptography-runner-ubuntu-rolling:aarch64", DOCKERFILE_PATH: "runners/ubuntu", BUILD_ARGS: "RELEASE=rolling", RUNNER: "ubuntu-24.04-arm"}
6767
- {TAG_NAME: "cryptography-runner-alpine:aarch64", DOCKERFILE_PATH: "runners/alpine", RUNNER: "ubuntu-24.04-arm"}
6868

69+
- {TAG_NAME: "cryptography-runner-ubuntu-rolling:armv7l", DOCKERFILE_PATH: "runners/ubuntu", DOCKER_PLATFORM: "linux/arm/v7", BUILD_ARGS: "RELEASE=rolling", RUNNER: "ubuntu-24.04-arm"}
70+
71+
- {TAG_NAME: "cryptography-manylinux_2_31:armv7l", DOCKERFILE_PATH: "cryptography-linux", DOCKER_PLATFORM: "linux/arm/v7", BUILD_ARGS: "PYCA_RELEASE=manylinux_2_31_armv7l", RUNNER: "ubuntu-24.04-arm"}
72+
6973
name: "${{ matrix.IMAGE.TAG_NAME }}"
7074
steps:
7175
- uses: actions/[email protected]
@@ -106,6 +110,7 @@ jobs:
106110
context: ${{ matrix.IMAGE.DOCKERFILE_PATH }}
107111
cache-from: ghcr.io/pyca/${{ matrix.IMAGE.TAG_NAME }}
108112
tags: ghcr.io/pyca/${{ matrix.IMAGE.TAG_NAME }}
113+
platforms: ${{ matrix.IMAGE.DOCKER_PLATFORM }}
109114
pull: true
110115
build-args: |
111116
NODE_ARCH_RELEASE=${{ env.NODE_ARCH_RELEASE }}

cryptography-linux/install_openssl.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ curl -#LO "${OPENSSL_URL}/${OPENSSL_VERSION}/${OPENSSL_VERSION}.tar.gz"
88
echo "${OPENSSL_SHA256} ${OPENSSL_VERSION}.tar.gz" | sha256sum -c -
99
tar zxf ${OPENSSL_VERSION}.tar.gz
1010
pushd ${OPENSSL_VERSION}
11-
./config $OPENSSL_BUILD_FLAGS --prefix=/opt/pyca/cryptography/openssl --openssldir=/opt/pyca/cryptography/openssl
11+
BUILD_FLAGS="$OPENSSL_BUILD_FLAGS"
12+
# Can't use `$(uname -m) = "armv7l"` because that returns what kernel we're
13+
# using, and we build for armv7l with an ARM64 host.
14+
if [ "$(readelf -h /proc/self/exe | grep -o 'Machine:.* ARM')" ]; then
15+
BUILD_FLAGS="$OPENSSL_BUILD_FLAGS_ARMV7L"
16+
fi
17+
./config $BUILD_FLAGS --prefix=/opt/pyca/cryptography/openssl --openssldir=/opt/pyca/cryptography/openssl
1218
make depend
1319
make -j4
1420
# avoid installing the docs

cryptography-linux/openssl-version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export OPENSSL_SHA256="e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709
33
# We need a base set of flags because on Windows using MSVC
44
# enable-ec_nistp_64_gcc_128 doesn't work since there's no 128-bit type
55
export OPENSSL_BUILD_FLAGS_WINDOWS="no-ssl3 no-ssl3-method no-zlib no-shared no-module no-comp no-dynamic-engine no-apps no-docs no-sm2-precomp no-atexit"
6+
export OPENSSL_BUILD_FLAGS_ARMV7L="linux-armv4 ${OPENSSL_BUILD_FLAGS_WINDOWS}"
67
export OPENSSL_BUILD_FLAGS="${OPENSSL_BUILD_FLAGS_WINDOWS} enable-ec_nistp_64_gcc_128"

0 commit comments

Comments
 (0)