Commit 3ec21a8c authored by Jordan Petridis's avatar Jordan Petridis 🌱

Install rustfmt with rustup

parent e937fbee
Pipeline #72646 failed with stages
in 4 minutes and 54 seconds
# -*- indent-tabs-mode: nil -*-
variables:
# Container(OCI) images for various distros and architectures and compilers
RUST_NIGHTLY: "rustlang/rust:nightly"
RUSTFMT_NIGHTLY: "registry.gitlab.com/alatiera/rustfmt-oci-image/rustfmt:nightly"
stages:
- test
- lint
......@@ -18,6 +12,7 @@ stages:
RUST_BACKTRACE: "FULL"
before_script:
- rustup component add rustfmt
- mkdir -p .cargo_cache
# Only stuff inside the repo directory can be cached
# Override the CARGO_HOME variable to force it location
......@@ -44,16 +39,17 @@ stages:
nightly:test:
# https://hub.docker.com/r/rustlang/rust/
image: $RUST_NIGHTLY
image: 'rustlang/rust:nightly'
<<: *cargo_test
# Configure and run rustfmt on nightly
# Exits and builds fails if on bad format
rustfmt:
image: $RUSTFMT_NIGHTLY
image: 'rust'
stage: lint
script:
- rustc -Vv && cargo -Vv
- rustup component add rustfmt
- mkdir mixed_tests/auto
- echo >> mixed_tests/auto/mod.rs
- cargo fmt --version
......@@ -61,9 +57,12 @@ rustfmt:
pages:
# https://hub.docker.com/r/rustlang/rust/
image: $RUSTFMT_NIGHTLY
image: 'rust'
stage: pages
script:
- rustc -Vv && cargo -Vv
- rustup component add rustfmt
- mkdir -p public
- mkdir -p public/doc
- mkdir -p public/book
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment