Skip to content

Commit

Permalink
Speed up Catalyst build by downloading c2patool binary (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
leszko authored Jan 12, 2024
1 parent c8f0a4f commit c9d85f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,10 @@ jobs:
cp ./scripts/livepeer-vmagent ./bin/livepeer-vmagent
- name: Cleanup ~/.rustup
run: rm -rf ~/.rustup

- name: Configure Rust Toolchain
uses: dtolnay/rust-toolchain@stable

- name: Build c2patool
uses: baptiste0928/cargo-install@v2
with:
crate: c2patool
version: "0.6.2"
cache-key: "${{ matrix.platform.name }}-${{ matrix.architecture }}"

- name: Copy c2patool
- name: Download c2patool
run: |
cp "${HOME}/.cargo/bin/c2patool" ./bin/c2patool
curl "https://build.livepeer.live/c2patool/0.6.2/c2patool-${{ matrix.platform.name }}-${{ matrix.architecture }}.tar.gz" -o c2patool.tar.gz
tar -xvzf c2patool.tar.gz -C ./bin/
- name: Strip binaries of debug symbols
if: matrix.platform.name == 'linux' && matrix.architecture == 'amd64'
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ARG TARGETARCH
# We download it from any of our previous builds, because building c2patool from source is very slow with QEMU
RUN apt update && apt install -yqq \
curl \
ca-certificates
RUN curl https://storage.googleapis.com/build.livepeer.live/catalyst/772a57003e6d96c9a47ef18fccb51a0c61207074/livepeer-catalyst-linux-${TARGETARCH}.tar.gz -o /catalyst.tar.gz
RUN tar xzf /catalyst.tar.gz
ca-certificates \
&& curl https://build.livepeer.live/c2patool/0.6.2/c2patool-linux-${TARGETARCH}.tar.gz -o /c2patool.tar.gz \
&& tar xzf /c2patool.tar.gz

WORKDIR /src

Expand Down

0 comments on commit c9d85f3

Please sign in to comment.