| 1 | name: Make Build |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [ master ] |
| 6 | pull_request: |
| 7 | branches: [ master ] |
| 8 | |
| 9 | permissions: |
| 10 | contents: read |
| 11 | |
| 12 | jobs: |
| 13 | build: |
| 14 | runs-on: ${{ matrix.os }} |
| 15 | strategy: |
| 16 | matrix: |
| 17 | os: [ubuntu-latest, macos-latest] |
| 18 | cc: [gcc, clang] |
| 19 | exclude: |
| 20 | - os: macos-latest |
| 21 | cc: gcc |
| 22 | |
| 23 | steps: |
| 24 | - uses: actions/checkout@v4 |
| 25 | with: |
| 26 | submodules: true |
| 27 | - name: install deps (ubuntu) |
| 28 | if: matrix.os == 'ubuntu-latest' |
| 29 | run: | |
| 30 | sudo apt-get update |
| 31 | sudo apt-get install autoconf automake wget ffmpeg libavformat-dev libavcodec-dev libswscale-dev libavutil-dev libswresample-dev |
| 32 | - name: install deps (macOS) |
| 33 | if: matrix.os == 'macos-latest' |
| 34 | run: | |
| 35 | brew update |
| 36 | brew install autoconf automake wget ffmpeg |
| 37 | - name: configure |
| 38 | run: ./autogen.sh --enable-static --disable-shared |
| 39 | - name: make |
| 40 | run: make V=1 CXXFLAGS='-Werror -Wno-error=deprecated-declarations' -j2 -k |
| 41 | - name: make test |
| 42 | run: | |
| 43 | make test-sync |
| 44 | make test -j2 -k |
| 45 | build-win: |
| 46 | runs-on: windows-latest |
| 47 | steps: |
| 48 | - name: Git checkout |
| 49 | uses: actions/checkout@v4 |
| 50 | with: |
| 51 | submodules: true |
| 52 | - name: Parse AviSynth+ release metadata |
| 53 | uses: actions/github-script@v7 |
| 54 | with: |
| 55 | script: | |
| 56 | const req = await github.request('https://api.github.com/repos/avisynth/avisynthplus/releases'); |
| 57 | const data = req.data; |
| 58 | let avstag = ''; |
| 59 | for(let rel of data){ |
| 60 | if(rel.prerelease||rel.draft){ |
| 61 | continue; |
| 62 | } |
| 63 | avstag = rel.tag_name; |
| 64 | if(avstag != ''){ |
| 65 | break; |
| 66 | } |
| 67 | } |
| 68 | core.exportVariable('AVS_TAG', avstag); |
| 69 | - name: Add MSBuild to PATH |
| 70 | uses: microsoft/setup-msbuild@v2 |
| 71 | with: |
| 72 | msbuild-architecture: x64 |
| 73 | - name: Make builds... |
| 74 | run: | |
| 75 | cd .. |
| 76 | git clone https://github.com/AviSynth/AviSynthPlus.git --branch "${{ env.AVS_TAG }}" --depth 1 |
| 77 | cd ffms2 |
| 78 | vcpkg install ffmpeg[avcodec,avdevice,avfilter,avformat,swresample,swscale,zlib,bzip2,core,dav1d,gpl,version3,lzma,openssl,xml2]:x86-windows-static |
| 79 | vcpkg install ffmpeg[avcodec,avdevice,avfilter,avformat,swresample,swscale,zlib,bzip2,core,dav1d,gpl,version3,lzma,openssl,xml2]:x64-windows-static |
| 80 | vcpkg integrate install |
| 81 | MSBuild.exe /t:Rebuild /p:PlatformToolset=v143 /m /p:Configuration=Release /p:Platform=x86 "./build-msvc/ffms2.sln" |
| 82 | MSBuild.exe /t:Rebuild /p:PlatformToolset=v143 /m /p:Configuration=Release /p:Platform=x64 "./build-msvc/ffms2.sln" |
| 83 | cmake -E copy "build-msvc\bin\Win32\Release\ffms2.dll" "dist\x86\ffms2.dll" |
| 84 | cmake -E copy "build-msvc\bin\Win32\Release\ffms2.lib" "dist\x86\ffms2.lib" |
| 85 | cmake -E copy "build-msvc\bin\Win32\Release\ffmsindex.exe" "dist\x86\ffmsindex.exe" |
| 86 | cmake -E copy "build-msvc\bin\x64\Release\ffms2.dll" "dist\x64\ffms2.dll" |
| 87 | cmake -E copy "build-msvc\bin\x64\Release\ffms2.lib" "dist\x64\ffms2.lib" |
| 88 | cmake -E copy "build-msvc\bin\x64\Release\ffmsindex.exe" "dist\x64\ffmsindex.exe" |
| 89 | cmake -E copy_directory "include" "dist\include" |
| 90 | cmake -E copy_directory "doc" "dist\doc" |
| 91 | cmake -E copy "etc\FFMS2.avsi" "dist\FFMS2.avsi" |
| 92 | cmake -E copy "COPYING" "dist\COPYING" |
| 93 | - name: Upload artifact |
| 94 | uses: actions/upload-artifact@v4 |
| 95 | with: |
| 96 | name: ffms2_build_win |
| 97 | path: dist |