diff --git a/.github/workflows/wheelie_scheduler.yml b/.github/workflows/wheelie_scheduler.yml index 9d6e40f..609ad26 100644 --- a/.github/workflows/wheelie_scheduler.yml +++ b/.github/workflows/wheelie_scheduler.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 6f75c5f..4ee0570 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile index 60e5c58..2459545 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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() } } diff --git a/distros.txt b/distros.txt index db2ba12..dd08470 100644 --- a/distros.txt +++ b/distros.txt @@ -1,4 +1,5 @@ ubuntu-focal ubuntu-jammy alpine-3.16 -alpine-3.17 \ No newline at end of file +alpine-3.17 +alpine-3.18 \ No newline at end of file diff --git a/docs/alpine-3.18/index.html b/docs/alpine-3.18/index.html new file mode 100644 index 0000000..5021f71 --- /dev/null +++ b/docs/alpine-3.18/index.html @@ -0,0 +1,11 @@ + + + + wheels.linuxserver.io + + +

Precompiled wheels for Alpine 3.18

+ + + + diff --git a/docs/index.html b/docs/index.html index 8f70569..31f22bc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -18,6 +18,9 @@ alpine-3.17
+ alpine-3.18 +
+ ubuntu