Skip to content

Commit

Permalink
Build zstd natively
Browse files Browse the repository at this point in the history
  • Loading branch information
perklet committed Apr 17, 2024
1 parent f0e35ad commit b67c97d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/build-and-test-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ jobs:
# Needed to compile 'minicurl'
sudo apt-get install libcurl4-openssl-dev
# More dependencies for the tests
sudo apt-get install tcpdump nghttp2-server libnss3
# zstd
sudo apt-get install zstd libzstd-dev
sudo apt-get install tcpdump nghttp2-server
- name: Build zlib
run: |
Expand All @@ -89,15 +87,25 @@ jobs:
# Make sure curl will link with libz.so.1 and not libz.so
rm -f ${{ runner.temp }}/zlib/lib/libz.so
- name: Build libzstd
run: |
curl -LO https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz
tar xf zstd-1.5.6.tar.gz
cd zstd-1.5.6
make
mkdir -p ${{ runner.temp }}/zstd/lib
# move libzstd to temp
cp lib/libzstd.a lib/libzstd.so.1.5.6 lib/libzstd.mk lib/libzstd.pc lib/libzstd.pc.in ${{ runner.temp }}/zstd/lib/
- name: Run configure script
run: |
mkdir ${{ runner.temp }}/install
./configure --prefix=${{ runner.temp }}/install \
--host=${{ matrix.host }} \
--with-zlib=${{ runner.temp }}/zlib \
--with-zstd=${{ runner.temp }}/zstd \
--with-ca-path=/etc/ssl/certs \
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
--with-libnssckbi=/usr/lib/${{ matrix.host }}/nss
# Cache the build of BoringSSL, which is the longest part of the build
# We must cache the .zip as well, otherwise the Makefile will
Expand Down Expand Up @@ -194,9 +202,9 @@ jobs:
./configure --prefix=${{ runner.temp }}/install --enable-static \
--host=${{ matrix.host }} \
--with-zlib=${{ runner.temp }}/zlib \
--with-zstd=${{ runner.temp }}/zstd \
--with-ca-path=/etc/ssl/certs \
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
--with-libnssckbi=/usr/lib/${{ matrix.host }}/nss
- name: Rebuild statically
run: |
Expand Down
4 changes: 2 additions & 2 deletions chrome/curl_chrome123
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Updates in this version:
# 1. Added zstd encoding support
# 1. Added zstd encoding support, see: https://chromestatus.com/feature/6186023867908096

# Find the directory of this script
dir=${0%/*}
Expand All @@ -15,7 +15,7 @@ dir=${0%/*}
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'Sec-Fetch-Site: none' \
-H 'Sec-Fetch-Mode: navigate' \
Expand Down

0 comments on commit b67c97d

Please sign in to comment.