Skip to content

Commit 70d6649

Browse files
Merge pull request #99 from FrameworkComputer/win-release
windows: Upload release binary
2 parents 64cc788 + 8454d66 commit 70d6649

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,24 @@ jobs:
9191
- name: Setup Rust toolchain
9292
run: rustup show
9393

94+
# Build debug library first to fail fast
9495
- name: Build library (Windows)
9596
run: cargo build -p framework_lib --no-default-features --features "windows"
9697

9798
- name: Build Windows tool
98-
run: cargo build -p framework_tool --no-default-features --features "windows"
99+
run: |
100+
cargo build -p framework_tool --no-default-features --features "windows"
101+
cargo build -p framework_tool --no-default-features --features "windows" --release
99102
100103
- name: Check if Windows tool can start
101-
run: cargo run --no-default-features --features "windows" -- --help
104+
run: cargo run --no-default-features --features "windows" -- --help --release
102105

106+
# Upload release build so that vcruntime is statically linked
103107
- name: Upload Windows App
104108
uses: actions/upload-artifact@v4
105109
with:
106110
name: framework_tool.exe
107-
path: target/debug/framework_tool.exe
111+
path: target/release/framework_tool.exe
108112

109113

110114
test:

framework_lib/src/chromium_ec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ impl CrosEc {
916916
let mut request = EcRequestGpioGetV0 { name: [0; MAX_LEN] };
917917

918918
let end = MAX_LEN.min(name.len());
919-
request.name[..end].copy_from_slice(name[..end].as_bytes());
919+
request.name[..end].copy_from_slice(&name.as_bytes()[..end]);
920920

921921
let res = request.send_command(self)?;
922922
Ok(res.val == 1)

framework_tool/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ path = "../framework_lib"
1414
default-features = false
1515

1616
[build-dependencies]
17+
# Note: Only takes effect in release builds
1718
static_vcruntime = "2.0"

0 commit comments

Comments
 (0)