Skip to content

Commit

Permalink
Leave tarballs as-is, remove Brotli, don't re-gzip (#199)
Browse files Browse the repository at this point in the history
These files will no longer be downloaded millions of times,
so there is no need to spend CPU time maximising compression.
  • Loading branch information
lovell authored Oct 19, 2023
1 parent 3d5c380 commit f2bc55a
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- when:
condition: <<pipeline.git.tag>>
steps:
- run: gh release upload --repo lovell/sharp-libvips $CIRCLE_TAG *.tar.gz *.tar.br *.integrity
- run: gh release upload --repo lovell/sharp-libvips $CIRCLE_TAG *.tar.gz *.integrity
15 changes: 1 addition & 14 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
if: runner.os == 'macOS'
run: |
pip3 install meson ninja
brew install advancecomp automake brotli nasm pkg-config
brew install automake nasm pkg-config
- name: Build ${{ matrix.platform }}
id: build-release
run: ./build.sh $(cat LIBVIPS_VERSION) ${{ matrix.platform }}
Expand All @@ -63,19 +63,6 @@ jobs:
omitNameDuringUpdate: true
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset (.tar.br)
id: upload-release-asset-br
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: libvips-*-${{ matrix.platform }}.tar.br
artifactContentType: application/x-brotli
artifactErrorsFailBuild: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset (.integrity)
id: upload-release-asset-integrity
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
6 changes: 0 additions & 6 deletions build/lin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,5 @@ tar chzf ${PACKAGE}/libvips-${VERSION_VIPS}-${PLATFORM}.tar.gz \
*.json \
THIRD-PARTY-NOTICES.md

# Recompress using AdvanceCOMP, ~5% smaller
advdef --recompress --shrink-insane ${PACKAGE}/libvips-${VERSION_VIPS}-${PLATFORM}.tar.gz

# Recompress using Brotli, ~15% smaller
gunzip -c ${PACKAGE}/libvips-${VERSION_VIPS}-${PLATFORM}.tar.gz | brotli -o ${PACKAGE}/libvips-${VERSION_VIPS}-${PLATFORM}.tar.br

# Allow tarballs to be read outside container
chmod 644 ${PACKAGE}/libvips-${VERSION_VIPS}-${PLATFORM}.tar.*
6 changes: 0 additions & 6 deletions build/win.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ tar czf /packaging/libvips-${VERSION_VIPS}-${PLATFORM}.tar.gz \
*.json \
THIRD-PARTY-NOTICES.md

# Recompress using AdvanceCOMP, ~5% smaller
advdef --recompress --shrink-insane /packaging/libvips-${VERSION_VIPS}-${PLATFORM}.tar.gz

# Recompress using Brotli, ~15% smaller
gunzip -c /packaging/libvips-${VERSION_VIPS}-${PLATFORM}.tar.gz | brotli -o /packaging/libvips-${VERSION_VIPS}-${PLATFORM}.tar.br

# Allow tarballs to be read outside container
chmod 644 /packaging/libvips-${VERSION_VIPS}-${PLATFORM}.tar.*

Expand Down
10 changes: 0 additions & 10 deletions integrity-json.sh

This file was deleted.

2 changes: 1 addition & 1 deletion integrity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ integrity() {
printf "$CHECKSUM" > $1.integrity
}

for tarball in *.tar.{br,gz}; do
for tarball in *.tar.gz; do
integrity $tarball
done
2 changes: 0 additions & 2 deletions platforms/linux-arm64v8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ RUN \
amazon-linux-extras install epel -y && \
yum install -y --setopt=tsflags=nodocs \
--exclude=gcc \
advancecomp \
autoconf \
automake \
brotli \
bzip2 \
cmake3 \
curl \
Expand Down
2 changes: 0 additions & 2 deletions platforms/linux-armv6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ RUN \
dpkg --add-architecture armhf && \
apt-get update && \
apt-get install -y \
advancecomp \
autoconf \
autopoint \
brotli \
cmake \
gettext \
git \
Expand Down
2 changes: 0 additions & 2 deletions platforms/linux-armv7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ RUN \
dpkg --add-architecture armhf && \
apt-get update && \
apt-get install -y \
advancecomp \
autoconf \
autopoint \
brotli \
cmake \
crossbuild-essential-armhf \
gettext \
Expand Down
2 changes: 0 additions & 2 deletions platforms/linux-s390x/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ RUN \
dpkg --add-architecture s390x && \
apt-get update && \
apt-get install -y \
advancecomp \
autoconf \
autopoint \
brotli \
cmake \
crossbuild-essential-s390x \
gettext \
Expand Down
2 changes: 0 additions & 2 deletions platforms/linux-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ RUN \
amazon-linux-extras install epel -y && \
yum install -y --setopt=tsflags=nodocs \
--exclude=gcc \
advancecomp \
autoconf \
automake \
brotli \
bzip2 \
cmake3 \
curl \
Expand Down
2 changes: 0 additions & 2 deletions platforms/linuxmusl-arm64v8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN \
autoconf \
automake \
binutils \
brotli \
build-base \
cmake \
coreutils \
Expand All @@ -32,7 +31,6 @@ RUN \
py3-pip \
python3 \
&& \
apk --update --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.17/community/ add advancecomp && \
curl -Ls https://github.com/lovell/aarch64-linux-musl-crosstools/archive/main.tar.gz | tar -hxzC / --strip-components=2 && \
ln -s /usr/bin/pkg-config /bin/aarch64-linux-musl-pkg-config && \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
Expand Down
2 changes: 0 additions & 2 deletions platforms/linuxmusl-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN \
autoconf \
automake \
binutils \
brotli \
build-base \
cmake \
coreutils \
Expand All @@ -33,7 +32,6 @@ RUN \
py3-pip \
python3 \
&& \
apk --update --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.17/community/ add advancecomp && \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
Expand Down
2 changes: 1 addition & 1 deletion platforms/win32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ LABEL maintainer="Lovell Fuller <[email protected]>"

# Create Debian-based container suitable for post-processing Windows binaries

RUN apt-get update && apt-get install -y advancecomp brotli curl zip
RUN apt-get update && apt-get install -y curl zip

0 comments on commit f2bc55a

Please sign in to comment.