Skip to content

更新内容を追記。 #500

更新内容を追記。

更新内容を追記。 #500

Workflow file for this run

name: Build Windows Releases
on:
push:
branches:
- master
- actions
tags:
- '*'
jobs:
get_version_name:
name: Get version name
runs-on: ubuntu-latest
outputs:
rev_count: ${{ steps.rev.outputs.rev_count }}
version_name: ${{ steps.rev.outputs.version_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify tag matches VER_STR_FILEVERSION
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ${{ github.workspace }}
TAG=$(echo "${{ github.ref }}" | sed -e 's#refs/tags/##g' | tr -d '\r\n')
VER=$(sed -n 's/^#define VER_STR_FILEVERSION[ \t]*"\([^"]*\)".*$/\1/p' NVEncCore/rgy_version.h | tr -d '\r\n')
if [ "$TAG" = "$VER" ] || [ "${TAG#v}" = "$VER" ]; then
echo "Version OK: tag=${TAG}, header=${VER}"
else
echo "ERROR: Tag version (${TAG}) does not match VER_STR_FILEVERSION (${VER})" >&2
exit 1
fi
- name: Set version name
id: rev
run: |
cd ${{ github.workspace }}
REVCOUNT=`git rev-list --count HEAD`
echo "rev_count=${REVCOUNT}" >> $GITHUB_OUTPUT
if [[ "${{ github.ref }}" =~ "refs/tags/" ]]; then
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
else
VERSION=r${REVCOUNT}
fi
echo "version_name=${VERSION}" >> $GITHUB_OUTPUT
build:
name: Upload Release Asset
runs-on: windows-2022
needs: get_version_name
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
include:
- arch: x86
platform: Win32
outext: auo
cuda_ver_major: 11
cuda_ver_minor: 8
cuda_download_url: https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe
- arch: x64
platform: x64
outext: auo2
cuda_ver_major: 11
cuda_ver_minor: 8
cuda_download_url: https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Checkout dependencies
run: |
curl -s -o ffmpeg_lgpl.7z -L https://github.com/rigaya/ffmpeg_dlls_for_hwenc/releases/download/20250830/ffmpeg_dlls_for_hwenc_20250830.7z
7z x -offmpeg_lgpl -y ffmpeg_lgpl.7z
if "${{ matrix.arch }}" == "x64" curl -s -o NVEncNVOFFRUC_x64.7z -L https://github.com/rigaya/NVEnc/releases/download/7.42/NVEncNVOFFRUC_20240303_x64.7z
if "${{ matrix.arch }}" == "x64" 7z x -oNVEncNVOFFRUCBin -y NVEncNVOFFRUC_x64.7z
if "${{ matrix.arch }}" == "x64" curl -s -o NVEncNVSDKNGX_x64.7z -L https://github.com/rigaya/NVEnc/releases/download/9.01/NVEncNVSDKNGX_20250914_x64.7z
if "${{ matrix.arch }}" == "x64" 7z x -oNVEncNVSDKNGXBin -y NVEncNVSDKNGX_x64.7z
git clone --depth 1 https://github.com/AviSynth/AviSynthPlus.git ..\AviSynthPlus
git clone -b R72 --depth 1 https://github.com/vapoursynth/vapoursynth.git ..\vapoursynth
git clone --depth 1 https://github.com/KhronosGroup/OpenCL-Headers.git ..\openclheaders
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: ${{ matrix.arch }}
- name: Setup CUDA
run: |
curl -s -o cuda_installer.exe -L ${{ matrix.cuda_download_url }}
cuda_installer.exe -s nvcc_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} cudart_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} curand_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} curand_dev_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} npp_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} npp_dev_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} nvml_dev_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} nvrtc_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} nvrtc_dev_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }} visual_studio_integration_${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }}
- name: MSBuild
run: |
chcp 932
set AVISYNTH_SDK=${{ github.workspace }}\..\AviSynthPlus\avs_core
set VAPOURSYNTH_SDK=${{ github.workspace }}\..\vapoursynth
set OPENCL_HEADERS=${{ github.workspace }}\..\openclheaders
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }}
set CUDA_PATH_V11_8=%CUDA_PATH%
msbuild NVEnc.sln /t:build /p:configuration=RelStatic /p:Platform=${{ matrix.platform }} -maxcpucount
- name: MSBuild plugin (Release)
run: |
chcp 932
set AVISYNTH_SDK=${{ github.workspace }}\..\AviSynthPlus\avs_core
set VAPOURSYNTH_SDK=${{ github.workspace }}\..\vapoursynth
set OPENCL_HEADERS=${{ github.workspace }}\..\openclheaders
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }}
set CUDA_PATH_V11_8=%CUDA_PATH%
msbuild NVEnc.sln /t:build /p:configuration=Release /p:Platform=${{ matrix.platform }} -maxcpucount
- name: Create Archieve
id: archieve
run: |
mkdir NVEncC_Release
copy _build\${{ matrix.platform }}\RelStatic\NVEncC*.exe NVEncC_Release
copy _build\${{ matrix.platform }}\RelStatic\*.dll NVEncC_Release
if "${{ matrix.arch }}" == "x64" copy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }}\bin\nvrtc64_*_0.dll" NVEncC_Release
if "${{ matrix.arch }}" == "x64" copy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${{ matrix.cuda_ver_major }}.${{ matrix.cuda_ver_minor }}\bin\nvrtc-builtins64_*.dll" NVEncC_Release
if "${{ matrix.arch }}" == "x64" copy NVEncNVOFFRUCBin\*.dll NVEncC_Release
if "${{ matrix.arch }}" == "x64" copy NVEncNVSDKNGXBin\*.dll NVEncC_Release
7z a -mx9 NVEncC_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}.7z .\NVEncC_Release\*
- name: Check dll
run: |
if ("${{ matrix.platform }}" == "x64") "NVEncC_Release\NVEncC64.exe" --check-avcodec-dll
if ("${{ matrix.platform }}" == "Win32") "NVEncC_Release\NVEncC.exe" --check-avcodec-dll
- name: Check Version
if: startsWith(github.ref, 'refs/tags/')
id: check_ver
run: |
powershell "$ver = (Get-ItemProperty .\NVEncC_Release\NVEncC*.exe).VersionInfo.FileVersion; if ($ver -eq '${{ needs.get_version_name.outputs.version_name }}') { exit 0; } exit 1;"
- name: Calc hash
id: calc_hash
run: |
7z h -scrc* NVEncC_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}.7z
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: NVEncC_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}.7z
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: NVEncC_release_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}
path: NVEncC_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}.7z
- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: NVEnc_plugin_release_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}
path: _build\${{ matrix.platform }}\Release\NVEnc.${{ matrix.outext }}
upload_aviutl_release:
name: Upload Aviutl Release Asset
runs-on: windows-2022
needs: [ get_version_name, build ]
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
include:
- arch: x86
platform: Win32
aviutlver: AviUtl
outext: auo
cuda_ver_major: 11
cuda_ver_minor: 8
cuda_download_url: https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe
- arch: x64
platform: x64
aviutlver: AviUtl2
outext: auo2
cuda_ver_major: 11
cuda_ver_minor: 8
cuda_download_url: https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Download auo_setup Win32
id: download_auosetup_win32
if: matrix.platform == 'Win32'
run: |
curl -o auo_setup.zip -L https://github.com/rigaya/auo_setup/releases/download/2.02/auo_setup_2.02.zip
- name: Download auo_setup x64
id: download_auosetup_x64
if: matrix.platform == 'x64'
run: |
curl -o auo_setup.zip -L https://github.com/rigaya/auo_setup/releases/download/2.04/auo_setup_2.04_x64.zip
- name: Download plugin Win32
uses: actions/download-artifact@v4
if: matrix.platform == 'Win32'
with:
name: NVEnc_plugin_release_${{ needs.get_version_name.outputs.version_name }}_Win32
path: plugin_win32
- name: Download plugin x64
uses: actions/download-artifact@v4
if: matrix.platform == 'x64'
with:
name: NVEnc_plugin_release_${{ needs.get_version_name.outputs.version_name }}_x64
path: plugin_x64
- name: Download NVEncC Win32
uses: actions/download-artifact@v4
if: matrix.platform == 'Win32'
with:
name: NVEncC_release_${{ needs.get_version_name.outputs.version_name }}_Win32
path: NVEncC_${{ needs.get_version_name.outputs.version_name }}_Win32.7z
- name: Download NVEncC x64
uses: actions/download-artifact@v4
with:
name: NVEncC_release_${{ needs.get_version_name.outputs.version_name }}_x64
path: NVEncC_${{ needs.get_version_name.outputs.version_name }}_x64.7z
- name: Create package Win32
id: archieve_win32
if: matrix.platform == 'Win32'
run: |
mkdir Aviutl_NVEnc_release
7z x -oAviutl_NVEnc_release\ auo_setup.zip
mkdir Aviutl_NVEnc_release\exe_files\NVEncC
mkdir Aviutl_NVEnc_release\exe_files\NVEncC\x86
mkdir Aviutl_NVEnc_release\exe_files\NVEncC\x64
7z x -oAviutl_NVEnc_release\exe_files\NVEncC\x86\ NVEncC_${{ needs.get_version_name.outputs.version_name }}_Win32.7z
7z x -oAviutl_NVEnc_release\exe_files\NVEncC\x64\ NVEncC_${{ needs.get_version_name.outputs.version_name }}_x64.7z
copy /y plugin_win32\NVEnc.auo Aviutl_NVEnc_release\plugins\
copy /y NVEnc\NVEnc.ini Aviutl_NVEnc_release\plugins\
copy /y NVEnc\NVEnc.en.ini Aviutl_NVEnc_release\plugins\
copy /y NVEnc\NVEnc.zh.ini Aviutl_NVEnc_release\plugins\
copy /y NVEnc\NVEnc_uninstall.bat Aviutl_NVEnc_release\plugins\
copy /y NVEnc\auo_setup.ini Aviutl_NVEnc_release\exe_files\
copy /y NVEnc\NVEnc_readme.txt Aviutl_NVEnc_release\
copy /y "NVEnc\NVENCが利用可能か確認 [ダブルクリック].bat" Aviutl_NVEnc_release\
echo D | xcopy /y /e NVEnc\stg Aviutl_NVEnc_release\plugins\NVEnc_stg
dir /b /s Aviutl_NVEnc_release\
7z a -mx9 Aviutl_NVEnc_${{ needs.get_version_name.outputs.version_name }}.zip .\Aviutl_NVEnc_release\*
- name: Create package x64
id: archieve_x64
if: matrix.platform == 'x64'
run: |
mkdir Aviutl_NVEnc_release
7z x -oAviutl_NVEnc_release\ auo_setup.zip
mkdir Aviutl_NVEnc_release\Plugin\exe_files\NVEncC
mkdir Aviutl_NVEnc_release\Plugin\exe_files\NVEncC\x64
7z x -oAviutl_NVEnc_release\Plugin\exe_files\NVEncC\x64\ NVEncC_${{ needs.get_version_name.outputs.version_name }}_x64.7z
copy /y plugin_x64\NVEnc.auo2 Aviutl_NVEnc_release\Plugin\
copy /y NVEnc\NVEnc.ini Aviutl_NVEnc_release\Plugin\
copy /y NVEnc\NVEnc.en.ini Aviutl_NVEnc_release\Plugin\
copy /y NVEnc\NVEnc.zh.ini Aviutl_NVEnc_release\Plugin\
copy /y NVEnc\NVEnc_uninstall.bat Aviutl_NVEnc_release\Plugin\
copy /y NVEnc\auo_setup.ini Aviutl_NVEnc_release\Plugin\exe_files\
copy /y NVEnc\NVEnc_readme.txt Aviutl_NVEnc_release\
echo D | xcopy /y /e NVEnc\stg Aviutl_NVEnc_release\Plugin\NVEnc_stg
7z a -t7z -m0=lzma -mx=9 -mmt Aviutl2_NVEnc_${{ needs.get_version_name.outputs.version_name }}.7z .\Aviutl_NVEnc_release\*
copy /b NVEnc\7zSD.noadmin.sfx + NVEnc\7zInstallerConfig.txt + Aviutl2_NVEnc_${{ needs.get_version_name.outputs.version_name }}.7z Aviutl2_NVEnc_${{ needs.get_version_name.outputs.version_name }}_install.exe
- name: Check Version Win32
id: check_ver_win32
if: startsWith(github.ref, 'refs/tags/') && matrix.platform == 'Win32'
run: |
powershell "$ver = (Get-ItemProperty .\plugin_win32\NVEnc.auo).VersionInfo.FileVersion; if ($ver -eq '${{ needs.get_version_name.outputs.version_name }}') { exit 0; } exit 1;"
- name: Check Version x64
id: check_ver_x64
if: startsWith(github.ref, 'refs/tags/') && matrix.platform == 'x64'
run: |
powershell "$ver = (Get-ItemProperty .\plugin_x64\NVEnc.auo2).VersionInfo.FileVersion; if ($ver -eq '${{ needs.get_version_name.outputs.version_name }}') { exit 0; } exit 1;"
- name: Check dll Win32
id: check_dll_win32
if: matrix.platform == 'Win32'
run: |
"Aviutl_NVEnc_release\exe_files\NVEncC\x86\NVEncC.exe" --check-avcodec-dll
"Aviutl_NVEnc_release\exe_files\NVEncC\x64\NVEncC64.exe" --check-avcodec-dll
- name: Check dll x64
id: check_dll_x64
if: matrix.platform == 'x64'
run: |
"Aviutl_NVEnc_release\Plugin\exe_files\NVEncC\x64\NVEncC64.exe" --check-avcodec-dll
- name: Calc hash Win32
id: calc_hash_win32
if: matrix.platform == 'Win32'
run: |
7z h -scrc* Aviutl_NVEnc_${{ needs.get_version_name.outputs.version_name }}.zip
- name: Calc hash x64
id: calc_hash_x64
if: matrix.platform == 'x64'
run: |
7z h -scrc* Aviutl2_NVEnc_${{ needs.get_version_name.outputs.version_name }}_install.exe
- name: Upload Release Asset Win32
id: upload-release-asset-win32
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && matrix.platform == 'Win32'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
Aviutl_NVEnc_${{ needs.get_version_name.outputs.version_name }}.zip
- name: Upload Release Asset x64
id: upload-release-asset-x64
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && matrix.platform == 'x64'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
Aviutl2_NVEnc_${{ needs.get_version_name.outputs.version_name }}_install.exe
- name: Upload artifact Win32
uses: actions/upload-artifact@v4
if: matrix.platform == 'Win32'
with:
name: Aviutl_NVEnc_${{ needs.get_version_name.outputs.version_name }}
path: Aviutl_NVEnc_${{ needs.get_version_name.outputs.version_name }}.zip
- name: Upload artifact x64
uses: actions/upload-artifact@v4
if: matrix.platform == 'x64'
with:
name: Aviutl2_NVEnc_${{ needs.get_version_name.outputs.version_name }}_install
path: Aviutl2_NVEnc_${{ needs.get_version_name.outputs.version_name }}_install.exe