deprecate armhf, start pushing alpine 3.18 wheels

This commit is contained in:
aptalca 2023-05-15 14:02:54 -04:00
parent 2bb025232b
commit f23c3f24e2
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548
6 changed files with 42 additions and 72 deletions

View File

@ -22,11 +22,13 @@ jobs:
docker run -d --rm --name ${IMAGE}-${TAG} ghcr.io/linuxserver/baseimage-${IMAGE}:${TAG}
docker exec ${IMAGE}-${TAG} bash -c "\
if [ -f /usr/bin/apt ]; then \
apt-get update && apt-get install -y python3-pip; \
apt-get update && apt-get install -y python3-venv; \
else \
apk add --no-cache py3-pip; \
apk add --no-cache python3; \
fi && \
pip3 install -U pip"
mkdir -p /lsiopy && \
python3 -m venv /lsiopy && \
/lsiopy/bin/pip install -U pip"
done
for PACKAGE in ${ALLPACKAGES}; do
for DISTRO in ${DISTROS}; do
@ -40,7 +42,7 @@ jobs:
else
OS="${IMAGE}"
fi
VERSION=$(docker exec ${IMAGE}-${TAG} bash -c "pip install ${PACKAGE}== 2>&1 | sed -rn 's|^.*versions:(.*)\).*$|\1|p' | sed 's%[0-9.]*\(a\|b\|rc\|dev\)[0-9]*%%g' | sed 's%,%%g' | awk '{print \$(NF)}'")
VERSION=$(docker exec ${IMAGE}-${TAG} bash -c "/lsiopy/bin/pip install ${PACKAGE}== 2>&1 | sed -rn 's|^.*versions:(.*)\).*$|\1|p' | sed 's%[0-9.]*\(a\|b\|rc\|dev\)[0-9]*%%g' | sed 's%,%%g' | awk '{print \$(NF)}'")
CPYTHON=$(docker exec ${IMAGE}-${TAG} bash -c "printf \"\$(python3 -V)\" | awk '{print \$2}' | awk 'BEGIN{FS=OFS=\".\"} NF--' | sed 's|\.||g' | sed 's|^|cp|g'")
for ARCH in x86_64 aarch64; do
if ! grep -q "${PACKAGE}-${VERSION}-${CPYTHON}.*${ARCH}.whl" "docs/${OS}/index.html" && ! grep -q "${PACKAGE}-${VERSION}.*manylinux.*${ARCH}.whl" "docs/${OS}/index.html" && ! grep -q "${PACKAGE}-${VERSION}.*musllinux.*${ARCH}.whl" "docs/${OS}/index.html"; then
@ -54,15 +56,6 @@ jobs:
if echo "${PACKAGES}" | grep -q "${PACKAGE}"; then
break
fi
for ARCH in armv7l; do
if ! grep -q "${PACKAGE}-${VERSION}-${CPYTHON}.*${ARCH}.whl" "docs/${OS}/index.html"; then
echo "**** Adding ${PACKAGE}-${VERSION} to build list ****"
PACKAGES="${PACKAGE} ${PACKAGES}"
break
else
echo "**** ${PACKAGE}-${VERSION}-${CPYTHON}-${ARCH} wheel already built for ${DISTRO}, skipping ****"
fi
done
done
done
if [ -n "$PACKAGES" ]; then

View File

@ -67,57 +67,13 @@ RUN \
fi && \
python3 -m venv /build-env && \
. /build-env/bin/activate && \
pip3 install -U pip setuptools wheel cython && \
pip install -U pip setuptools wheel cython && \
mkdir -p /build && \
if [ -z "${PACKAGES}" ]; then \
PACKAGES=$(cat /packages.txt); \
fi && \
# ignore official arm32v7 wheel of grpcio
if [ "${DISTRO}" = "alpine" ] && [ "${ARCH}" = "arm32v7" ]; then \
GRPCIOSKIP="--no-binary grpcio"; \
else \
GRPCIOSKIP=""; \
fi && \
if [ "${ARCH}" = "arm32v7" ]; then \
WRAPTNATIVE="--no-binary wrapt"; \
else \
WRAPTNATIVE=""; \
fi && \
pip wheel --wheel-dir=/build --find-links="https://wheel-index.linuxserver.io/${INDEXDISTRO}/" --no-cache-dir -v ${GRPCIOSKIP} ${WRAPTNATIVE} \
pip wheel --wheel-dir=/build --find-links="https://wheel-index.linuxserver.io/${INDEXDISTRO}/" --no-cache-dir -v \
${PACKAGES} && \
echo "**** Clean up ****" && \
if [ -f /usr/bin/apt ]; then \
echo "**** Detected Ubuntu ****" && \
apt-get purge --auto-remove -y \
cargo \
cmake \
g++ \
git \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
make \
python3-dev \
python3-pip \
python3-venv \
zlib1g-dev && \
apt-get clean; \
else \
echo "**** Detected Alpine ****" && \
apk del --purge \
build-dependencies; \
fi && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
${HOME}/.cargo \
${HOME}/.cache && \
echo "**** Renaming wheels if necessary ****" && \
/bin/bash -c 'for i in $(ls /build/*armv8l*.whl 2>/dev/null); do echo "processing ${i}" && cp -- "$i" "${i//armv8l/armv7l}"; done' && \
echo "**** Wheels built are: ****" && \
ls /build

30
Jenkinsfile vendored
View File

@ -21,11 +21,11 @@ pipeline {
axes {
axis {
name 'MATRIXARCH'
values 'X86-64-MULTI', 'ARM64', 'ARMHF-WHEELIE-CHROOT'
values 'X86-64-MULTI', 'ARM64'
}
axis {
name 'MATRIXDISTRO'
values 'ubuntu-focal', 'ubuntu-jammy', 'alpine-3.16', 'alpine-3.17'
values 'ubuntu-focal', 'ubuntu-jammy', 'alpine-3.16', 'alpine-3.17', 'alpine-3.18'
}
}
stages {
@ -59,9 +59,6 @@ pipeline {
elif [ "${MATRIXARCH}" == "ARM64" ]; then
ARCH="arm64v8"
PLATFORM="linux/arm64"
else
ARCH="arm32v7"
PLATFORM="linux/arm/v7"
fi
docker buildx build \
--no-cache --pull -t ghcr.io/linuxserver/wheelie:${ARCH}-${DISTRONAME}-${DISTROVER} \
@ -80,14 +77,17 @@ pipeline {
ARCH="amd64"
elif [ "${MATRIXARCH}" == "ARM64" ]; then
ARCH="arm64v8"
else
ARCH="arm32v7"
fi
docker push ghcr.io/linuxserver/wheelie:${ARCH}-${DISTRONAME}-${DISTROVER}
docker rmi \
ghcr.io/linuxserver/wheelie:${ARCH}-${DISTRONAME}-${DISTROVER} || :
'''
}
echo 'Cleaning up'
sh '''#! /bin/bash
containers=$(docker ps -aq)
if [[ -n "${containers}" ]]; then
docker stop ${containers}
fi
docker system prune -af --volumes || : '''
}
}
}
@ -108,7 +108,7 @@ pipeline {
else
mkdir -p builds/build-${distro}
fi
for arch in amd64 arm64v8 arm32v7; do
for arch in amd64 arm64v8; do
echo "**** Retrieving wheels for ${arch}-${distro} ****"
docker pull ghcr.io/linuxserver/wheelie:${arch}-${distro}
docker create --name ${arch}-${distro} ghcr.io/linuxserver/wheelie:${arch}-${distro} blah
@ -117,8 +117,6 @@ pipeline {
else
docker cp ${arch}-${distro}:/build/. builds/build-ubuntu/
fi
docker rm ${arch}-${distro}
docker rmi ghcr.io/linuxserver/wheelie:${arch}-${distro}
done
done
'''
@ -198,6 +196,14 @@ pipeline {
}
}
cleanup {
sh '''#! /bin/bash
echo "Performing docker system prune!!"
containers=$(docker ps -aq)
if [[ -n "${containers}" ]]; then
docker stop ${containers}
fi
docker system prune -af --volumes || :
'''
cleanWs()
}
}

View File

@ -1,4 +1,5 @@
ubuntu-focal
ubuntu-jammy
alpine-3.16
alpine-3.17
alpine-3.17
alpine-3.18

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>wheels.linuxserver.io</title>
</head>
<body>
<h1>Precompiled wheels for Alpine 3.18</h1>
</body>
</html>

View File

@ -18,6 +18,9 @@
<a href='/alpine-3.17/'>alpine-3.17</a>
<br />
<a href='/alpine-3.18/'>alpine-3.18</a>
<br />
<a href='/ubuntu/'>ubuntu</a>
<br />