From 0a40d0b20aff712df4a697cc18bce4696fba59ba Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 30 Oct 2025 22:18:14 -0600 Subject: [PATCH 1/7] Auto set GOARCH --- golang/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/golang/Dockerfile b/golang/Dockerfile index 1a96417..fc35ac0 100644 --- a/golang/Dockerfile +++ b/golang/Dockerfile @@ -5,8 +5,8 @@ FROM $FROM # Install golang RUN cd /root \ && curl --proto '=https' --tlsv1.2 -sSf \ - https://dl.google.com/go/go1.24.2.linux-amd64.tar.gz \ - -o go1.24.2.linux-amd64.tar.gz \ + https://dl.google.com/go/go1.24.2.linux-amd64.tar.gz \ + -o go1.24.2.linux-amd64.tar.gz \ && tar -C /usr/local -xzf go1.24.2.linux-amd64.tar.gz \ && mkdir go \ && rm go1.24.2.linux-amd64.tar.gz @@ -14,3 +14,6 @@ RUN cd /root \ # Add go binaries to PATH ENV PATH="$PATH:/usr/local/go/bin" ENV GOPATH="/root/go" + +RUN echo 'export GOARCH=arm64' >> /opt/x-tools/switch-aarch64.sh \ + && echo 'export GOARCH=armv' >> /opt/x-tools/switch-arm.sh From 565c79a24022b3fd0081df64456cdaa89e55da85 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 30 Oct 2025 23:49:31 -0600 Subject: [PATCH 2/7] Fix image build --- base/Dockerfile | 244 +++++++++++++++++++++++++----------------------- qt/Dockerfile | 67 ++++++------- 2 files changed, 160 insertions(+), 151 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index a537410..e10d5fd 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -3,7 +3,8 @@ ARG FROM FROM $FROM # Build libcap 2.66 targeting armhf -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-arm.sh \ # Build libcap && cd /root \ && git clone --depth 1 --branch libcap-2.66 git://git.kernel.org/pub/scm/libs/libcap/libcap.git \ @@ -11,29 +12,30 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Compile binaries that run on the build machine using normal GCC && sed -i "s/^\(BUILD_CC\) ?= \$(CC)/\1 := gcc/" Make.Rules \ && make \ - AR="${CROSS_COMPILE}ar" \ - CC="${CROSS_COMPILE}gcc" \ - RANLIB="${CROSS_COMPILE}ranlib" \ - lib=lib \ - -j$(nproc) \ + AR="${CROSS_COMPILE}ar" \ + CC="${CROSS_COMPILE}gcc" \ + RANLIB="${CROSS_COMPILE}ranlib" \ + lib=lib \ + -j$(nproc) \ && make install \ - RAISE_SETFCAP=no \ - lib=lib \ - DESTDIR="$SYSROOT" \ + RAISE_SETFCAP=no \ + lib=lib \ + DESTDIR="$SYSROOT" \ && cd .. \ # Clean up - && rm -rf libcap + && rm -rf libcap' # Build util-linux 2.37.4 targeting armhf -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-arm.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - automake \ - autopoint \ - bison \ - gettext \ - libtool \ + automake \ + autopoint \ + bison \ + gettext \ + libtool \ # Build util-linux && cd /root \ && git clone --depth 1 --branch v2.37.4 https://github.com/karelzak/util-linux.git \ @@ -47,37 +49,38 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && rm -rf util-linux \ && find "$SYSROOT" -type l,f -name "*.la" -delete \ && apt-get autoremove -y \ - automake \ - autopoint \ - bison \ - gettext \ - libtool \ + automake \ + autopoint \ + bison \ + gettext \ + libtool \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' # Build systemd 250 targeting armhf -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-arm.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - gettext \ - gperf \ - m4 \ - rsync \ - python3-pip \ + gettext \ + gperf \ + m4 \ + rsync \ + python3-pip \ && pip3 install --no-cache-dir --break-system-packages jinja2 \ # Build systemd && cd /root \ && git clone --depth 1 --branch v250.5 https://github.com/systemd/systemd.git \ && cd systemd \ && ./configure \ - --buildtype=release \ - --cross-file="$CHOST" \ - --prefix=/ \ - -Drootprefix=/ \ - --datadir=usr/share \ - --includedir=usr/include \ - --libdir=lib \ + --buildtype=release \ + --cross-file="$CHOST" \ + --prefix=/ \ + -Drootprefix=/ \ + --datadir=usr/share \ + --includedir=usr/include \ + --libdir=lib \ && ninja -C build \ && DESTDIR="$SYSROOT" ninja -C build install \ && cd .. \ @@ -85,28 +88,29 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && rm -rf systemd \ # TODO: remove pip packages as well && apt-get autoremove -y \ - gettext \ - gperf \ - m4 \ - rsync \ - python3-pip \ + gettext \ + gperf \ + m4 \ + rsync \ + python3-pip \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' # Build zlib 1.2.11 and libpng 1.6.39 targeting armhf -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-arm.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - automake \ - libtool \ + automake \ + libtool \ # Build static zlib && cd /root \ && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib \ && cd zlib \ && CC="${CROSS_COMPILE}gcc" CFLAGS=-fPIC ./configure \ - --static \ - --prefix=/usr \ + --static \ + --prefix=/usr \ && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ @@ -121,13 +125,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && rm -rf zlib libpng \ && find "$SYSROOT" -type l,f -name "*.la" -delete \ && apt-get autoremove -y \ - automake \ - libtool \ + automake \ + libtool \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' # Build libevdev 1.12.1 targeting armhf -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-arm.sh \ # Build libevdev && cd /root \ && mkdir libevdev \ @@ -142,10 +147,11 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd .. \ # Clean up && rm -rf libevdev \ - && find "$SYSROOT" -type l,f -name "*.la" -delete + && find "$SYSROOT" -type l,f -name "*.la" -delete' # Build OpenSSL 3.0.15 targeting armhf -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-arm.sh \ # Build OpenSSL && cd /root \ && mkdir openssl \ @@ -159,10 +165,11 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && make DESTDIR="$SYSROOT" install_sw \ && cd .. \ # Clean up - && rm -rf openssl + && rm -rf openssl' # Build libcurl 7.82.0 targeting armhf -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-arm.sh \ # Build libcurl && cd /root \ && mkdir libcurl \ @@ -177,15 +184,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd .. \ # Clean up && rm -rf libcurl \ - && find "$SYSROOT" -type l,f -name "*.la" -delete + && find "$SYSROOT" -type l,f -name "*.la" -delete' # Build breakpad 0.1 (f88a1aa2af) targeting armhf -RUN export DEBIAN_FRONTEND=noninteractive \ +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ + && source /opt/x-tools/switch-arm.sh \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - zlib1g-dev \ - libssl-dev \ + zlib1g-dev \ + libssl-dev \ # breakpad's build tools require python2 to be available as python on the path && cd /root \ && git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \ @@ -211,17 +219,17 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && cd ../.. \ # Clean up && rm -rf \ - .vpython-root \ - .vpython_cipd_cache \ - /tmp/* \ - breakpad \ - depot_tools \ - .pyenv \ + .vpython-root \ + .vpython_cipd_cache \ + /tmp/* \ + breakpad \ + depot_tools \ + .pyenv \ && apt-get autoremove -y \ - zlib1g-dev \ - libssl-dev \ + zlib1g-dev \ + libssl-dev \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' # Build libcap 2.66 targeting aarch64 RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ @@ -233,15 +241,15 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ # Compile binaries that run on the build machine using normal GCC && sed -i "s/^\(BUILD_CC\) ?= \$(CC)/\1 := gcc/" Make.Rules \ && make \ - AR="${CROSS_COMPILE}ar" \ - CC="${CROSS_COMPILE}gcc" \ - RANLIB="${CROSS_COMPILE}ranlib" \ - lib=lib \ - -j$(nproc) \ + AR="${CROSS_COMPILE}ar" \ + CC="${CROSS_COMPILE}gcc" \ + RANLIB="${CROSS_COMPILE}ranlib" \ + lib=lib \ + -j$(nproc) \ && make install \ - RAISE_SETFCAP=no \ - lib=lib \ - DESTDIR="$SYSROOT" \ + RAISE_SETFCAP=no \ + lib=lib \ + DESTDIR="$SYSROOT" \ && cd .. \ # Clean up && rm -rf libcap' @@ -252,11 +260,11 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - automake \ - autopoint \ - bison \ - gettext \ - libtool \ + automake \ + autopoint \ + bison \ + gettext \ + libtool \ # Build util-linux && cd /root \ && git clone --depth 1 --branch v2.37.4 https://github.com/karelzak/util-linux.git \ @@ -270,11 +278,11 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && rm -rf util-linux \ && find "$SYSROOT" -type l,f -name "*.la" -delete \ && apt-get autoremove -y \ - automake \ - autopoint \ - bison \ - gettext \ - libtool \ + automake \ + autopoint \ + bison \ + gettext \ + libtool \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' @@ -284,24 +292,24 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - gettext \ - gperf \ - m4 \ - rsync \ - python3-pip \ + gettext \ + gperf \ + m4 \ + rsync \ + python3-pip \ && pip3 install --no-cache-dir --break-system-packages jinja2 \ # Build systemd && cd /root \ && git clone --depth 1 --branch v250.5 https://github.com/systemd/systemd.git \ && cd systemd \ && ./configure \ - --buildtype=release \ - --cross-file="$CHOST" \ - --prefix=/ \ - -Drootprefix=/ \ - --datadir=usr/share \ - --includedir=usr/include \ - --libdir=lib \ + --buildtype=release \ + --cross-file="$CHOST" \ + --prefix=/ \ + -Drootprefix=/ \ + --datadir=usr/share \ + --includedir=usr/include \ + --libdir=lib \ && ninja -C build \ && DESTDIR="$SYSROOT" ninja -C build install \ && cd .. \ @@ -309,11 +317,11 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && rm -rf systemd \ # TODO: remove pip packages as well && apt-get autoremove -y \ - gettext \ - gperf \ - m4 \ - rsync \ - python3-pip \ + gettext \ + gperf \ + m4 \ + rsync \ + python3-pip \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' @@ -323,15 +331,15 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - automake \ - libtool \ + automake \ + libtool \ # Build static zlib && cd /root \ && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib \ && cd zlib \ && CC="${CROSS_COMPILE}gcc" CFLAGS=-fPIC ./configure \ - --static \ - --prefix=/usr \ + --static \ + --prefix=/usr \ && make -j$(nproc) \ && DESTDIR="$SYSROOT" make install \ && cd .. \ @@ -346,8 +354,8 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && rm -rf zlib libpng \ && find "$SYSROOT" -type l,f -name "*.la" -delete \ && apt-get autoremove -y \ - automake \ - libtool \ + automake \ + libtool \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' @@ -425,8 +433,8 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - zlib1g-dev \ - libssl-dev \ + zlib1g-dev \ + libssl-dev \ # breakpad's build tools require python2 to be available as python on the path && cd /root \ && git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \ @@ -452,15 +460,15 @@ RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive \ && cd ../.. \ # Clean up && rm -rf \ - .vpython-root \ - .vpython_cipd_cache \ - /tmp/* \ - breakpad \ - depot_tools \ - .pyenv \ + .vpython-root \ + .vpython_cipd_cache \ + /tmp/* \ + breakpad \ + depot_tools \ + .pyenv \ && apt-get autoremove -y \ - zlib1g-dev \ - libssl-dev \ + zlib1g-dev \ + libssl-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt' diff --git a/qt/Dockerfile b/qt/Dockerfile index 569f59a..fea5fbb 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -9,12 +9,13 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - libudev-dev \ + libudev-dev \ # Build Qt && cd /root \ && git clone https://code.qt.io/qt/qt5.git \ && cd qt5 \ && git switch 6.7.3 \ + && bash -c 'source /opt/x-tools/switch-aarch64.sh \ && GIT_ASKPASS="/bin/echo" perl init-repository --module-subset=qtbase,qtshadertools,qtdeclarative \ # Setup reMarkable mkspec && mv /linux-arm-remarkable-g++ qtbase/mkspecs/devices \ @@ -26,12 +27,12 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && unset SYSROOT \ && unset PKG_CONFIG_SYSROOT_DIR \ && ../qt5/configure \ - -prefix /usr \ - -no-opengl \ - -no-widgets \ - -no-feature-sql \ - -- -DQT_BUILD_EXAMPLES=OFF \ - -DQT_BUILD_TESTS=OFF \ + -prefix /usr \ + -no-opengl \ + -no-widgets \ + -no-feature-sql \ + -- -DQT_BUILD_EXAMPLES=OFF \ + -DQT_BUILD_TESTS=OFF \ && cmake --build . --parallel $(nproc) \ && cmake --install . \ && cd .. \ @@ -43,42 +44,42 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && mkdir qt5-build \ && cd qt5-build \ && ../qt5/configure \ - -prefix /usr \ - -extprefix $SYSROOT/usr \ - -device linux-arm-remarkable-g++ \ - -device-option CROSS_COMPILE="$CROSS_COMPILE" \ - -no-opengl \ - -no-widgets \ - -no-feature-sql \ - -reduce-exports \ - -- -DQT_HOST_PATH=/usr \ - -DQT_BUILD_EXAMPLES=OFF \ - -DQT_BUILD_TESTS=OFF \ - -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/arm-linux-gnueabihf.cmake \ + -prefix /usr \ + -extprefix $SYSROOT/usr \ + -device linux-arm-remarkable-g++ \ + -device-option CROSS_COMPILE="$CROSS_COMPILE" \ + -no-opengl \ + -no-widgets \ + -no-feature-sql \ + -reduce-exports \ + -- -DQT_HOST_PATH=/usr \ + -DQT_BUILD_EXAMPLES=OFF \ + -DQT_BUILD_TESTS=OFF \ + -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/arm-linux-gnueabihf.cmake \ && cmake --build . --parallel $(nproc) \ && cmake --install . \ && cd .. \ # Clean up && rm -rf qt5-build \ - && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm \ + && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm' \ # Now Build AArch64 && bash -c 'source /opt/x-tools/switch-aarch64.sh \ && mkdir qt5-build \ && cd qt5-build \ && ../qt5/configure \ - -prefix /usr \ - -extprefix $SYSROOT/usr \ - -device linux-aarch64-remarkable-g++ \ - -device-option CROSS_COMPILE="$CROSS_COMPILE" \ - -no-rpath \ - -no-opengl \ - -no-widgets \ - -no-feature-sql \ - -reduce-exports \ - -- -DQT_HOST_PATH=/usr \ - -DQT_BUILD_EXAMPLES=OFF \ - -DQT_BUILD_TESTS=OFF \ - -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/aarch64-remarkable-linux-gnu.cmake \ + -prefix /usr \ + -extprefix $SYSROOT/usr \ + -device linux-aarch64-remarkable-g++ \ + -device-option CROSS_COMPILE="$CROSS_COMPILE" \ + -no-rpath \ + -no-opengl \ + -no-widgets \ + -no-feature-sql \ + -reduce-exports \ + -- -DQT_HOST_PATH=/usr \ + -DQT_BUILD_EXAMPLES=OFF \ + -DQT_BUILD_TESTS=OFF \ + -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/aarch64-remarkable-linux-gnu.cmake \ && cmake --build . --parallel $(nproc) \ && cmake --install . \ && cd .. \ From 3279e0e1d69873a74f4832f8e00fb46e2ff043bd Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 31 Oct 2025 00:37:19 -0600 Subject: [PATCH 3/7] Adjust qt image build --- qt/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index fea5fbb..aa201a8 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -15,13 +15,13 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && git clone https://code.qt.io/qt/qt5.git \ && cd qt5 \ && git switch 6.7.3 \ - && bash -c 'source /opt/x-tools/switch-aarch64.sh \ && GIT_ASKPASS="/bin/echo" perl init-repository --module-subset=qtbase,qtshadertools,qtdeclarative \ # Setup reMarkable mkspec && mv /linux-arm-remarkable-g++ qtbase/mkspecs/devices \ && mv /linux-aarch64-remarkable-g++ qtbase/mkspecs/devices \ && cd .. \ # Build for host machine (required from Qt6+) + && bash -c 'source /opt/x-tools/switch-aarch64.sh \ && mkdir qt5-build \ && cd qt5-build \ && unset SYSROOT \ From ce374ffd0544a33b4e906210178d1d61d3ab0b38 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 31 Oct 2025 14:19:21 -0600 Subject: [PATCH 4/7] Make qt build multistage --- qt/Dockerfile | 108 +++++++++++++++++++++++++------------------ toolchain/Dockerfile | 104 ++++++++++++++++++++--------------------- 2 files changed, 115 insertions(+), 97 deletions(-) diff --git a/qt/Dockerfile b/qt/Dockerfile index aa201a8..96de25b 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -1,32 +1,27 @@ # Full Qt toolchain for the reMarkable ARG FROM -FROM $FROM +FROM $FROM AS qt6base -# Build Qt 5.15.1 targeting armhf -COPY linux-arm-remarkable-g++ /linux-arm-remarkable-g++ -COPY linux-aarch64-remarkable-g++ /linux-aarch64-remarkable-g++ +# Install build dependencies RUN export DEBIAN_FRONTEND=noninteractive \ - # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - libudev-dev \ - # Build Qt - && cd /root \ - && git clone https://code.qt.io/qt/qt5.git \ - && cd qt5 \ + libudev-dev + +# Build Qt +RUN cd /root \ + && git clone https://code.qt.io/qt/qt5.git qt6 \ + && cd qt6 \ && git switch 6.7.3 \ - && GIT_ASKPASS="/bin/echo" perl init-repository --module-subset=qtbase,qtshadertools,qtdeclarative \ - # Setup reMarkable mkspec - && mv /linux-arm-remarkable-g++ qtbase/mkspecs/devices \ - && mv /linux-aarch64-remarkable-g++ qtbase/mkspecs/devices \ - && cd .. \ - # Build for host machine (required from Qt6+) - && bash -c 'source /opt/x-tools/switch-aarch64.sh \ - && mkdir qt5-build \ - && cd qt5-build \ - && unset SYSROOT \ - && unset PKG_CONFIG_SYSROOT_DIR \ - && ../qt5/configure \ + && GIT_ASKPASS="/bin/echo" perl init-repository --module-subset=qtbase,qtshadertools,qtdeclarative + +COPY linux-arm-remarkable-g++ /root/qt6/qtbase/mkspecs/devices/linux-arm-remarkable-g++ +COPY linux-aarch64-remarkable-g++ /root/qt6/qtbase/mkspecs/devices/linux-aarch64-remarkable-g++ + +# Build host +RUN mkdir qt6-build \ + && cd qt6-build \ + && /root/qt6/configure \ -prefix /usr \ -no-opengl \ -no-widgets \ @@ -34,16 +29,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \ -- -DQT_BUILD_EXAMPLES=OFF \ -DQT_BUILD_TESTS=OFF \ && cmake --build . --parallel $(nproc) \ - && cmake --install . \ - && cd .. \ - # Clean up - && rm -rf qt5-build \ - # Build for armhf - && export SYSROOT=/opt/x-tools/arm-remarkable-linux-gnueabihf/arm-remarkable-linux-gnueabihf/sysroot \ - && export PKG_CONFIG_SYSROOT_DIR="$SYSROOT" \ - && mkdir qt5-build \ - && cd qt5-build \ - && ../qt5/configure \ + && cmake --install . + +FROM qt6base AS arm + +# Build arm +RUN rm -r qt6-build \ + && mkdir qt6-build \ + && cd qt6-build \ + && bash -c 'source /opt/x-tools/switch-arm.sh \ + && /root/qt6/configure \ -prefix /usr \ -extprefix $SYSROOT/usr \ -device linux-arm-remarkable-g++ \ @@ -56,17 +51,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \ -DQT_BUILD_EXAMPLES=OFF \ -DQT_BUILD_TESTS=OFF \ -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/arm-linux-gnueabihf.cmake \ - && cmake --build . --parallel $(nproc) \ - && cmake --install . \ - && cd .. \ - # Clean up - && rm -rf qt5-build \ - && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm' \ - # Now Build AArch64 + && cmake --build . --parallel $(nproc)' + +FROM qt6base AS aarch64 + +# Build aarch64 +RUN rm -r qt6-build \ + && mkdir qt6-build \ + && cd qt6-build \ && bash -c 'source /opt/x-tools/switch-aarch64.sh \ - && mkdir qt5-build \ - && cd qt5-build \ - && ../qt5/configure \ + && /root/qt6/configure \ -prefix /usr \ -extprefix $SYSROOT/usr \ -device linux-aarch64-remarkable-g++ \ @@ -80,12 +74,36 @@ RUN export DEBIAN_FRONTEND=noninteractive \ -DQT_BUILD_EXAMPLES=OFF \ -DQT_BUILD_TESTS=OFF \ -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/aarch64-remarkable-linux-gnu.cmake \ - && cmake --build . --parallel $(nproc) \ + && cmake --build . --parallel $(nproc)' + +FROM $FROM AS final + +RUN --mount=target=/root/qt6,from=qt6base,src=/root/qt6 \ + --mount=target=qt6-host,from=qt6base,src=qt6-build \ + --mount=target=qt6-arm,from=arm,src=qt6-build \ + --mount=target=qt6-aarch64,from=aarch64,src=qt6-build \ + # Install build dependenciesh + export DEBIAN_FRONTEND=noninteractive \ + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + libudev-dev \ + && cp -r qt6-host qt6-build \ + && cd qt6-build \ && cmake --install . \ && cd .. \ - && rm -rf qt5-build \ + && rm -r qt6-build \ + && cp -r qt6-arm qt6-build \ + && bash -c 'source /opt/x-tools/switch-arm.sh \ + && cd qt6-build \ + && cmake --install . \ + && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm' \ + && rm -r qt6-build \ + && cp -r qt6-aarch64 qt6-build \ + && bash -c 'source /opt/x-tools/switch-aarch64.sh \ + && cd qt6-build \ + && cmake --install . \ && find "$SYSROOT" -type l,f -name "*.la" | xargs --no-run-if-empty rm' \ + && rm -r qt6-build \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt - diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index db46bca..a2c5498 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -9,24 +9,24 @@ ARG CHOST_AARCH64="aarch64-remarkable-linux-gnu" RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update -y \ && apt-get install -y --no-install-recommends \ - build-essential \ - ca-certificates \ - cmake \ - curl \ - gcc-11 \ - g++-11 \ - meson \ - pkg-config \ - git \ - git-lfs \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + gcc-11 \ + g++-11 \ + meson \ + pkg-config \ + git \ + git-lfs \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt \ # Force use of gcc and g++ 11 && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 \ - --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ - --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-11 \ - --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-11 + --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ + --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-11 \ + --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-11 # Build latest crosstool-ng and use it to build the toolchain COPY crosstool-ng "/$NGCONFIG" @@ -34,18 +34,18 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - autoconf \ - automake \ - bison \ - file \ - flex \ - gawk \ - help2man \ - libncurses-dev \ - libtool-bin \ - rsync \ - texinfo \ - unzip \ + autoconf \ + automake \ + bison \ + file \ + flex \ + gawk \ + help2man \ + libncurses-dev \ + libtool-bin \ + rsync \ + texinfo \ + unzip \ # Build crosstool-ng itself && cd /root \ && git clone https://github.com/crosstool-ng/crosstool-ng \ @@ -91,18 +91,18 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && find "/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64" -type l,f -name "*.la" -delete \ && rm "/opt/x-tools/$NGCONFIG_AARCH64/build.log.bz2" \ && apt-get autoremove -y \ - autoconf \ - automake \ - bison \ - file \ - flex \ - gawk \ - help2man \ - libncurses-dev \ - libtool-bin \ - rsync \ - texinfo \ - unzip \ + autoconf \ + automake \ + bison \ + file \ + flex \ + gawk \ + help2man \ + libncurses-dev \ + libtool-bin \ + rsync \ + texinfo \ + unzip \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt @@ -111,20 +111,20 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Install build dependencies && apt-get update -y \ && apt-get install -y --no-install-recommends \ - automake \ - libarchive-dev \ - libcurl4-gnutls-dev \ - libgpgme-dev \ - libssl-dev \ - libtool-bin \ + automake \ + libarchive-dev \ + libcurl4-gnutls-dev \ + libgpgme-dev \ + libssl-dev \ + libtool-bin \ && cd /root \ && git clone --depth 1 --branch v0.4.5 https://git.yoctoproject.org/git/opkg \ && cd opkg \ && ./autogen.sh \ && ./configure \ - --enable-sha256 \ - --prefix=/ \ - --exec-prefix=/usr \ + --enable-sha256 \ + --prefix=/ \ + --exec-prefix=/usr \ && make -j$(nproc) \ && make install \ && cd .. \ @@ -132,10 +132,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && rm -rf opkg \ && rm /usr/lib/libopkg.la \ && apt-get autoremove -y \ - automake \ - libarchive-dev \ - libssl-dev \ - libtool-bin \ + automake \ + libarchive-dev \ + libssl-dev \ + libtool-bin \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt @@ -143,7 +143,7 @@ RUN touch /opt/x-tools/switch-arm.sh && chmod +x /opt/x-tools/switch-arm.sh && c export ARCH=arm export CHOST="$CHOST" export CROSS_COMPILE="$CHOST-" -PATH="\$PATH:/opt/x-tools/$NGCONFIG/bin" +export PATH="\$PATH:/opt/x-tools/$NGCONFIG/bin" export PKG_CONFIG_LIBDIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/usr/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/opt/lib/pkgconfig" export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" export SYSROOT="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" From e6d2bb194ba19cfc4b613782509a51a4d2135d16 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 31 Oct 2025 17:35:03 -0600 Subject: [PATCH 5/7] Free up more disk space --- .github/workflows/build.yml | 9 +++++++++ .github/workflows/pr.yml | 19 ++++++++++++++----- .github/workflows/release.yml | 11 ++++++++++- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcc0a30..a39af9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,5 +61,14 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Free up space + run: | + rm -rf .git/ + docker system prune --force + docker rmi $(docker image ls -aq) || true + docker system prune --force + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get autoremove -y + sudo apt-get autoclean -y - name: Build and push toolchain run: ./scripts/build -p -g -s ${{ matrix.target }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2f13297..4aa7a13 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -36,7 +36,7 @@ jobs: echo "UUID=$UUID" >> "$GITHUB_OUTPUT" docker image save ghcr.io/toltec-dev/toolchain | gzip > ${{ runner.temp }}/$UUID-toolchain.tar.gz - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: ${{ env.UUID }}-toolchain path: ${{ runner.temp }}/${{ env.UUID }}-toolchain.tar.gz @@ -70,14 +70,14 @@ jobs: run: | pushd ${{ runner.temp }} tar xf ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz + rm ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz popd - rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz - name: Build and push toolchain run: ./scripts/build -g -s base -c ghcr.io/toltec-dev/toolchain=oci-layout://${{ runner.temp }} - name: Export the container run: docker image save ghcr.io/toltec-dev/base | gzip > ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: ${{ needs.stage1.outputs.UUID }}-base path: ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz @@ -111,14 +111,23 @@ jobs: run: | pushd ${{ runner.temp }} tar xf ${{ needs.stage2.outputs.UUID }}-base.tar.gz + rm ${{ needs.stage2.outputs.UUID }}-base.tar.gz popd - rm ${{ runner.temp }}/${{ needs.stage2.outputs.UUID }}-base.tar.gz + - name: Free up space + run: | + rm -rf .git/ + docker system prune --force + docker rmi $(docker image ls -aq) || true + docker system prune --force + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get autoremove -y + sudo apt-get autoclean -y - name: Build and push toolchain run: ./scripts/build -g -s ${{ matrix.target }} -c ghcr.io/toltec-dev/base=oci-layout://${{ runner.temp }} - name: Export the container run: docker image save ghcr.io/toltec-dev/${{ matrix.target }} | gzip > ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-${{ matrix.target }}.tar.gz - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: ${{ needs.stage1.outputs.UUID }}-${{ matrix.target }} path: ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-${{ matrix.target }}.tar.gz diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c893cac..bbb0f46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: release on: push: tags: - - '*' + - "*" jobs: stage1: name: Stage 1 @@ -65,6 +65,15 @@ jobs: run: | VERSION="$(echo "${{ github.ref }}" | cut -d / -f 3)" echo "version=$VERSION" >> "$GITHUB_ENV" + - name: Free up space + run: | + rm -rf .git/ + docker system prune --force + docker rmi $(docker image ls -aq) || true + docker system prune --force + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get autoremove -y + sudo apt-get autoclean -y - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push toolchain From bd2c84ebdd3a41c9d7ef27afb88369adaf2a93ca Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 1 Nov 2025 01:13:18 -0600 Subject: [PATCH 6/7] Free up more space before build --- .github/actions/cleanup/action.yml | 24 ++++++++++++++++++++++++ .github/workflows/build.yml | 13 +++++-------- .github/workflows/pr.yml | 13 +++++-------- .github/workflows/release.yml | 13 +++++-------- 4 files changed, 39 insertions(+), 24 deletions(-) create mode 100644 .github/actions/cleanup/action.yml diff --git a/.github/actions/cleanup/action.yml b/.github/actions/cleanup/action.yml new file mode 100644 index 0000000..effc48b --- /dev/null +++ b/.github/actions/cleanup/action.yml @@ -0,0 +1,24 @@ +name: Free up space in the runner +runs: + using: "composite" + steps: + - name: Free up space + shell: bash + run: | + rm -rf .git/ + docker system prune --force + docker rmi $(docker image ls -aq) || true + docker system prune --force + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get autoremove -y + sudo apt-get autoclean -y + sudo rm -rf /usr/lib/jvm + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/share/swift + sudo rm -rf /usr/local/.ghcup + sudo rm -rf /usr/local/julia* + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/local/share/chromium + sudo rm -rf /opt/microsoft /opt/google + sudo rm -rf /opt/az + sudo rm -rf /usr/local/share/powershell diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a39af9d..92e480b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,8 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Free up space + uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s toolchain stage2: @@ -40,6 +42,8 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Free up space + uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s base stage3: @@ -62,13 +66,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Free up space - run: | - rm -rf .git/ - docker system prune --force - docker rmi $(docker image ls -aq) || true - docker system prune --force - export DEBIAN_FRONTEND="noninteractive" - sudo apt-get autoremove -y - sudo apt-get autoclean -y + uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s ${{ matrix.target }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4aa7a13..2d585d1 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,6 +23,8 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Free up space + uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -g -s toolchain - name: Export the container @@ -72,6 +74,8 @@ jobs: tar xf ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz rm ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz popd + - name: Free up space + uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -g -s base -c ghcr.io/toltec-dev/toolchain=oci-layout://${{ runner.temp }} - name: Export the container @@ -114,14 +118,7 @@ jobs: rm ${{ needs.stage2.outputs.UUID }}-base.tar.gz popd - name: Free up space - run: | - rm -rf .git/ - docker system prune --force - docker rmi $(docker image ls -aq) || true - docker system prune --force - export DEBIAN_FRONTEND="noninteractive" - sudo apt-get autoremove -y - sudo apt-get autoclean -y + uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -g -s ${{ matrix.target }} -c ghcr.io/toltec-dev/base=oci-layout://${{ runner.temp }} - name: Export the container diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bbb0f46..9cf56a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,8 @@ jobs: echo "version=$VERSION" >> "$GITHUB_ENV" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Free up space + uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s toolchain -v ${{ env.version }} stage2: @@ -43,6 +45,8 @@ jobs: echo "version=$VERSION" >> "$GITHUB_ENV" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Free up space + uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s base -v ${{ env.version }} stage3: @@ -66,14 +70,7 @@ jobs: VERSION="$(echo "${{ github.ref }}" | cut -d / -f 3)" echo "version=$VERSION" >> "$GITHUB_ENV" - name: Free up space - run: | - rm -rf .git/ - docker system prune --force - docker rmi $(docker image ls -aq) || true - docker system prune --force - export DEBIAN_FRONTEND="noninteractive" - sudo apt-get autoremove -y - sudo apt-get autoclean -y + uses: ./.github/actions/cleanup - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push toolchain From 4f4ca85e1c9f8fceab6f9569d283ad5676679ffb Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 1 Nov 2025 01:17:44 -0600 Subject: [PATCH 7/7] Only free up space for qt --- .github/actions/cleanup/action.yml | 5 +++++ .github/workflows/build.yml | 5 +---- .github/workflows/pr.yml | 5 +---- .github/workflows/release.yml | 5 +---- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/actions/cleanup/action.yml b/.github/actions/cleanup/action.yml index effc48b..d3559ca 100644 --- a/.github/actions/cleanup/action.yml +++ b/.github/actions/cleanup/action.yml @@ -5,6 +5,9 @@ runs: - name: Free up space shell: bash run: | + df -h + echo + echo Freeing up space rm -rf .git/ docker system prune --force docker rmi $(docker image ls -aq) || true @@ -22,3 +25,5 @@ runs: sudo rm -rf /opt/microsoft /opt/google sudo rm -rf /opt/az sudo rm -rf /usr/local/share/powershell + echo + df -h diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92e480b..945fb63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Free up space - uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s toolchain stage2: @@ -42,8 +40,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Free up space - uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s base stage3: @@ -66,6 +62,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Free up space + if: ${{ matrix.target == 'qt' }} uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s ${{ matrix.target }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2d585d1..80cd273 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,8 +23,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Free up space - uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -g -s toolchain - name: Export the container @@ -74,8 +72,6 @@ jobs: tar xf ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz rm ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz popd - - name: Free up space - uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -g -s base -c ghcr.io/toltec-dev/toolchain=oci-layout://${{ runner.temp }} - name: Export the container @@ -118,6 +114,7 @@ jobs: rm ${{ needs.stage2.outputs.UUID }}-base.tar.gz popd - name: Free up space + if: ${{ matrix.target == 'qt' }} uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -g -s ${{ matrix.target }} -c ghcr.io/toltec-dev/base=oci-layout://${{ runner.temp }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9cf56a2..3ed84b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,8 +22,6 @@ jobs: echo "version=$VERSION" >> "$GITHUB_ENV" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Free up space - uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s toolchain -v ${{ env.version }} stage2: @@ -45,8 +43,6 @@ jobs: echo "version=$VERSION" >> "$GITHUB_ENV" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Free up space - uses: ./.github/actions/cleanup - name: Build and push toolchain run: ./scripts/build -p -g -s base -v ${{ env.version }} stage3: @@ -70,6 +66,7 @@ jobs: VERSION="$(echo "${{ github.ref }}" | cut -d / -f 3)" echo "version=$VERSION" >> "$GITHUB_ENV" - name: Free up space + if: ${{ matrix.target == 'qt' }} uses: ./.github/actions/cleanup - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3