Skip to content

Commit

Permalink
chore(ci): bump rust version to 1.81
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFluffy committed Sep 20, 2024
1 parent c38ce8e commit 4852565
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 21 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
env:
REGISTRY: ghcr.io
FULL_REF: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
# This must match the entry in rustup-toolchain.toml at the repository root
RUSTUP_TOOLCHAIN: "1.81.0"

jobs:
upload-binaries:
Expand All @@ -34,7 +36,9 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: arduino/setup-protoc@v3
with:
version: "24.4"
Expand Down
40 changes: 30 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Test
env:
CI: true
RUSTFLAGS: "-D warnings -D unreachable-pub --cfg tokio_unstable"

# This must match the entry in rustup-toolchain.toml at the repository root
RUSTUP_TOOLCHAIN: "1.81.0"
on:
pull_request:
merge_group:
Expand All @@ -26,7 +29,9 @@ jobs:
version: "1.32.0"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2.7.3
with:
cache-provider: "buildjet"
Expand All @@ -51,7 +56,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2.7.3
with:
cache-provider: "buildjet"
Expand All @@ -77,7 +84,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@1.76.0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: taiki-e/install-action@v2.15.2
with:
tool: cargo-hack@0.5.29
Expand All @@ -100,7 +109,9 @@ jobs:
if: needs.run_checker.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.76.0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2.7.3
with:
cache-provider: "github"
Expand All @@ -113,7 +124,9 @@ jobs:
if: needs.run_checker.outputs.run_audit == 'true'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.76.0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -126,7 +139,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@1.76.0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2.7.3
with:
cache-provider: "buildjet"
Expand Down Expand Up @@ -154,7 +169,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@1.76.0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2.7.3
with:
cache-provider: "buildjet"
Expand All @@ -179,7 +196,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@1.76.0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2.7.3
with:
cache-provider: "buildjet"
Expand All @@ -198,8 +217,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@1.78.0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
components: clippy
- uses: Swatinem/rust-cache@v2.7.3
with:
Expand All @@ -226,7 +246,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
# This has to match `rust-toolchain` in the rust-toolchain file of the dylint lints
toolchain: nightly-2023-12-28
Expand Down
2 changes: 1 addition & 1 deletion containerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM rust:1.76-bookworm AS rust
FROM --platform=$BUILDPLATFORM rust:1.81-bookworm AS rust

WORKDIR /build/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ async fn wait_for_empty_mempool(
/// 1. The last transaction by the bridge account did not contain a withdrawal action.
/// 2. The memo of the last transaction by the bridge account could not be parsed.
/// 3. The block number in the memo of the last transaction by the bridge account could not be
/// converted to a u64.
/// converted to a u64.
fn rollup_height_from_signed_transaction(
signed_transaction: &SignedTransaction,
) -> eyre::Result<u64> {
Expand Down
3 changes: 3 additions & 0 deletions crates/astria-conductor/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
//! # Astria Conductor
//!
//! The Astria conductor connects the shared sequencer layer and the execution layer.
//! When a block is received from the sequencer layer, the conductor pushes it to the execution
//! layer. There are two ways for a block to be received:
//!
//! - pushed from the shared-sequencer
//! - via the data availability layer
//!
//! In the first case, the block is pushed to the execution layer, executed, and added to the
//! blockchain. It's marked as a soft commitment; the block is not regarded as finalized on the
//! execution layer until it's received from the data availability layer. In the second case, the
Expand Down
4 changes: 0 additions & 4 deletions crates/astria-sequencer/src/app/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ pub(crate) fn mock_tx(
Arc::new(tx.into_signed(signer))
}

#[cfg_attr(feature = "test", allow(dead_code))]
pub(crate) const MOCK_SEQUENCE_FEE: u128 = 10;
pub(crate) fn denom_0() -> Denom {
"denom_0".parse().unwrap()
Expand Down Expand Up @@ -271,8 +270,6 @@ fn denom_6() -> Denom {
"denom_6".parse().unwrap()
}

#[cfg_attr(feature = "test", allow(dead_code))]

pub(crate) fn mock_balances(
denom_0_balance: u128,
denom_1_balance: u128,
Expand All @@ -292,7 +289,6 @@ pub(crate) fn mock_balances(
balances
}

#[cfg_attr(feature = "test", allow(dead_code))]
pub(crate) fn mock_tx_cost(
denom_0_cost: u128,
denom_1_cost: u128,
Expand Down
6 changes: 3 additions & 3 deletions crates/astria-sequencer/src/app/tests_execute_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async fn app_execute_transaction_transfer_not_native_token() {

let mut state_tx = StateDelta::new(app.state.clone());
state_tx
.put_account_balance(alice_address, &test_asset(), value)
.put_account_balance(alice_address, test_asset(), value)
.unwrap();
app.apply(state_tx);

Expand Down Expand Up @@ -519,7 +519,7 @@ async fn app_execute_transaction_fee_asset_change_addition() {
app.execute_transaction(signed_tx).await.unwrap();
assert_eq!(app.state.get_account_nonce(alice_address).await.unwrap(), 1);

assert!(app.state.is_allowed_fee_asset(&test_asset()).await.unwrap());
assert!(app.state.is_allowed_fee_asset(test_asset()).await.unwrap());
}

#[tokio::test]
Expand Down Expand Up @@ -638,7 +638,7 @@ async fn app_execute_transaction_init_bridge_account_ok() {
);
assert_eq!(
app.state
.get_account_balance(alice_address, &nria())
.get_account_balance(alice_address, nria())
.await
.unwrap(),
before_balance - fee,
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-telemetry/src/metrics/builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use metrics_exporter_prometheus::{
PrometheusRecorder,
};

#[cfg(docs)]
#[cfg(doc)]
use super::{
Counter,
Gauge,
Expand Down

0 comments on commit 4852565

Please sign in to comment.