Skip to content

Commit

Permalink
Add vapoursynth to build jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro committed May 21, 2024
1 parent be0056a commit a1661cc
Showing 1 changed file with 75 additions and 72 deletions.
147 changes: 75 additions & 72 deletions .github/workflows/av-scenechange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,88 +9,91 @@ on:
- master

jobs:

clippy-rustfmt:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Install nasm
env:
LINK: http://debian-archive.trafficmanager.net/debian/pool/main/n/nasm
NASM_VERSION: 2.15.05-1
NASM_SHA256: >-
c860caec653b865d5b83359452d97b11f1b3ba5b18b07cac554cf72550b3bfc9
run: |
curl -O "$LINK/nasm_${NASM_VERSION}_amd64.deb"
echo "$NASM_SHA256 nasm_${NASM_VERSION}_amd64.deb" | sha256sum --check
sudo dpkg -i "nasm_${NASM_VERSION}_amd64.deb"
- name: Run rustfmt
run: |
cargo fmt -- --check --verbose
- name: Run clippy
uses: clechasseur/rs-clippy-check@v3
with:
args: -- -D warnings --verbose -A clippy::wrong-self-convention -A clippy::many_single_char_names -A clippy::upper-case-acronyms
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Install nasm
env:
LINK: http://debian-archive.trafficmanager.net/debian/pool/main/n/nasm
NASM_VERSION: 2.15.05-1
NASM_SHA256: >-
c860caec653b865d5b83359452d97b11f1b3ba5b18b07cac554cf72550b3bfc9
run: |
curl -O "$LINK/nasm_${NASM_VERSION}_amd64.deb"
echo "$NASM_SHA256 nasm_${NASM_VERSION}_amd64.deb" | sha256sum --check
sudo dpkg -i "nasm_${NASM_VERSION}_amd64.deb"
- name: Run rustfmt
run: |
cargo fmt -- --check --verbose
- name: Run clippy
uses: clechasseur/rs-clippy-check@v3
with:
args: -- -D warnings --verbose -A clippy::wrong-self-convention -A clippy::many_single_char_names -A clippy::upper-case-acronyms

build:

strategy:
matrix:
platform: [ubuntu-latest, windows-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable

- name: Install nasm for Ubuntu
if: matrix.platform == 'ubuntu-latest'
env:
LINK: http://debian-archive.trafficmanager.net/debian/pool/main/n/nasm
NASM_VERSION: 2.15.05-1
NASM_SHA256: >-
c860caec653b865d5b83359452d97b11f1b3ba5b18b07cac554cf72550b3bfc9
run: |
curl -O "$LINK/nasm_${NASM_VERSION}_amd64.deb"
echo "$NASM_SHA256 nasm_${NASM_VERSION}_amd64.deb" | sha256sum --check
sudo dpkg -i "nasm_${NASM_VERSION}_amd64.deb"
- name: Install nasm for Windows
if: matrix.platform == 'windows-latest'
run: |
$NASM_VERSION="2.15.05"
$LINK="https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
curl -LO "$LINK/nasm-$NASM_VERSION-win64.zip"
7z e -y "nasm-$NASM_VERSION-win64.zip" -o"C:\nasm"
echo "C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set MSVC x86_64 linker path
if: matrix.platform == 'windows-latest'
run: |
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64"
$env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
$LinkPath = vswhere -latest -products * -find "$LinkGlob" |
Select-Object -Last 1
echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build
run: cargo build --all-features --tests --benches

- name: Run tests
run: cargo test --all-features

- name: Generate docs
run: cargo doc --all-features --no-deps
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable

- name: Install nasm for Ubuntu
if: matrix.platform == 'ubuntu-latest'
env:
LINK: http://debian-archive.trafficmanager.net/debian/pool/main/n/nasm
NASM_VERSION: 2.15.05-1
NASM_SHA256: >-
c860caec653b865d5b83359452d97b11f1b3ba5b18b07cac554cf72550b3bfc9
run: |
curl -O "$LINK/nasm_${NASM_VERSION}_amd64.deb"
echo "$NASM_SHA256 nasm_${NASM_VERSION}_amd64.deb" | sha256sum --check
sudo dpkg -i "nasm_${NASM_VERSION}_amd64.deb"
- name: Install nasm for Windows
if: matrix.platform == 'windows-latest'
run: |
$NASM_VERSION="2.15.05"
$LINK="https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
curl -LO "$LINK/nasm-$NASM_VERSION-win64.zip"
7z e -y "nasm-$NASM_VERSION-win64.zip" -o"C:\nasm"
echo "C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set MSVC x86_64 linker path
if: matrix.platform == 'windows-latest'
run: |
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64"
$env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
$LinkPath = vswhere -latest -products * -find "$LinkGlob" |
Select-Object -Last 1
echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install VapourSynth
uses: rlaphoenix/[email protected]
with:
version: 66
cache: true

- name: Build
run: cargo build --all-features --tests --benches

- name: Run tests
run: cargo test --all-features

- name: Generate docs
run: cargo doc --all-features --no-deps

0 comments on commit a1661cc

Please sign in to comment.