-
Notifications
You must be signed in to change notification settings - Fork 604
34 lines (29 loc) · 982 Bytes
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Windows
on: [push]
jobs:
build-and-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2 # 使用actions/cache
with:
path: ./vcpkg # 设置缓存目录路径
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/build.rs') }} # 设置缓存的key
restore-keys: | # 设置恢复缓存的key列表
${{ runner.os }}-vcpkg-
- name: Install dependencies on Windows
if: runner.os == 'Windows'
run: |
if (-Not (Test-Path "./vcpkg")) {
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg install gdal:x64-windows
./vcpkg/vcpkg install osg:x64-windows
tree ./vcpkg/installed /F /A
}
else {
Write-Host "vcpkg directory exists. Skipping installation."
}
- name: Build
run: cargo build --verbose --release