From 0ded7946d0ea5e17291c640ecb2519cf1c55d5dd Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:55:33 +0100 Subject: [PATCH 1/3] Remove unused system dependencies from CI config --- .gitlab-ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d941bde..f51ce21 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,19 +14,12 @@ before_script: bison \ build-essential \ curl \ - dosfstools \ flex \ fuse \ - genisoimage \ git \ - gnupg \ libfuse-dev \ nasm \ - parted \ pkg-config \ - software-properties-common \ - syslinux \ - syslinux-utils \ texinfo \ wget && curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none From e91d78ce4b33504a99cb34a363e099a4f1d2d2c0 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 11 Jan 2024 19:37:27 +0100 Subject: [PATCH 2/3] Use cargo binstall to save 1.5min on building various build deps --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f51ce21..e88712f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,9 +28,10 @@ img: script: - | source "$HOME/.cargo/env" && - cargo install --version 0.1.1 cargo-config && - cargo install --version 1.16.0 just && - cargo install --version 0.26.0 cbindgen && + curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash && + cargo binstall --no-confirm --version 0.1.1 cargo-config && + cargo binstall --no-confirm --version 1.16.0 just && + cargo binstall --no-confirm --version 0.26.0 cbindgen && cargo build --manifest-path installer/Cargo.toml --release && make ci-img IMG_TAG=$CI_COMMIT_REF_NAME REPO_BINARY=1 artifacts: From aa7edc6ef1d0e06eef429a64993821e46361ba63 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 11 Jan 2024 20:16:43 +0100 Subject: [PATCH 3/3] Zstd compress all images I tried gzip, bzip2, xz and xzstd. Xz 22s for a 128MB disk image. Out of all other options zstd was both the fastest to compress (<1s) and produced the smallest file (28MB). --- .gitlab-ci.yml | 3 ++- mk/ci.mk | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e88712f..de5c465 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,8 @@ before_script: nasm \ pkg-config \ texinfo \ - wget && + wget \ + zstd && curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none img: diff --git a/mk/ci.mk b/mk/ci.mk index 976343a..1dbb3ef 100644 --- a/mk/ci.mk +++ b/mk/ci.mk @@ -8,6 +8,7 @@ ci-img: FORCE rm -rf $(IMG_DIR) mkdir -p $(IMG_DIR) $(MAKE) demo desktop server + cd $(IMG_DIR) && zstd --rm * cd $(IMG_DIR) && sha256sum -b * > SHA256SUM # The name of the target must match the name of the filesystem config file