Skip to content

Commit b729083

Browse files
authored
Upgrade docker image using LLVM 19 + Rust 1.85.1 (#33)
* Upgrade docker image using LLVM 19 + Rust 1.85.1 * Upgrade Rust version used in CI * More CI fixes * And yet more fixes * (Hopefully) final CI fix
1 parent f9cb1f7 commit b729083

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

.github/workflows/rust.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ jobs:
4040
git submodule add https://github.com/nervosnetwork/ckb-c-stdlib deps/ckb-c-stdlib &&
4141
git submodule add https://github.com/xxuejie/lib-dummy-atomics deps/lib-dummy-atomics
4242
- name: Lock Rust version
43-
run: cd test-workspace && echo "1.81.0" > rust-toolchain
44-
- name: Install riscv64 target
45-
run: cd test-workspace && rustup target add riscv64imac-unknown-none-elf
43+
run: cd test-workspace && echo "1.85.1" > rust-toolchain
44+
- name: Install riscv64 target & clippy
45+
run: cd test-workspace && rustup target add riscv64imac-unknown-none-elf && rustup component add clippy
4646
- name: Run all checks
4747
run: cd test-workspace && make build test check clippy
4848
- name: Reproducible build runs
4949
run: cd test-workspace && ./scripts/reproducible_build_docker --update && ./scripts/reproducible_build_docker --no-clean
5050
- name: Generate standalone contract
5151
run: cargo generate --path . standalone-contract --name test-contract
5252
- name: Lock Rust version
53-
run: cd test-contract && echo "1.81.0" > rust-toolchain
53+
run: cd test-contract && echo "1.85.1" > rust-toolchain
5454
- name: Run all checks
5555
run: cd test-contract && make build test check clippy
5656
- name: Reproducible build runs
@@ -218,7 +218,7 @@ jobs:
218218

219219
windows-build:
220220

221-
runs-on: windows-2019
221+
runs-on: windows-2022
222222

223223
steps:
224224
- uses: actions/checkout@v3

atomics-contract/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn main() {
44
Err(_) => "../..".to_string(),
55
};
66

7-
println!("cargo:rerun-if-changed={}/deps/lib-dummy-atomics/atomics.c", top);
7+
println!("cargo:rerun-if-changed={top}/deps/lib-dummy-atomics/atomics.c");
88

99
let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
1010
if target_arch == "riscv64" {
@@ -14,10 +14,10 @@ fn main() {
1414
"Clang must be used as the compiler!"
1515
);
1616
build
17-
.file(format!("{}/deps/lib-dummy-atomics/atomics.c", top))
17+
.file(format!("{top}/deps/lib-dummy-atomics/atomics.c"))
1818
.static_flag(true)
19-
.include(format!("{}/deps/ckb-c-stdlib", top))
20-
.include(format!("{}/deps/ckb-c-stdlib/libc", top))
19+
.include(format!("{top}/deps/ckb-c-stdlib"))
20+
.include(format!("{top}/deps/ckb-c-stdlib/libc"))
2121
.no_default_flags(true)
2222
.flag("--target=riscv64")
2323
.flag("-march=rv64imc_zba_zbb_zbc_zbs")

c-wrapper-crate/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ fn main() {
1616
build
1717
.file("c.c")
1818
.static_flag(true)
19-
.include(format!("{}/deps/ckb-c-stdlib", top))
20-
.include(format!("{}/deps/ckb-c-stdlib/libc", top))
19+
.include(format!("{top}/deps/ckb-c-stdlib"))
20+
.include(format!("{top}/deps/ckb-c-stdlib/libc"))
2121
.no_default_flags(true)
2222
.flag("--target=riscv64")
2323
.flag("-march=rv64imc_zba_zbb_zbc_zbs")

standalone-contract/scripts/reproducible_build_docker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
set -ex
88

99
DOCKER="${DOCKER:-docker}"
10-
# docker pull docker.io/cryptape/llvm-n-rust:20250117
11-
DOCKER_IMAGE="${DOCKER_IMAGE:-docker.io/cryptape/llvm-n-rust@sha256:12e7821cb9c7cbc8988d5b1d60bcc87da4cedcf3eea32df1d8833328c5a69f88}"
10+
# docker pull docker.io/cryptape/llvm-n-rust:20250617
11+
DOCKER_IMAGE="${DOCKER_IMAGE:-docker.io/cryptape/llvm-n-rust@sha256:d6d1f9a6656039273210de91913c828f5b4aa4a3282d2c93ed19bcb7bbf728fe}"
1212
CHECKSUM_FILE_PATH="${CHECKSUM_FILE_PATH:-checksums.txt}"
1313

1414
# We are parsing command line arguments based on tips from:

standalone-contract/src/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn verify_and_dump_failed_tx(
107107
let mock_tx = context.dump_tx(tx).expect("dump failed tx");
108108
let json = serde_json::to_string_pretty(&mock_tx).expect("json");
109109
path.push(format!("0x{:x}.json", tx.hash()));
110-
println!("Failed tx written to {:?}", path);
110+
println!("Failed tx written to {path:?}");
111111
std::fs::write(path, json).expect("write");
112112
}
113113
result

standalone-contract/src/tests/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ fn test_{{crate_name}}() {
5959
let cycles = context
6060
.verify_tx(&tx, 10_000_000)
6161
.expect("pass verification");
62-
println!("consume cycles: {}", cycles);
62+
println!("consume cycles: {cycles}");
6363
}

workspace/scripts/reproducible_build_docker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
set -ex
88

99
DOCKER="${DOCKER:-docker}"
10-
# docker pull docker.io/cryptape/llvm-n-rust:20250117
11-
DOCKER_IMAGE="${DOCKER_IMAGE:-docker.io/cryptape/llvm-n-rust@sha256:12e7821cb9c7cbc8988d5b1d60bcc87da4cedcf3eea32df1d8833328c5a69f88}"
10+
# docker pull docker.io/cryptape/llvm-n-rust:20250617
11+
DOCKER_IMAGE="${DOCKER_IMAGE:-docker.io/cryptape/llvm-n-rust@sha256:d6d1f9a6656039273210de91913c828f5b4aa4a3282d2c93ed19bcb7bbf728fe}"
1212
CHECKSUM_FILE_PATH="${CHECKSUM_FILE_PATH:-checksums.txt}"
1313

1414
# We are parsing command line arguments based on tips from:

workspace/tests/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl Loader {
8484
path.push(name);
8585
let result = fs::read(&path);
8686
if result.is_err() {
87-
panic!("Binary {:?} is missing!", path);
87+
panic!("Binary {path:?} is missing!");
8888
}
8989
result.unwrap().into()
9090
}
@@ -105,7 +105,7 @@ pub fn verify_and_dump_failed_tx(
105105
let mock_tx = context.dump_tx(tx).expect("dump failed tx");
106106
let json = serde_json::to_string_pretty(&mock_tx).expect("json");
107107
path.push(format!("0x{:x}.json", tx.hash()));
108-
println!("Failed tx written to {:?}", path);
108+
println!("Failed tx written to {path:?}");
109109
std::fs::write(path, json).expect("write");
110110
}
111111
result

x64-simulator-crate/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ mod tests {
3232
.unwrap()
3333
.as_nanos() as u64,
3434
};
35-
println!("Seed: {}", seed);
35+
println!("Seed: {seed}");
3636

3737
let mut rng = StdRng::seed_from_u64(seed);
3838
let length = rng.gen_range(0..614400usize);

0 commit comments

Comments
 (0)