Skip to content

Commit

Permalink
ci: ensure Windows build for account_sdk (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy authored Sep 20, 2024
1 parent 67129f3 commit fea57f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ jobs:
cd packages/account_sdk
cargo build -r --target wasm32-unknown-unknown -p account_sdk
ensure-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
target: x86_64-pc-windows-msvc
- run: cargo build --target x86_64-pc-windows-msvc -p account_sdk

clippy:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 3 additions & 1 deletion packages/account_sdk/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ fn generate_constants() {
casm_hash: felt!("{:#x}"),
}});"#,
version.replace('.', "_").to_uppercase(),
path.display(),
// Replace the '\' with '/' on Windows, meaning the path is always the same
// on all platforms. Windows also accepts '/' as a path separator.
path.display().to_string().replace("\\", "/"),
extract_class_hash(&path),
extract_compiled_class_hash(version)
));
Expand Down

0 comments on commit fea57f1

Please sign in to comment.