Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
[target.x86_64-unknown-linux-gnu]
rustflags = [
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is enabled by default now, and we do not need to set it manually anymore.

# LLD is generally faster and might be the default for Rust in the future.
# See here: https://github.com/rust-lang/rust/issues/71515
"-C", "link-arg=-fuse-ld=lld",
]

[env]
CXXFLAGS = "-include cstdint" #TODO: remove once RocksDB 0.24 is released
42 changes: 21 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ executors:
# The default docker image used in the main-workflow
rust-docker:
docker:
- image: cimg/rust:1.88.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
- image: cimg/rust:1.92.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well

commands:
check_windows:
Expand All @@ -47,7 +47,7 @@ commands:

# Install rust with rustup.
Invoke-WebRequest -Uri "https://win.rustup.rs/" -OutFile "C:\rustup-init.exe"
& C:\rustup-init.exe -y --default-toolchain "1.88.0-x86_64-pc-windows-msvc" --no-modify-path --profile minimal # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
& C:\rustup-init.exe -y --default-toolchain "1.92.0-x86_64-pc-windows-msvc" --no-modify-path --profile minimal # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well

# Add cargo to PATH
$Env:Path += ";$Env:USERPROFILE\.cargo\bin"
Expand Down Expand Up @@ -77,7 +77,7 @@ commands:
parameters:
cache_key:
type: string
default: v4.2.0-rust-1.88.0-snarkos-stable-cache
default: v4.2.0-rust-1.92.0-snarkos-stable-cache
steps:
- run: set -e
- run:
Expand Down Expand Up @@ -117,7 +117,7 @@ commands:
parameters:
cache_key:
type: string
default: v4.2.0-rust-1.88.0-snarkos-stable-cache
default: v4.2.0-rust-1.92.0-snarkos-stable-cache
steps:
- run: set +e
- run:
Expand Down Expand Up @@ -150,13 +150,13 @@ commands:
steps:
- checkout
- setup_environment:
cache_key: v4.2.0-rust-1.88.0-<< parameters.cache_key >>-cache
cache_key: v4.2.0-rust-1.92.0-<< parameters.cache_key >>-cache

- run:
name: Install cargo-nextest
command: |
# Anything newer requires a Rust toolchain upgrade.
cargo install cargo-nextest@0.9.114 --locked || true
cargo install cargo-nextest@0.9.118 --locked || true

- run:
name: "Run Tests"
Expand Down Expand Up @@ -320,7 +320,7 @@ commands:
- store_test_results:
path: target/nextest/ci
- clear_environment:
cache_key: v4.2.0-rust-1.88.0-<< parameters.cache_key >>-cache
cache_key: v4.2.0-rust-1.92.0-<< parameters.cache_key >>-cache

run_serial_long:
description: "Build and run long running tests"
Expand Down Expand Up @@ -531,7 +531,7 @@ jobs:
steps:
- run_devnet:
workspace_member: .
cache_key: v4.2.0-rust-1.88.0-devnet-test-cache
cache_key: v4.2.0-rust-1.92.0-devnet-test-cache

# Check crates that do not have any tests individually
check-other-crates:
Expand All @@ -540,7 +540,7 @@ jobs:
steps:
- checkout
- setup_environment:
cache_key: v4.2.0-rust-1.88.0-check-other-crates-cache
cache_key: v4.2.0-rust-1.92.0-check-other-crates-cache
- run:
name: Check snarkos-node-metrics crate
no_output_timeout: 10m
Expand All @@ -550,7 +550,7 @@ jobs:
no_output_timeout: 10m
command: cargo check --package=snarkos-node-metrics --all-features
- clear_environment:
cache_key: v4.2.0-rust-1.88.0-check-other-crates-cache
cache_key: v4.2.0-rust-1.92.0-check-other-crates-cache

check-fmt:
executor: rust-docker
Expand All @@ -559,69 +559,69 @@ jobs:
- checkout
- install_rust_nightly
- setup_environment:
cache_key: v4.2.0-rust-1.88.0-fmt-cache
cache_key: v4.2.0-rust-1.92.0-fmt-cache
- run:
name: Check style
no_output_timeout: 35m
command: cargo +nightly fmt --all -- --check
- clear_environment:
cache_key: v4.2.0-rust-1.88.0-fmt-cache
cache_key: v4.2.0-rust-1.92.0-fmt-cache

check-unused-dependencies:
executor: rust-docker
resource_class: << pipeline.parameters.medium >>
steps:
- checkout
- setup_environment:
cache_key: v4.2.0-rust-1.88.0-machete-cache
cache_key: v4.2.0-rust-1.92.0-machete-cache
- run:
name: Check for unused dependencies
no_output_timeout: 10m
command: |
cargo install cargo-machete@0.7.0
cargo machete
- clear_environment:
cache_key: v4.2.0-rust-1.88.0-machete-cache
cache_key: v4.2.0-rust-1.92.0-machete-cache

check-cargo-audit:
executor: rust-docker
resource_class: << pipeline.parameters.medium >>
steps:
- checkout
- setup_environment:
cache_key: v4.2.0-rust-1.88.0-cargo-audit-cache
cache_key: v4.2.0-rust-1.92.0-cargo-audit-cache
- run:
name: Check for security vulnerabilities
no_output_timeout: 10m
command: |
cargo install cargo-audit@0.21.2 --locked
cargo install cargo-audit@0.22.0 --locked
cargo audit -D warnings
- clear_environment:
cache_key: v4.2.0-rust-1.88.0-cargo-audit-cache
cache_key: v4.2.0-rust-1.92.0-cargo-audit-cache

check-clippy:
executor: rust-docker
resource_class: << pipeline.parameters.medium >>
steps:
- checkout
- setup_environment:
cache_key: v4.2.0-rust-1.88.0-clippy-cache
cache_key: v4.2.0-rust-1.92.0-clippy-cache
- run:
name: Check lint
no_output_timeout: 35m
command: |
cargo clippy --workspace --all-targets -- -D warnings
cargo clippy --workspace --all-targets --all-features -- -D warnings
- clear_environment:
cache_key: v4.2.0-rust-1.88.0-clippy-cache
cache_key: v4.2.0-rust-1.92.0-clippy-cache

lint-scripts:
executor: rust-docker
resource_class: << pipeline.parameters.medium >>
steps:
- checkout
- setup_environment:
cache_key: v4.2.0-rust-1.88.0-lint-scripts-cache
cache_key: v4.2.0-rust-1.92.0-lint-scripts-cache
- run:
name: Install shellcheck
command: |
Expand All @@ -634,7 +634,7 @@ jobs:
command: |
shellcheck -x .ci/*.sh
- clear_environment:
cache_key: v4.2.0-rust-1.88.0-lint-scripts-cache
cache_key: v4.2.0-rust-1.92.0-lint-scripts-cache

verify-windows:
executor:
Expand Down
Loading