Skip to content

update workflows

update workflows #1

Workflow file for this run

name: Build
on: [push]
jobs:
build-and-test: windows-latest
runs-on: windows-latest

Check failure on line 6 in .github/workflows/windows.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/windows.yml

Invalid workflow file

You have an error in your yaml syntax on line 6
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
tree ./vcpkg/installed
./vcpkg/vcpkg install osg:x64-windows
tree ./vcpkg/installed
}
else {
Write-Host "vcpkg directory exists. Skipping installation."
}
- name: Build
run: cargo build --verbose --release
- name: Test
run: cargo test --verbose