Skip to content

Commit

Permalink
Add c2patool (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
leszko authored Oct 25, 2023
1 parent 6ec1374 commit 85b5b97
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@ jobs:
cp ./scripts/livepeer-vmagent ./bin/livepeer-vmagent
- name: Configure Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Build c2patool
uses: baptiste0928/cargo-install@v2
with:
crate: c2patool
version: "0.6.2"

- name: Copy c2patool
run: |
cp "${HOME}/.cargo/bin/c2patool" ./bin/c2patool
- name: Strip binaries of debug symbols
if: matrix.platform.name == 'linux' && matrix.architecture == 'amd64'
run: |
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ RUN npm install --prefix /app/go-tools/w3
# chown needed to make everything owned by one user for userspace podman execution
RUN chown -R root:root /app/go-tools/w3

FROM rust:1.73.0 as rust-build
RUN cargo install --version 0.6.2 c2patool

FROM ubuntu:22.04 AS catalyst

ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -73,6 +76,7 @@ RUN apt update && apt install -yqq \
# Most of ./scripts is for livepeer-in-a-box except livepeer-vmagent, which is used in production in Catalyst proper
ADD ./scripts/livepeer-vmagent /usr/local/bin
COPY --from=catalyst-build /opt/bin/ /usr/local/bin/
COPY --from=rust-build /usr/local/cargo/bin/c2patool /bin/
COPY --from=node-build /app/go-tools/w3 /opt/local/lib/livepeer-w3
RUN ln -s /opt/local/lib/livepeer-w3/livepeer-w3.js /usr/local/bin/livepeer-w3 && \
npm install -g ipfs-car
Expand Down

0 comments on commit 85b5b97

Please sign in to comment.