mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 22:34:22 +03:00
35a1fcad15
<!-- The PR description should answer 2 (maybe 3) important questions: --> ### What Our CI times are slow, thus merging is slow, and I do not feel this job pulls it weight. <!-- What is this PR trying to accomplish (and why, if it's not obvious)? --> <!-- Consider: do we need to add a changelog entry? --> ### How Remove the code coverage job from Buildkite, delete all associated files. <!-- How is it trying to accomplish it (what are the implementation steps)? --> V3_GIT_ORIGIN_REV_ID: 7bbde842f9f405920d1e559b8fef88078cc8d564
42 lines
1.2 KiB
Docker
42 lines
1.2 KiB
Docker
# This should match the Rust version in rust-toolchain.yaml and the other Dockerfiles.
|
|
FROM rust:1.79.0
|
|
|
|
WORKDIR app
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN set -ex;\
|
|
apt-get update; \
|
|
apt-get install --no-install-recommends --assume-yes \
|
|
curl git jq pkg-config ssh \
|
|
libssl-dev lld protobuf-compiler
|
|
|
|
# Set up a directory to store Cargo files.
|
|
ENV CARGO_HOME=/app/.cargo
|
|
ENV PATH="$PATH:$CARGO_HOME/bin"
|
|
# Switch to `lld` as the linker.
|
|
ENV RUSTFLAGS="-C link-arg=-fuse-ld=lld"
|
|
# Building with build.rs requires the Git context to be available across volumes.
|
|
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
|
|
|
# Install Rust tools.
|
|
COPY rust-toolchain.toml .
|
|
RUN rustup show
|
|
RUN cargo install cargo-chef cargo-nextest critcmp just
|
|
|
|
COPY Cargo.toml Cargo.lock .
|
|
|
|
RUN mkdir bin
|
|
|
|
# Build the binaries and tests
|
|
RUN --mount=type=cache,target=/app/.cargo/git --mount=type=cache,target=/app/.cargo/registry \
|
|
--mount=type=cache,target=./target \
|
|
--mount=type=bind,source=./crates,target=./crates \
|
|
set -ex; \
|
|
cargo build --all-targets; \
|
|
cargo nextest archive --archive-file=./bin/nextest.tar.zst
|
|
|
|
# Copy the binaries out of the cache
|
|
RUN --mount=type=cache,target=./target \
|
|
find target/debug -maxdepth 1 -type f -executable -exec cp '{}' bin \;
|