Skip to content

Commit 3ff32fc

Browse files
committed
switched releases from tar.gz to tar.zst
1 parent e3d64d8 commit 3ff32fc

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4848
curl \
4949
wget \
5050
xz-utils \
51+
zstd \
5152
git \
5253
# File watching (for just watch commands)
5354
entr \

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# - amd64, arm64, ppc64le: Zig cross-compilation
55
# - riscv64: RISCstar toolchain (Zig's musl has ABI incompatibility)
66
# All builds run in parallel on x86_64 runners
7+
# Archives use zstd compression (level 19) for best size
78
# =============================================================================
89

910
name: Release
@@ -152,9 +153,8 @@ jobs:
152153
# Remove again in case nimble reinstalled nim from registry
153154
rm -rf ~/.nimble/pkgs2/nim-*
154155
155-
- name: Install llvm-strip
156-
if: matrix.use_riscstar != true
157-
run: sudo apt-get update -qq && sudo apt-get install -y -qq llvm
156+
- name: Install build tools (llvm-strip, zstd)
157+
run: sudo apt-get update -qq && sudo apt-get install -y -qq llvm zstd
158158

159159
- name: Build ${{ matrix.arch }} binary (Zig)
160160
if: matrix.use_riscstar != true
@@ -223,13 +223,13 @@ jobs:
223223
# Copy installation instructions
224224
cp Install.txt "${ARCHIVE_NAME}/"
225225
226-
# Create tarball
227-
tar -czvf "${ARCHIVE_NAME}.tar.gz" "${ARCHIVE_NAME}"
226+
# Create tarball with zstd compression (level 19 = highest standard)
227+
tar -cvf - "${ARCHIVE_NAME}" | zstd -19 -o "${ARCHIVE_NAME}.tar.zst"
228228
229229
# List contents for verification
230230
echo ""
231231
echo "Archive contents:"
232-
tar -tzvf "${ARCHIVE_NAME}.tar.gz"
232+
zstd -d -c "${ARCHIVE_NAME}.tar.zst" | tar -tvf -
233233
234234
# Output for subsequent steps
235235
echo "ARCHIVE_NAME=${ARCHIVE_NAME}" >> $GITHUB_ENV
@@ -238,7 +238,7 @@ jobs:
238238
uses: actions/upload-artifact@v4
239239
with:
240240
name: ${{ env.ARCHIVE_NAME }}
241-
path: ${{ env.ARCHIVE_NAME }}.tar.gz
241+
path: ${{ env.ARCHIVE_NAME }}.tar.zst
242242
retention-days: 1
243243

244244
release:
@@ -256,15 +256,15 @@ jobs:
256256
- name: Generate checksums
257257
run: |
258258
cd artifacts
259-
sha256sum *.tar.gz > SHA256SUMS
259+
sha256sum *.tar.zst > SHA256SUMS
260260
echo "Generated checksums:"
261261
cat SHA256SUMS
262262
263263
- name: Create GitHub Release
264264
uses: softprops/action-gh-release@v2
265265
with:
266266
files: |
267-
artifacts/*.tar.gz
267+
artifacts/*.tar.zst
268268
artifacts/SHA256SUMS
269269
generate_release_notes: true
270270
draft: false

justfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,17 +221,21 @@ test-report:
221221
# =============================================================================
222222

223223
# Format all source files with nph
224-
fmt:
224+
fmt: _clean-generated
225225
@echo "Formatting source files..."
226226
nph src/ tests/
227227
@echo "Formatting complete"
228228

229229
# Check formatting without modifying (CI-friendly)
230-
fmt-check:
230+
fmt-check: _clean-generated
231231
@echo "Checking formatting..."
232232
nph --check src/ tests/
233233
@echo "Formatting check passed"
234234

235+
# Remove generated test files (megatest is created by testament)
236+
_clean-generated:
237+
@rm -f tests/megatest.nim tests/megatest
238+
235239
# Show diff of formatting changes
236240
fmt-diff:
237241
@echo "Showing formatting diff..."

scripts/install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# REQUIREMENTS:
1010
# Bash 5.2+
1111
# Linux (x86_64, aarch64, riscv64, or ppc64le)
12-
# curl, tar, sha256sum
12+
# curl, tar, zstd, sha256sum
1313
#
1414
# USAGE:
1515
# curl -fsSL https://raw.githubusercontent.com/aryonoco/yabb/main/scripts/install.sh | sudo bash
@@ -110,7 +110,7 @@ declare -ri EXIT_INSTALL_FAILED=7
110110

111111
# Required commands
112112
declare -ra REQUIRED_COMMANDS=(
113-
curl tar sha256sum grep uname mkdir rm mv cp chmod mktemp cut
113+
curl tar zstd sha256sum grep uname mkdir rm mv cp chmod mktemp cut
114114
)
115115

116116
# Architecture mapping (uname -m -> release archive suffix)
@@ -571,7 +571,7 @@ download_and_verify() {
571571
log_step "3/4" "Downloading and verifying release"
572572

573573
local -r version_num="${RESOLVED_VERSION#v}"
574-
local -r archive_name="yabb-${version_num}-linux-${ARCH}.tar.gz"
574+
local -r archive_name="yabb-${version_num}-linux-${ARCH}.tar.zst"
575575
local -r archive_url="${GITHUB_DOWNLOAD}/${RESOLVED_VERSION}/${archive_name}"
576576
local -r checksum_url="${GITHUB_DOWNLOAD}/${RESOLVED_VERSION}/SHA256SUMS"
577577

@@ -624,12 +624,12 @@ download_and_verify() {
624624
log_success "Checksum verified"
625625
fi
626626

627-
# Extract archive
627+
# Extract archive (zstd compressed)
628628
log_info "Extracting archive..."
629629
if [[ ${DRY_RUN} == true ]]; then
630630
log_info "[DRY-RUN] Would extract: ${archive_path}"
631631
else
632-
tar -xzf "${archive_path}" -C "${TEMP_DIR}" \
632+
zstd -d -c "${archive_path}" | tar -xf - -C "${TEMP_DIR}" \
633633
|| die "Failed to extract archive" "${EXIT_INSTALL_FAILED}"
634634
log_success "Archive extracted"
635635
fi

0 commit comments

Comments
 (0)