Skip to content

Commit 8cea254

Browse files
authored
fix: aligning targets after upgrades (#1635)
1 parent eab30c1 commit 8cea254

6 files changed

Lines changed: 47 additions & 68 deletions

File tree

.cargo/config.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ linker = "clang"
33
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
44

55
[alias]
6-
drecross = "zigbuild --bin dre --release --target x86_64-apple-darwin"
6+
cross-x86 = "zigbuild --bin dre --release --target x86_64-apple-darwin"
7+
cross-aarch = "zigbuild --bin dre --release --target aarch64-apple-darwin"

.github/workflows/dre-release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,15 @@ jobs:
7777
shell: bash
7878
run: |
7979
rustup target add x86_64-apple-darwin
80+
rustup target add aarch64-apple-darwin
8081
CARGO_BAZEL_REPIN=true bazel build --config=ci //rs/cli:dre
81-
cargo drecross
82+
cargo cross-x86
83+
cargo cross-aarch
8284
8385
mkdir -p release/artifacts
8486
cp --dereference bazel-out/k8-opt/bin/rs/cli/dre release/artifacts/dre-x86_64-unknown-linux
8587
cp target/x86_64-apple-darwin/release/dre release/artifacts/dre-x86_64-apple-darwin
88+
cp target/aarch64-apple-darwin/release/dre release/artifacts/dre-aarch64-apple-darwin
8689
8790
git cliff --current --sort newest > release/CHANGELOG.md
8891

Cargo.Bazel.lock

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"checksum": "248d2afa8cef2df9b5b8f6755a838d697dbb78128a003fb9fca2630792467836",
2+
"checksum": "c968aafbacd9e4e32e4a50dda256fd5d74df9b2f5c03ef0aad1a40b7c67f8732",
33
"crates": {
44
"actix-codec 0.5.2": {
55
"name": "actix-codec",
@@ -30669,9 +30669,12 @@
3066930669
"version": "0.1.0",
3067030670
"package_url": "https://github.com/dfinity/ic",
3067130671
"repository": {
30672-
"Http": {
30673-
"url": "https://static.crates.io/crates/icrc-cbor/0.1.0/download",
30674-
"sha256": "90569d2894d9536c5416943556ac6339df249f06611b3c41029196b39e0dd119"
30672+
"Git": {
30673+
"remote": "https://github.com/dfinity/ic.git",
30674+
"commitish": {
30675+
"Rev": "2f87fe95207dc6371a2f2dc273362ba03b41e0e9"
30676+
},
30677+
"strip_prefix": "packages/icrc-cbor"
3067530678
}
3067630679
},
3067730680
"targets": [
@@ -30797,9 +30800,12 @@
3079730800
"version": "0.1.10",
3079830801
"package_url": "https://github.com/dfinity/ic",
3079930802
"repository": {
30800-
"Http": {
30801-
"url": "https://static.crates.io/crates/icrc-ledger-types/0.1.10/download",
30802-
"sha256": "87c31beeee0e5ab964861a3d5ea2b5ed7b688b2b22400367a832b1fcf0db1fa4"
30803+
"Git": {
30804+
"remote": "https://github.com/dfinity/ic.git",
30805+
"commitish": {
30806+
"Rev": "2f87fe95207dc6371a2f2dc273362ba03b41e0e9"
30807+
},
30808+
"strip_prefix": "packages/icrc-ledger-types"
3080330809
}
3080430810
},
3080530811
"targets": [

Cargo.lock

Lines changed: 21 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ cycles-minting-canister = { git = "https://github.com/dfinity/ic.git", rev = "2f
139139
ic-icrc1-test-utils = { git = "https://github.com/dfinity/ic.git", rev = "2f87fe95207dc6371a2f2dc273362ba03b41e0e9" }
140140
rosetta-core = { git = "https://github.com/dfinity/ic.git", rev = "2f87fe95207dc6371a2f2dc273362ba03b41e0e9" }
141141
icp-ledger = { git = "https://github.com/dfinity/ic.git", rev = "2f87fe95207dc6371a2f2dc273362ba03b41e0e9" }
142-
icrc-ledger-types = { version = "0.1.10" }
142+
icrc-ledger-types = { git = "https://github.com/dfinity/ic.git",rev = "2f87fe95207dc6371a2f2dc273362ba03b41e0e9" }
143143
ic-metrics-encoder = "1.1.1"
144144
ic-transport-types = "0.39.3"
145145
ic-utils = "0.39.3"

rs/cli/src/commands/upgrade.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ impl Upgrade {
8383

8484
let triple = match std::env::consts::OS {
8585
"linux" => "x86_64-unknown-linux",
86-
"macos" => "x86_64-apple-darwin",
86+
"macos" => match std::env::consts::ARCH {
87+
"aarch64" => "aarch64-apple-darwin",
88+
_ => "x86_64-apple-darwin",
89+
},
8790
s => {
8891
return Err(anyhow::anyhow!(
8992
"{} is not currently not supported for automatic upgrades. Try building the code from source",
@@ -92,6 +95,8 @@ impl Upgrade {
9295
}
9396
};
9497

98+
info!("Using triple: {triple}");
99+
95100
info!("Binary not up to date. Updating to {}", release.version);
96101
info!("Release: {:?}", release);
97102

0 commit comments

Comments
 (0)