Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
RomarQ committed Jan 23, 2025
1 parent 6f17032 commit b8247fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 0 additions & 9 deletions .github/workflow-templates/cargo-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ runs:
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=100GB" >> $GITHUB_ENV
# Set RUSTFLAGS if not already set
if [ -z "$RUSTFLAGS" ]; then
echo "RUSTFLAGS=-C opt-level=3 -D warnings -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV
fi
- name: Setup Mold Linker
shell: bash
run: |
mkdir -p mold
curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v2.30.0/mold-2.30.0-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf -
- name: Build moonbeam
shell: bash
run: |
Expand Down
10 changes: 8 additions & 2 deletions docker/moonbeam-builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

FROM docker.io/library/ubuntu:22.04 AS builder

ARG RUSTFLAGS=""
ARG BUILD_PARAMS="--release --all"
ARG RUSTFLAGS="-C opt-level=3 -D warnings -C linker=clang -C link-arg=-fuse-ld=/build/mold/bin/mold"
ENV BUILD_PARAMS=$BUILD_PARAMS
ENV RUSTFLAGS=$RUSTFLAGS
ENV BUILD_PARAMS="--release --all"
ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /build
Expand All @@ -19,6 +20,11 @@ RUN apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make pro

RUN set -e

# Setup mold linker
RUN echo "*** Setup mold linker ***"
RUN mkdir -p mold
RUN curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v2.30.0/mold-2.30.0-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf -

RUN echo "*** Installing Rust environment ***"
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:$PATH"
Expand Down

0 comments on commit b8247fd

Please sign in to comment.