Skip to content

Commit

Permalink
CI and Dockerfile: use rust-toolchain.toml (#45)
Browse files Browse the repository at this point in the history
Rely entirely on `rust-toolchain.toml` as the source of truth regarding
Rust toolchain version, profile, components, etc.
  • Loading branch information
imikushin authored Feb 20, 2024
1 parent 528270c commit a7f8d90
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up cargo/rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt, clippy

# https://github.com/Swatinem/rust-cache
- name: Cache Rust stuff
uses: Swatinem/rust-cache@v1
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install latest nextest release
uses: taiki-e/install-action@nextest
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build the `zkbtc` binary
FROM rust:1.76 as build
FROM rust as build

WORKDIR /app

COPY ./src ./src
COPY Cargo.* .
COPY Cargo.* rust-toolchain.toml ./

RUN cargo build --release

Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.76.0"
components = [ "rustfmt", "clippy" ]
profile = "minimal"

0 comments on commit a7f8d90

Please sign in to comment.