Merge pull request #3550 from Byron/fix-win-build

fix build on Windows
This commit is contained in:
Josh Junon 2024-04-18 14:36:06 +02:00 committed by GitHub
commit 8ac5865046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View File

@ -203,6 +203,7 @@ jobs:
- check-gitbutler-core - check-gitbutler-core
- check-gitbutler-changeset - check-gitbutler-changeset
- check-gitbutler-git - check-gitbutler-git
- check-rust-windows
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Decide whether the needed jobs succeeded or failed - name: Decide whether the needed jobs succeeded or failed
@ -211,3 +212,12 @@ jobs:
allowed-skips: ${{ toJSON(needs) }} allowed-skips: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }} jobs: ${{ toJSON(needs) }}
check-rust-windows:
needs: changes
runs-on: windows-latest
if: ${{ needs.changes.outputs.rust == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: "cargo check"
run: cargo check --all --bins --examples

View File

@ -26,7 +26,7 @@ tokio = ["dep:tokio"]
[dependencies] [dependencies]
thiserror.workspace = true thiserror.workspace = true
serde = { workspace = true, optional = true } serde = { workspace = true, optional = true }
tokio = { workspace = true, optional = true, features = ["process", "time", "io-util", "net", "fs" ] } tokio = { workspace = true, optional = true, features = ["process", "time", "io-util", "net", "fs"] }
rand = "0.8.5" rand = "0.8.5"
futures = "0.3.30" futures = "0.3.30"
sysinfo = "0.30.5" sysinfo = "0.30.5"
@ -36,6 +36,7 @@ nix = { version = "0.28.0", features = ["process", "socket", "user"] }
[target."cfg(windows)".dependencies] [target."cfg(windows)".dependencies]
winapi = { version = "0.3.9", features = ["winbase", "namedpipeapi"] } winapi = { version = "0.3.9", features = ["winbase", "namedpipeapi"] }
tokio = { workspace = true, optional = true, features = ["sync"] }
# synchronous named pipes for the askpass utility # synchronous named pipes for the askpass utility
windows-named-pipe = "0.1.0" windows-named-pipe = "0.1.0"