Test correct path #70
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
push: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
strategy: | |
matrix: | |
config: [ {os: windows-latest, copyCommand: copy, artifactName: ffmpegTestWindows, buildPath: Release/, dummyLib: dummyLib.dll, ffmpegTest: ffmpegTest.exe} ] | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure CMake | |
run: cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }} -DENABLE_TEST=ON | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build -j 4 --config Release | |
- name: Unit tests | |
run: | | |
${{ matrix.config.copyCommand }} ${{ github.workspace }}/build/test/dummyLib/${{ matrix.config.buildPath }}${{ matrix.config.dummyLib }} ${{ github.workspace }}/build/test/unit/${{ matrix.config.buildPath }} | |
cd ${{ github.workspace }}/build/test/unit/${{ matrix.config.buildPath }} | |
./unitTest | |
- uses: actions/upload-artifact@master | |
with: | |
name: ${{ matrix.config.artifactName }} | |
path: ${{ github.workspace }}/build/test/ffmpegTest/${{ matrix.config.buildPath }}${{ matrix.config.ffmpegTest }} | |
testFFmpegNativeInstall: | |
needs: build | |
strategy: | |
matrix: | |
config: [ {os: windows-latest, artifactName: ffmpegTestWindows} ] | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/download-artifact@master | |
with: | |
name: ${{ matrix.config.artifactName }} | |
- uses: ConorMacBride/install-package@main | |
with: | |
brew: ffmpeg | |
apt: ffmpeg | |
choco: ffmpeg-shared | |
- name: Make ffmpegTest executable | |
run: chmod a+x ffmpegTest | |
if: matrix.config.os != 'windows-latest' | |
- name: Add ffmpeg to path | |
run: echo "C:\ProgramData\chocolatey\lib\ffmpeg-shared\tools\ffmpeg-7.0-full_build-shared\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
if: matrix.config.os == 'windows-latest' | |
- name: Debug ffmpegTest | |
run: | | |
dir C:\ProgramData\chocolatey\lib\ffmpeg-shared\tools\ffmpeg-7.0-full_build-shared | |
dir C:\ProgramData\chocolatey\lib\ffmpeg-shared\tools\ffmpeg-7.0-full_build-shared\bin | |
- name: Download Test files | |
run: curl -L "${{ secrets.AZURE_BLOB_ROOT_PATH }}bitstream-testfiles/TestFile_h264_aac_1s_320x240.mp4${{ secrets.AZURE_BLOB_TOKEN }}" -o TestFile_h264_aac_1s_320x240.mp4 | |
- name: runffmpegTest | |
run: ./ffmpegTest |