name: Windows Build on: [push, pull_request] jobs: build_mingw: name: CLI / LibHB runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - name: Environment Setup run: | sudo apt-get install automake autoconf build-essential intltool libtool libtool-bin make nasm patch tar yasm zlib1g-dev ninja-build gzip pax sudo pip3 install meson - name: Setup Toolchain run: | wget https://github.com/bradleysepos/mingw-w64-build/releases/download/9.1.0/mingw-w64-toolchain-9.1.0-linux-x86_64.tar.gz SHA=$(sha1sum mingw-w64-toolchain-9.1.0-linux-x86_64.tar.gz) EXPECTED="4c0fadeaaa0c72ed7107bf49ebddf5c8a35abd92 mingw-w64-toolchain-9.1.0-linux-x86_64.tar.gz" if [ "$SHA" == "$EXPECTED" ]; then echo "Toolchain Verified. Extracting ..." mkdir toolchains mv mingw-w64-toolchain-9.1.0-linux-x86_64.tar.gz toolchains cd toolchains tar xvf mingw-w64-toolchain-9.1.0-linux-x86_64.tar.gz cd mingw-w64-toolchain-9.1.0-linux-x86_64/mingw-w64-x86_64/ pwd else echo "Toolchain Verification FAILED. Exiting!" return -1 fi - name: Build CLI and LibHB run: | export PATH="/home/runner/work/HandBrake/HandBrake/toolchains/mingw-w64-toolchain-9.1.0-linux-x86_64/mingw-w64-x86_64/bin:${PATH}" ./configure --cross=x86_64-w64-mingw32 --enable-qsv --enable-vce --enable-nvenc --launch-jobs=$(nproc) --launch cd build make pkg.create.zip - name: Upload HandBrakeCLI uses: actions/upload-artifact@v2 with: name: HandBrakeCLI path: ./build/HandBrakeCLI.exe - name: Upload LibHB uses: actions/upload-artifact@v2 with: name: LibHandBrake path: ./build/libhb/hb.dll build_gui: name: Windows UI runs-on: windows-latest needs: build_mingw env: SigningCertificate: ${{ secrets.HandBrakeTeam_SignFile }} steps: - uses: actions/checkout@v2 - name: NuGet Restore run: | choco install nuget.commandline cd win/CS/ nuget restore HandBrake.sln - name: Download LibHandBrake uses: actions/download-artifact@v2 with: name: LibHandBrake path: win/CS/HandBrakeWPF/bin/Debug - name: Import the Signing Cert run: | $ErrorView = "NormalView" if (-NOT ($env:SigningCertificate -eq '')) { $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.HandBrakeTeam_Pfx }}") $currentDirectory = Get-Location $certificatePath = Join-Path -Path $currentDirectory -ChildPath $env:SigningCertificate $certPassword = ConvertTo-SecureString -String ${{ secrets.HandBrakeTeam_pfx_pwd }} -Force –AsPlainText [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) cp $certificatePath win\cs\ } - name: Build Windows GUI run: | $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin" msbuild win\cs\build.xml /t:Nightly /p:PfxFile=$env:SigningCertificate /p:PfxPwd=${{ secrets.HandBrakeTeam_pfx_pwd }} /p:SignTimestampServer=http://time.certum.pl/ - name: Upload HandBrake exe Installer uses: actions/upload-artifact@v2 with: name: HandBrake-x86_64-Win_GUI-EXE path: win/CS/HandBrakeWPF/bin/Debug/HandBrake-Nightly-x86_64-Win_GUI.exe - name: Upload HandBrake msi Installer uses: actions/upload-artifact@v2 with: name: HandBrake-x86_64-Win_GUI-MSI path: win/CS/HandBrakeWPF/bin/Debug/HandBrake-Nightly-x86_64-Win_GUI.msi