Skip to content

Commit

Permalink
Merge pull request #1616 from multiversx/stable-toolchain
Browse files Browse the repository at this point in the history
Stable Rust: GitHub Actions & toolchain
  • Loading branch information
andrei-marinica committed May 13, 2024
2 parents fd62fb9 + 8bbca64 commit 526d319
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 12 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/actions-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

permissions:
checks: write
pull-requests: write

jobs:
contracts:
name: Contracts (nightly)
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.2.0
with:
rust-toolchain: nightly-2023-12-11
path-to-sc-meta: framework/meta
enable-contracts-size-report: false
mx-scenario-go-version: v2.1.0-alpha
coverage-args: --ignore-filename-regex='meta/src' --ignore-filename-regex='wasm-adapter' --ignore-filename-regex='benchmarks/' --ignore-filename-regex='tests/' --output ./coverage.md
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Contracts
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.1.0
with:
rust-toolchain: nightly-2023-12-11
rust-toolchain: stable
path-to-sc-meta: framework/meta
mx-scenario-go-version: v2.1.0-alpha
coverage-args: --ignore-filename-regex='meta/src' --ignore-filename-regex='wasm-adapter' --ignore-filename-regex='benchmarks/' --ignore-filename-regex='tests/' --output ./coverage.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lldb-formatter-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
default: true
toolchain: nightly-2023-12-11
toolchain: stable

- name: Download vscode-lldb
uses: robinraju/release-downloader@v1.5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: nightly-2023-12-11
toolchain: stable
target: wasm32-unknown-unknown

- name: Setup the PATH variable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template-test-current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: nightly-2023-12-11
toolchain: stable
target: wasm32-unknown-unknown

- name: Install prerequisites
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template-test-released.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: nightly-2023-12-11
toolchain: stable
target: wasm32-unknown-unknown

- name: Install prerequisites
Expand Down
1 change: 1 addition & 0 deletions data/codec/tests/derive_struct_with_generic_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use codec::{
// to test, run the following command in the crate folder:
// cargo expand --test struct_with_generic_derive_test > expanded.rs

#[allow(dead_code)]
trait SimpleTrait {
fn simple_function(&self);
}
Expand Down
6 changes: 0 additions & 6 deletions framework/base/src/types/managed/wrapped/managed_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::{
codec::{
DecodeError, DecodeErrorHandler, EncodeErrorHandler, NestedDecode, NestedDecodeInput,
NestedEncode, NestedEncodeOutput, TopDecode, TopDecodeInput, TopEncode, TopEncodeOutput,
TryStaticCast,
},
formatter::{hex_util::encode_bytes_as_hex, FormatByteReceiver, SCLowerHex},
types::{heap::Address, ManagedBuffer, ManagedByteArray, ManagedType},
Expand Down Expand Up @@ -200,11 +199,6 @@ where
}
}

#[derive(Clone)]
pub(crate) struct ManagedBufferSizeContext(pub usize);

impl TryStaticCast for ManagedBufferSizeContext {}

impl<M> NestedEncode for ManagedAddress<M>
where
M: ManagedTypeApi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ impl StaticVarApi for VmApiImpl {
}

impl StaticVarApiImpl for VmApiImpl {
#[allow(static_mut_refs)]
fn with_lockable_static_buffer<R, F: FnOnce(&mut LockableStaticBuffer) -> R>(&self, f: F) -> R {
unsafe { f(&mut STATIC_BUFFER) }
}
Expand Down
1 change: 1 addition & 0 deletions framework/wasm-adapter/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_std]
#![allow(unknown_lints)]

// Allows us to use alloc::vec::Vec;
// TODO: get rid of the legacy API and also of this.
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2023-12-11"
channel = "stable"

0 comments on commit 526d319

Please sign in to comment.