Let Github runners reuse caches for Rust and Nixpkgs
This commit is contained in:
parent
edbab2093a
commit
171b9803ad
|
|
@ -145,6 +145,12 @@ RUN curl https://sh.rustup.rs -sSf | \
|
|||
&& cargo -V \
|
||||
&& rustup component add rust-src rustc-dev llvm-tools-preview
|
||||
|
||||
# Let Github runners reuse the Rust toolchain installed in the Dockerfile and
|
||||
# also the Cargo crates downloaded subsequently in the Docker build process.
|
||||
RUN mkdir -p /github/home \
|
||||
&& ln -s /root/.cargo /github/home/.cargo \
|
||||
&& ln -s /root/.rustup /github/home/.rustup
|
||||
|
||||
# Install cargo tools
|
||||
RUN cargo install \
|
||||
cargo-binutils \
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ RUN make general_pkgs VERBOSE=0 \
|
|||
# Clean source files
|
||||
RUN rm -rf /root/test
|
||||
|
||||
# Let Github runners reuse Nixpkgs tarball installed in the Dockerfile.
|
||||
RUN mkdir -p /github/home/.cache \
|
||||
&& ln -s /root/.cache/nix /github/home/.cache/nix
|
||||
|
||||
VOLUME [ "/root/asterinas" ]
|
||||
|
||||
WORKDIR /root/asterinas
|
||||
|
|
|
|||
Loading…
Reference in New Issue