Skip to content

Commit bf5cb47

Browse files
authored
chore: bump rust toolchain and deps (#36)
* chore: bump rust toolchain and deps * run CI jobs on ubuntu-latest-arm * bump CI actions * fix arm runner name * fix codecov upload step * fix build errors * fix Makefile * fix CI deps * fix * typo
1 parent 4520e4c commit bf5cb47

7 files changed

Lines changed: 57 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ env:
2121
jobs:
2222
test:
2323
name: build-and-test
24-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-24.04-arm
2525
steps:
26-
- uses: actions/checkout@v5
26+
- uses: actions/checkout@v6
2727
- name: Setup sccache
2828
uses: mozilla-actions/sccache-action@v0.0.9
2929
timeout-minutes: 5
@@ -35,17 +35,24 @@ jobs:
3535

3636
lint:
3737
name: All lint checks
38-
runs-on: ubuntu-latest
38+
runs-on: ubuntu-24.04-arm
3939
steps:
40-
- uses: actions/checkout@v5
40+
- uses: actions/checkout@v6
4141
- name: Setup sccache
4242
uses: mozilla-actions/sccache-action@v0.0.9
4343
timeout-minutes: 5
4444
continue-on-error: true
45+
- name: Apt Dependencies
46+
uses: nick-fields/retry@v3
47+
with:
48+
timeout_minutes: 5
49+
max_attempts: 3
50+
command: |
51+
sudo apt-get install -y build-essential # required dep for cargo-spellcheck
4552
- name: Install LLVM and Clang
4653
uses: KyleMayes/install-llvm-action@v2
4754
with:
48-
version: "14"
55+
version: "18"
4956
- name: Install Lint tools
5057
run: make install-lint-tools-ci
5158
env:
@@ -55,9 +62,9 @@ jobs:
5562

5663
dependencies-check:
5764
name: Check cargo dependencies
58-
runs-on: ubuntu-latest
65+
runs-on: ubuntu-24.04-arm
5966
steps:
60-
- uses: actions/checkout@v5
67+
- uses: actions/checkout@v6
6168
- name: Set up Ruby
6269
uses: ruby/setup-ruby@v1
6370
with:
@@ -66,10 +73,10 @@ jobs:
6673
run: |
6774
gem install toml-rb --no-document
6875
ruby scripts/linters/find_unused_deps.rb
69-
codedov:
70-
runs-on: ubuntu-latest
76+
codecov:
77+
runs-on: ubuntu-24.04-arm
7178
steps:
72-
- uses: actions/checkout@v5
79+
- uses: actions/checkout@v6
7380
- uses: taiki-e/install-action@cargo-llvm-cov
7481
- name: Setup sccache
7582
uses: mozilla-actions/sccache-action@v0.0.9
@@ -78,15 +85,14 @@ jobs:
7885
- run: cargo llvm-cov --all-features --lcov --output-path lcov.info
7986
env:
8087
RUSTC_WRAPPER:
81-
- uses: actions/upload-artifact@v4
88+
- uses: actions/upload-artifact@v6
8289
with:
8390
name: lcov.info
8491
path: lcov.info
8592
if-no-files-found: error
86-
- name: Upload to codecov
87-
env:
88-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
89-
run: |
90-
curl -Os https://uploader.codecov.io/latest/linux/codecov
91-
chmod +x codecov
92-
./codecov -f lcov.info -Z
93+
- name: Upload CodeCov
94+
uses: codecov/codecov-action@v5
95+
with:
96+
token: ${{ secrets.CODECOV_TOKEN }}
97+
files: lcov.info
98+
fail_ci_if_error: true

.github/workflows/release-plz.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
# Release unpublished packages.
1010
release-plz-release:
1111
name: Release-plz release
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04-arm
1313
permissions:
1414
contents: write
1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6
1717
with:
1818
fetch-depth: 0
1919
persist-credentials: false
@@ -28,15 +28,15 @@ jobs:
2828
# Create a PR with the new versions and changelog, preparing the next release.
2929
release-plz-pr:
3030
name: Release-plz PR
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-24.04-arm
3232
permissions:
3333
contents: write
3434
pull-requests: write
3535
concurrency:
3636
group: release-plz-${{ github.ref }}
3737
cancel-in-progress: false
3838
steps:
39-
- uses: actions/checkout@v5
39+
- uses: actions/checkout@v6
4040
with:
4141
fetch-depth: 0
4242
persist-credentials: false

Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,26 @@ rust-version = "1.85.0"
1212
[workspace.dependencies]
1313
ahash = "0.8"
1414
anyhow = "1"
15-
base32 = "0.5.1"
15+
base32 = "0.5"
1616
base64 = "0.22"
1717
bls-signatures = { version = "0.15" }
1818
bls12_381 = "0.8"
19-
cid = { version = "0.10.1", features = ["std"] }
20-
fvm_ipld_bitfield = "0.7.1"
19+
cid = { version = "0.11", features = ["std"] }
20+
fvm_ipld_bitfield = "0.7"
2121
fvm_ipld_encoding = "0.5"
22-
hashlink = "0.10.0"
22+
hashlink = "0.11"
2323
hex = "0.4"
2424
jsonrpsee = { version = "0.26", features = ["ws-client", "http-client"] }
25-
keccak-hash = "0.11"
26-
num-bigint = { version = "0.4.6", features = ["serde"] }
27-
num-traits = "0.2.19"
25+
keccak-hash = "0.12"
26+
multihash-codetable = { version = "0.1" }
27+
num-bigint = { version = "0.4", features = ["serde"] }
28+
num-traits = "0.2"
2829
parking_lot = "0.12"
2930
rand = "0.8"
3031
serde = { version = "1", features = ["derive"] }
31-
serde_cbor = "0.11.2"
32+
serde_cbor = { package = "serde_cbor_2", version = "0.13" }
3233
serde_json = { version = "1", features = ["raw_value"] }
33-
sha3 = "0.10.8"
34+
sha3 = "0.10"
3435
strum = { version = "0.27.1", features = ["derive"] }
3536
strum_macros = "0.27.1"
3637
thiserror = "2"

Makefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,20 @@ install-lint-tools:
5050
cargo install --locked cargo-deny
5151
cargo install --locked cargo-spellcheck
5252

53-
install-lint-tools-ci:
54-
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
55-
tar xzf cargo-binstall-x86_64-unknown-linux-musl.tgz
53+
# Denotes the architecture of the machine. This is required for direct binary downloads.
54+
# Note that some repositories might use different names for the same architecture.
55+
CPU_ARCH := $(shell \
56+
ARCH=$$(uname -m); \
57+
if [ "$$ARCH" = "arm64" ]; then \
58+
ARCH="aarch64"; \
59+
fi; \
60+
echo "$$ARCH" \
61+
)
62+
63+
install-cargo-binstall:
64+
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-$(CPU_ARCH)-unknown-linux-musl.tgz
65+
tar xzf cargo-binstall-$(CPU_ARCH)-unknown-linux-musl.tgz
5666
cp cargo-binstall ~/.cargo/bin/cargo-binstall
5767

68+
install-lint-tools-ci: install-cargo-binstall
5869
cargo binstall --no-confirm taplo-cli cargo-spellcheck cargo-deny

gpbft/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ filecoin-f3-merkle = { path = "../merkle", version = "0.1.0" }
1818
fvm_ipld_bitfield = { workspace = true }
1919
fvm_ipld_encoding = { workspace = true }
2020
keccak-hash = { workspace = true }
21+
multihash-codetable = { workspace = true, features = ["blake2b"] }
2122
num-bigint = { workspace = true }
2223
num-traits = { workspace = true }
2324
serde = { workspace = true }
@@ -31,7 +32,8 @@ base64 = { workspace = true }
3132
serde_json = { workspace = true }
3233

3334
[target.'cfg(target_family="wasm")'.dependencies]
34-
getrandom = { version = "0.3", features = ["wasm_js"] }
35+
getrandom_0_2 = { package = "getrandom", version = "0.2", features = ["js"] }
36+
getrandom_0_3 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
3537

3638
[features]
3739
test-utils = []

gpbft/src/chain.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
use crate::GPBFTError;
55
pub use cid::Cid;
6-
use cid::multihash::Code::Blake2b256;
7-
use cid::multihash::MultihashDigest;
86
use fvm_ipld_encoding::DAG_CBOR;
7+
use multihash_codetable::{Code::Blake2b256, MultihashDigest as _};
98
use std::fmt::Display;
109
use std::{cmp, fmt};
1110

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.85.0"
2+
channel = "1.92.0"
33
components = ["clippy", "llvm-tools-preview", "rustfmt"]
44
targets = ["wasm32-unknown-unknown"]

0 commit comments

Comments
 (0)