forked from master-of-zen/Av1an
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 2.23 KB
/
windows-build.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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/[email protected]
with:
repo_token: ${{ github.token }}
automatic_release_tag: latest
prerelease: true
draft: false
files: target/release/av1an.exe