Fix line endings and permissions in separate step #5
Workflow file for this run
This file contains hidden or 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
| # .github/workflows/build.yml | |
| name: Build Windows | |
| on: | |
| push: | |
| branches: | |
| - ci | |
| pull_request: | |
| branches: | |
| - ci | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install build tools | |
| shell: powershell | |
| run: | | |
| choco install cygwin -y --params '/InstallDir:C:\cygwin64' | |
| choco install mingw -y | |
| choco install make -y | |
| choco install 7zip -y | |
| choco install wget -y | |
| choco install unzip -y | |
| choco install dos2unix -y | |
| - name: Setup PATH | |
| shell: powershell | |
| run: | | |
| $cygwinPath = "C:\cygwin64\bin" | |
| $mingwPath = "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin" | |
| echo "$cygwinPath;$mingwPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Fix script line endings | |
| shell: bash | |
| run: dos2unix download_and_extract_windows_deps.sh 2>&1 || sed -i 's/\r$//' download_and_extract_windows_deps.sh; chmod +x download_and_extract_windows_deps.sh | |
| - name: Download FFmpeg | |
| shell: bash | |
| run: | | |
| bash download_and_extract_windows_deps.sh ffmpeg | |
| - name: Download SDL2 | |
| shell: bash | |
| run: | | |
| bash download_and_extract_windows_deps.sh sdl2 2.32.8 | |
| - name: Download SDL2_ttf | |
| shell: bash | |
| run: | | |
| bash download_and_extract_windows_deps.sh sdl2_ttf 2.24.0 | |
| - name: Extract additional DLLs | |
| shell: powershell | |
| run: | | |
| if (Test-Path "windows-dlls.zip") { | |
| Write-Host "Extracting additional DLLs from windows-dlls.zip..." | |
| Expand-Archive -Path "windows-dlls.zip" -DestinationPath "." -Force | |
| Write-Host "Extracted DLLs:" | |
| Get-ChildItem "*.dll" | Where-Object { $_.Name -notlike "av*" -and $_.Name -notlike "SDL*" -and $_.Name -notlike "sw*" } | ForEach-Object { | |
| Write-Host " - $($_.Name)" | |
| } | |
| } else { | |
| Write-Host "No windows-dlls.zip found, skipping additional DLLs..." | |
| } | |
| - name: Build | |
| shell: bash | |
| run: | | |
| make clean | |
| make | |
| - name: Verify build output | |
| shell: powershell | |
| run: | | |
| if (Test-Path "video-compare.exe") { | |
| $file = Get-Item "video-compare.exe" | |
| Write-Host "✓ Build successful!" | |
| Write-Host " File: $($file.Name)" | |
| Write-Host " Size: $([math]::Round($file.Length / 1MB, 2)) MB" | |
| Write-Host " Date: $($file.LastWriteTime)" | |
| } else { | |
| Write-Error "✗ Build failed: video-compare.exe not found" | |
| exit 1 | |
| } | |
| Write-Host "`nAll DLLs found:" | |
| Get-ChildItem "*.dll" | ForEach-Object { | |
| Write-Host " - $($_.Name) ($([math]::Round($_.Length / 1KB, 2)) KB)" | |
| } | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: video-compare-windows | |
| path: | | |
| video-compare.exe | |
| *.dll | |
| retention-days: 7 |