Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add c2patool #702

Merged
merged 7 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

pwilczynskiclearcode marked this conversation as resolved.
Show resolved Hide resolved
- 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