From 0fe19c4042317c6ba6b127a20297f4605cdaf80c Mon Sep 17 00:00:00 2001 From: seiya-git Date: Sat, 4 May 2024 16:21:29 +0300 Subject: [PATCH 1/2] add win ci --- .github/workflows/ci.yml | 57 +++++++++++++++++++++++++++++++++++++++- .gitignore | 1 + 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d80e98099f..9b102a3480 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: cc: gcc steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true - name: install deps (ubuntu) @@ -42,3 +42,58 @@ jobs: run: | make test-sync make test -j2 -k + build-win: + runs-on: windows-latest + steps: + - name: Git checkout + uses: actions/checkout@v4 + with: + submodules: true + - name: Parse AviSynth+ release metadata + uses: actions/github-script@v7 + with: + script: | + const req = await github.request('https://api.github.com/repos/avisynth/avisynthplus/releases'); + const data = req.data; + let avstag = ''; + for(let rel of data){ + if(rel.prerelease||rel.draft){ + continue; + } + avstag = rel.tag_name; + if(avstag != ''){ + break; + } + } + core.exportVariable('AVS_TAG', avstag); + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + msbuild-architecture: x64 + - name: Make builds... + run: | + cd .. + git clone https://github.com/AviSynth/AviSynthPlus.git --branch "${{ env.AVS_TAG }}" --depth 1 + cd ffms2 + vcpkg install zlib:x86-windows-static + vcpkg install zlib:x64-windows-static + vcpkg install ffmpeg:x86-windows-static + vcpkg install ffmpeg:x64-windows-static + vcpkg integrate install + MSBuild.exe /t:Rebuild /p:PlatformToolset=v143 /m /p:Configuration=Release /p:Platform=x86 "./build-msvc/ffms2.sln" + MSBuild.exe /t:Rebuild /p:PlatformToolset=v143 /m /p:Configuration=Release /p:Platform=x64 "./build-msvc/ffms2.sln" + cmake -E copy "build-msvc\bin\Win32\Release\ffms2.dll" "dist\x86\ffms2.dll" + cmake -E copy "build-msvc\bin\Win32\Release\ffms2.lib" "dist\x86\ffms2.lib" + cmake -E copy "build-msvc\bin\Win32\Release\ffmsindex.exe" "dist\x86\ffmsindex.exe" + cmake -E copy "build-msvc\bin\x64\Release\ffms2.dll" "dist\x64\ffms2.dll" + cmake -E copy "build-msvc\bin\x64\Release\ffms2.lib" "dist\x64\ffms2.lib" + cmake -E copy "build-msvc\bin\x64\Release\ffmsindex.exe" "dist\x64\ffmsindex.exe" + cmake -E copy_directory "include" "dist\include" + cmake -E copy_directory "doc" "dist\doc" + cmake -E copy "etc\FFMS2.avsi" "dist\FFMS2.avsi" + cmake -E copy "COPYING" "dist\COPYING" + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ffms2_build_win + path: dist diff --git a/.gitignore b/.gitignore index e844bcb254..f344dc0309 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /deps /testing /todo.txt +/dist # /build-msvc/ /build-msvc/*.sdf From ec0babc45bdce08efe174bfba9349eeebcfb14ab Mon Sep 17 00:00:00 2001 From: seiya-git Date: Sat, 4 May 2024 22:01:47 +0300 Subject: [PATCH 2/2] improve windows ci --- .github/workflows/ci.yml | 6 ++---- build-msvc/ffms2.vcxproj | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b102a3480..900e417774 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,10 +75,8 @@ jobs: cd .. git clone https://github.com/AviSynth/AviSynthPlus.git --branch "${{ env.AVS_TAG }}" --depth 1 cd ffms2 - vcpkg install zlib:x86-windows-static - vcpkg install zlib:x64-windows-static - vcpkg install ffmpeg:x86-windows-static - vcpkg install ffmpeg:x64-windows-static + vcpkg install ffmpeg[avcodec,avdevice,avfilter,avformat,swresample,swscale,zlib,bzip2,core,dav1d,gpl,version3,lzma,openssl,xml2]:x86-windows-static + vcpkg install ffmpeg[avcodec,avdevice,avfilter,avformat,swresample,swscale,zlib,bzip2,core,dav1d,gpl,version3,lzma,openssl,xml2]:x64-windows-static vcpkg integrate install MSBuild.exe /t:Rebuild /p:PlatformToolset=v143 /m /p:Configuration=Release /p:Platform=x86 "./build-msvc/ffms2.sln" MSBuild.exe /t:Rebuild /p:PlatformToolset=v143 /m /p:Configuration=Release /p:Platform=x64 "./build-msvc/ffms2.sln" diff --git a/build-msvc/ffms2.vcxproj b/build-msvc/ffms2.vcxproj index 6b85225593..293710ae9c 100644 --- a/build-msvc/ffms2.vcxproj +++ b/build-msvc/ffms2.vcxproj @@ -105,7 +105,7 @@ Windows - psapi.lib;uuid.lib;oleaut32.lib;shlwapi.lib;gdi32.lib;vfw32.lib;secur32.lib;ws2_32.lib;mfplat.lib;mfuuid.lib;strmiids.lib;ole32.lib;user32.lib;bcrypt.lib;%(AdditionalDependencies) + psapi.lib;uuid.lib;oleaut32.lib;shlwapi.lib;gdi32.lib;vfw32.lib;secur32.lib;ws2_32.lib;mfplat.lib;mfuuid.lib;strmiids.lib;ole32.lib;user32.lib;bcrypt.lib;crypt32.lib;%(AdditionalDependencies) @@ -117,7 +117,7 @@ Windows - psapi.lib;uuid.lib;oleaut32.lib;shlwapi.lib;gdi32.lib;vfw32.lib;secur32.lib;ws2_32.lib;mfplat.lib;mfuuid.lib;strmiids.lib;ole32.lib;user32.lib;bcrypt.lib;%(AdditionalDependencies) + psapi.lib;uuid.lib;oleaut32.lib;shlwapi.lib;gdi32.lib;vfw32.lib;secur32.lib;ws2_32.lib;mfplat.lib;mfuuid.lib;strmiids.lib;ole32.lib;user32.lib;bcrypt.lib;crypt32.lib;%(AdditionalDependencies) @@ -133,7 +133,7 @@ Windows true true - psapi.lib;uuid.lib;oleaut32.lib;shlwapi.lib;gdi32.lib;vfw32.lib;secur32.lib;ws2_32.lib;mfplat.lib;mfuuid.lib;strmiids.lib;ole32.lib;user32.lib;bcrypt.lib;%(AdditionalDependencies) + psapi.lib;uuid.lib;oleaut32.lib;shlwapi.lib;gdi32.lib;vfw32.lib;secur32.lib;ws2_32.lib;mfplat.lib;mfuuid.lib;strmiids.lib;ole32.lib;user32.lib;bcrypt.lib;crypt32.lib;%(AdditionalDependencies) @@ -149,7 +149,7 @@ Windows true true - psapi.lib;uuid.lib;oleaut32.lib;shlwapi.lib;gdi32.lib;vfw32.lib;secur32.lib;ws2_32.lib;mfplat.lib;mfuuid.lib;strmiids.lib;ole32.lib;user32.lib;bcrypt.lib;%(AdditionalDependencies) + psapi.lib;uuid.lib;oleaut32.lib;shlwapi.lib;gdi32.lib;vfw32.lib;secur32.lib;ws2_32.lib;mfplat.lib;mfuuid.lib;strmiids.lib;ole32.lib;user32.lib;bcrypt.lib;crypt32.lib;%(AdditionalDependencies)