build.yml: use libclang from Visual Studio to speed up builds

Also fix non-idiomatic parameter expansion in pwsh.
This commit is contained in:
Zhiming Wang 2020-08-12 14:10:09 +08:00
parent f084386540
commit 8b5e48cc8f
No known key found for this signature in database
GPG Key ID: 5B58F95EC95965D8

View File

@ -78,10 +78,11 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install dependencies - name: Install dependencies
run: | run: |
choco install -y llvm $VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
Invoke-WebRequest "https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-$($env:FFMPEG_VERSION)-win64-dev.zip" -OutFile "ffmpeg-$($env:FFMPEG_VERSION)-win64-dev.zip" Write-Output "::set-env name=LIBCLANG_PATH::${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin"
Expand-Archive -Path "ffmpeg-$($env:FFMPEG_VERSION)-win64-dev.zip" -DestinationPath . Invoke-WebRequest "https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-${env:FFMPEG_VERSION}-win64-dev.zip" -OutFile "ffmpeg-${env:FFMPEG_VERSION}-win64-dev.zip"
Write-Output "::set-env name=FFMPEG_DIR::$(pwd)\ffmpeg-$($env:FFMPEG_VERSION)-win64-dev" Expand-Archive -Path "ffmpeg-${env:FFMPEG_VERSION}-win64-dev.zip" -DestinationPath .
Write-Output "::set-env name=FFMPEG_DIR::${pwd}\ffmpeg-${env:FFMPEG_VERSION}-win64-dev"
- name: Set up Rust - name: Set up Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with: