Skip to content

update

update #9

Workflow file for this run

name: Build
on: [push]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, 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 Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get install -y libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev
git clone https://github.com/Microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg integrate install
./vcpkg/vcpkg install osg
./vcpkg/vcpkg install gdal
- name: Install dependencies on Windows
if: runner.os == 'Windows'
run: |
git clone https://github.com/Microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg integrate install
./vcpkg/vcpkg install osg
./vcpkg/vcpkg install gdal
- name: Build
run: cargo build --verbose --release
- name: Test
run: cargo test --verbose