Fix Windows CI (#18)

- Update actions
- Download FFmpeg from github
- Remove explicit newline from cmds
  (added automatically)
This commit is contained in:
FreezyLemon 2024-04-03 20:51:44 +02:00 committed by GitHub
parent 9eab7820bb
commit f601a4bb69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,45 +74,49 @@ jobs:
- name: Test - name: Test
run: cargo test $CARGO_FEATURES run: cargo test $CARGO_FEATURES
# IDK what's up with the windows CI, it's broken somehow build-test-lint-windows:
# build-test-lint-windows: name: Windows - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
# name: Windows - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint runs-on: windows-latest
# runs-on: windows-latest strategy:
# strategy: matrix:
# matrix: # GyanD builds don't go as far back as the Ubuntu builds
# include: ffmpeg_version: ["4.4", "5.0", "5.1", "6.0", "6.1"]
# - ffmpeg_version: latest fail-fast: false
# ffmpeg_download_url: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
# fail-fast: false env:
# env: FFMPEG_DOWNLOAD_URL: "https://github.com/GyanD/codexffmpeg/releases/download/VER/ffmpeg-VER-full_build-shared.7z"
# FFMPEG_DOWNLOAD_URL: ${{ matrix.ffmpeg_download_url }} FFMPEG_INSTALL_PATH: "C:/ffmpeg"
# steps:
# - uses: actions/checkout@v2 steps:
# - name: Install dependencies - uses: actions/checkout@v4
# run: | - name: Set libclang path
# $VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath) run: |
# Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n" $VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
# Invoke-WebRequest "${env:FFMPEG_DOWNLOAD_URL}" -OutFile ffmpeg-release-full-shared.7z Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin"
# 7z x ffmpeg-release-full-shared.7z
# mkdir ffmpeg - name: Install FFmpeg ${{ matrix.ffmpeg_version }}
# mv ffmpeg-*/* ffmpeg/ run: |
# Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n" $tempFile = New-TemporaryFile
# Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n" $uri = ($env:FFMPEG_DOWNLOAD_URL).Replace('VER', "${{ matrix.ffmpeg_version }}")
# - name: Set up Rust Invoke-WebRequest "$uri" -OutFile "$tempFile" -TimeoutSec 10
# uses: actions-rs/toolchain@v1 7z x -y -o"$env:FFMPEG_INSTALL_PATH" "$tempFile"
# with: $ffmpegDir = (Get-ChildItem -Directory "$env:FFMPEG_INSTALL_PATH").FullName
# toolchain: stable Add-Content $env:GITHUB_ENV "FFMPEG_DIR=$ffmpegDir"
# override: true Add-Content $env:GITHUB_PATH "$ffmpegDir/bin"
# components: rustfmt, clippy
# - name: Build - name: Install Rust stable with clippy and rustfmt
# run: | uses: dtolnay/rust-toolchain@stable
# cargo build --examples with:
# - name: Test components: rustfmt, clippy
# run: | - uses: Swatinem/rust-cache@v2
# cargo test --examples with:
# - name: Lint save-if: ${{ matrix.ffmpeg_version == '6.1' }}
# run: |
# cargo clippy --examples -- -D warnings - name: Check format
# - name: Check format run: cargo fmt -- --check
# run: | - name: Lint
# cargo fmt -- --check run: cargo clippy --all-targets $CARGO_FEATURES
- name: Build
run: cargo build --all-targets $CARGO_FEATURES
- name: Test
run: cargo test $CARGO_FEATURES