diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 98977e7..15dda34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,21 @@ jobs: type=pep440,pattern={{major}}.{{minor}} type=raw,value=latest,enable=${{ !contains(env.RELEASE_VERSION, '-') }} + # https://github.com/WarpBuilds/rust-cache + - name: Run WarpBuilds/rust-cache + uses: WarpBuilds/rust-cache@v2 + with: + cache-on-failure: true + + # https://github.com/Mozilla-Actions/sccache-action + - name: Setup sccache-action + uses: mozilla-actions/sccache-action@v0.0.5 + + - name: Set env vars + run: | + echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV + echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV + - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/Dockerfile b/Dockerfile index df0e582..c2b4446 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,19 +9,19 @@ RUN cargo chef prepare # Build application FROM chef AS builder -COPY --from=planner /app/recipe.json . # Install system dependencies RUN apt-get update && \ apt-get install -y openssl libclang-dev libssl3 && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* - + +COPY --from=planner /app/recipe.json . RUN cargo chef cook --release COPY . . RUN cargo build --release -FROM chef AS final +FROM debian:bullseye-slim AS final COPY --from=builder /app/target/release/rollup-boost /usr/local/bin/ ENTRYPOINT ["/usr/local/bin/rollup-boost"] \ No newline at end of file