Makes no sense but how it is in other repo #2
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: 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 purge cmake -y | |
sudo apt-get install automake autoconf build-essential intltool libtool libtool-bin make nasm patch tar yasm zlib1g-dev ninja-build gzip pax cmake | |
sudo pip3 install meson | |
- name: Setup Toolchain | |
run: | | |
wget https://github.com/bradleysepos/mingw-w64-build/releases/download/9.2.0/mingw-w64-toolchain-9.2.0-linux-x86_64.tar.gz | |
SHA=$(sha1sum mingw-w64-toolchain-9.2.0-linux-x86_64.tar.gz) | |
EXPECTED="560ceb85cdf2783c68226d3761f865c42101c3f6 mingw-w64-toolchain-9.2.0-linux-x86_64.tar.gz" | |
if [ "$SHA" == "$EXPECTED" ]; | |
then | |
echo "Toolchain Verified. Extracting ..." | |
mkdir toolchains | |
mv mingw-w64-toolchain-9.2.0-linux-x86_64.tar.gz toolchains | |
cd toolchains | |
tar xvf mingw-w64-toolchain-9.2.0-linux-x86_64.tar.gz | |
cd mingw-w64-toolchain-9.2.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/StickShift/StickShift/toolchains/mingw-w64-toolchain-9.2.0-linux-x86_64/mingw-w64-x86_64/bin:${PATH}" | |
export PATH=/usr/bin:$PATH | |
./configure --cross=x86_64-w64-mingw32 --enable-qsv --enable-vce --enable-nvenc --launch-jobs=0 --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-2022 | |
needs: build_mingw | |
env: | |
SigningCertificate: ${{ secrets.HandBrakeTeam_SignFile }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download LibHandBrake | |
uses: actions/download-artifact@v2 | |
with: | |
name: LibHandBrake | |
path: win/CS/HandBrakeWPF/bin/publish | |
- 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\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin" | |
msbuild win\cs\build.xml /t:x64 /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/publish/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/publish/HandBrake-Nightly-x86_64-Win_GUI.msi |