Skip to content

Commit

Permalink
ci: Bring back arm/v7 build
Browse files Browse the repository at this point in the history
Workaround rust/cargo issues by installing older cryptography from
wheel.

Fixes  WeblateOrg#968
  • Loading branch information
nijel committed Nov 22, 2021
1 parent c6980b1 commit 22ab90c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/bin/get-buildx-args
Expand Up @@ -6,7 +6,7 @@
if [ -n "$MATRIX_ARCHITECTURE" ] ; then
echo --cache-from "type=local,src=/tmp/.buildx-cache/$MATRIX_ARCHITECTURE"
else
for arch in linux/amd64 linux/arm64 ; do
for arch in linux/amd64 linux/arm64 linux/arm/v7 ; do
echo --cache-from "type=local,src=/tmp/.buildx-cache/$arch"
done
fi
Expand All @@ -23,7 +23,7 @@ if [ "$1" = "load" ] ; then
echo --tag weblate/weblate:test
else
# List of platforms
echo --platform "${MATRIX_ARCHITECTURE:-linux/amd64,linux/arm64}"
echo --platform "${MATRIX_ARCHITECTURE:-linux/amd64,linux/arm64,linux/arm/v7}"
# Enable more platforms in future:
# linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x

Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/bleeding.yml
Expand Up @@ -39,7 +39,9 @@ jobs:
name: Build, bleeding, ${{ matrix.architecture }}
strategy:
matrix:
architecture: [linux/arm64]
architecture:
- linux/arm64
- linux/arm/v7
env:
MATRIX_ARCHITECTURE: ${{ matrix.architecture }}
steps:
Expand Down Expand Up @@ -525,6 +527,12 @@ jobs:
with:
path: /tmp/.buildx-cache/linux/arm64
key: ${{ runner.os }}-bleeding-${{ github.sha }}-linux/arm64
- name: Cache Docker layers
uses: actions/cache@v2.1.4
id: cache-arm-v7
with:
path: /tmp/.buildx-cache/linux/arm/v7
key: ${{ runner.os }}-bleeding-${{ github.sha }}-linux/arm/v7
- name: Cache Docker layers
uses: actions/cache@v2.1.6
id: cache-amd64
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/dockerimage.yml
Expand Up @@ -37,7 +37,9 @@ jobs:
name: Build, stable, ${{ matrix.architecture }}
strategy:
matrix:
architecture: [linux/arm64]
architecture:
- linux/arm64
- linux/arm/v7
env:
MATRIX_ARCHITECTURE: ${{ matrix.architecture }}
steps:
Expand Down Expand Up @@ -507,6 +509,12 @@ jobs:
with:
path: /tmp/.buildx-cache/linux/arm64
key: ${{ runner.os }}-buildx-${{ github.sha }}-linux/arm64
- name: Cache Docker layers
uses: actions/cache@v2.1.4
id: cache-arm-v7
with:
path: /tmp/.buildx-cache/linux/arm/v7
key: ${{ runner.os }}-buildx-${{ github.sha }}-linux/arm/v7
- name: Cache Docker layers
uses: actions/cache@v2.1.6
id: cache-amd64
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Expand Up @@ -110,6 +110,11 @@ RUN \
fi \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& source $HOME/.cargo/env \
# Handle an extremely specific issue when building the cryptography package for \
# 32-bit architectures within QEMU running on a 64-bit host (issue #30). \
&& if [ "${BUILDX_QEMU_ENV}" = "true" -a "$(getconf LONG_BIT)" = "32" ]; then \
sed -i s/^cryptography==/cryptography==3.3.2/ /usr/src/weblate/requirements.txt \
fi \
&& python3 -m pip install --no-cache-dir --upgrade $(grep -E '^(pip|wheel|setuptools)==' /usr/src/weblate/requirements.txt) \
&& python3 -m pip install --no-cache-dir --no-binary :all: $(grep ^cffi== /usr/src/weblate/requirements.txt) \
&& case "$VERSION" in \
Expand Down

0 comments on commit 22ab90c

Please sign in to comment.