Skip to content

Commit

Permalink
use vcpkg to install windows dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed May 16, 2024
1 parent a1a5ccf commit 2ca90e0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

env:
CARGO_TERM_COLOR: always
WIN_FEATURES: vendored-openssl,quic,vendored-c-ares,hickory
VCPKG_ROOT: c:\vcpkg

jobs:
build:
Expand All @@ -32,12 +32,15 @@ jobs:
submodules: true
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
choco install capnproto
- name: Install tools (choco)
run: choco install capnproto
- name: Install tools (vcpkg)
run: vcpkg install pkgconf
- name: Install lib dependencies
run: vcpkg install --triplet=x64-windows-static-md openssl c-ares lua python3
- name: Cargo build
run: cargo build --no-default-features --features $env:WIN_FEATURES
run: cargo build
- name: Cargo clippy
run: cargo clippy --no-default-features --features $env:WIN_FEATURES --tests -- --deny warnings
run: cargo clippy --tests -- --deny warnings
- name: Cargo test
run: cargo test --no-default-features --features $env:WIN_FEATURES
run: cargo test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ A simple implementation of Cloudflare keyless server.

## Target Platform

Only Linux is fully supported yet. The code will compile on FreeBSD, NetBSD and macOS, but we haven't tested it there.
Only Linux is fully supported yet. The code will compile on FreeBSD, NetBSD, macOS and Windows, but we haven't tested it there.

Feel free to open PRs to add support for other platforms.

Expand Down
2 changes: 1 addition & 1 deletion README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Cloudflare Keyless Server的简单实现。

## 支持平台

目前仅提供对Linux系统的完整支持,其他系统如FreeBSD、NetBSD、macOS可以编译,但是未测试过功能。
目前仅提供对Linux系统的完整支持,其他系统如FreeBSD、NetBSD、macOS、Windows可以编译,但是未测试过功能。

如果需要支持其他系统,欢迎提交PR。

Expand Down
6 changes: 6 additions & 0 deletions doc/dev-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ brew install lua
brew install python
```
### Windows
```shell
vcpkg install capnproto openssl c-ares lua python3
```
### FreeBSD
```shell
Expand Down

0 comments on commit 2ca90e0

Please sign in to comment.