Av1an/.github/workflows/windows-build.yml
FreezyLemon a8b276c4dd
Fix CI Windows builds (#656)
* Fix FFmpeg version to 5.0.1 for now

* Get FFmpeg from GitHub (no cache sadly)

* Upgrade to ffmpeg 5.1 binaries
2022-08-23 16:27:41 +00:00

78 lines
2.2 KiB
YAML

name: Build Av1an (Windows x64)
on:
push:
branches:
- 'master'
jobs:
build:
runs-on: windows-2022
env:
vsynth_ver: R58
vsynth_path: C:/Program Files/Vapoursynth
steps:
- name: Python 3 setup
uses: actions/setup-python@v4
with:
python-version: '~3.10'
architecture: x64
- name: NASM setup
uses: ilammy/setup-nasm@v1
with:
version: 2.15.05
from-source: false
- if: steps.cache-ff.outputs.cache-hit != 'true'
name: FFmpeg installation
run: |
$tempFile = New-TemporaryFile
Invoke-WebRequest 'https://github.com/GyanD/codexffmpeg/releases/download/5.1/ffmpeg-5.1-full_build-shared.7z' -OutFile $tempFile -TimeoutSec 10
7z x -y -o'C:/ffmpeg' "$tempFile"
- name: FFmpeg environment variable
run: |
echo "FFMPEG_DIR=$((Get-ChildItem -Directory C:/ffmpeg).FullName)" | Out-File $env:GITHUB_ENV -Append
- name: VapourSynth cache
id: cache-vsynth
uses: actions/cache@v3
with:
path: ${{ env.vsynth_path }}
key: vsynth-${{ env.vsynth_ver }}
- if: steps.cache-vsynth.outputs.cache-hit != 'true'
name: VapourSynth installation
run: |
$tempFile = New-TemporaryFile
$uri = 'https://github.com/vapoursynth/vapoursynth/releases/download/VER/VapourSynth64-Portable-VER.7z'.Replace('VER', "${{ env.vsynth_ver }}")
Invoke-WebRequest $uri -OutFile "$tempFile" -TimeoutSec 10
7z x -y -o"$env:vsynth_path" "$tempFile"
- uses: actions/checkout@v3
- name: Package cache
uses: actions/cache@v3
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-
- name: Av1an build
env:
CARGO_TERM_COLOR: always
run: cargo build -rv
- name: Create prerelease
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: ${{ github.token }}
automatic_release_tag: latest
prerelease: true
draft: false
files: target/release/av1an.exe