ci/win32: add fate test pipeline #65
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
| name: build | |
| on: | |
| push: | |
| branches: | |
| - fate | |
| jobs: | |
| win32: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| arch: amd64 | |
| conf: amd64-clang-msvc | |
| - os: windows-latest | |
| arch: amd64 | |
| conf: amd64-msvc | |
| - os: windows-11-arm | |
| arch: arm64 | |
| conf: arm64-clang-msvc | |
| - os: windows-11-arm | |
| arch: arm64 | |
| conf: arm64-msvc | |
| env: | |
| VS: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise" | |
| MSYSTEM: MSYS | |
| steps: | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MSYS | |
| path-type: inherit | |
| update: true | |
| install: >- | |
| make | |
| nasm | |
| rsync | |
| - name: Disable autocrlf | |
| shell: pwsh | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - uses: actions/checkout@v4 | |
| - name: Checkout gas-preprocessor | |
| if: ${{ !contains(matrix.conf, 'clang') }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ffmpeg/gas-preprocessor | |
| path: gas-preprocessor | |
| - name: Get time | |
| id: get_time | |
| run: | | |
| "timestamp=$((Get-Date).Ticks)" >> $env:GITHUB_OUTPUT | |
| - name: Cache fate samples | |
| uses: actions/cache@v4 | |
| with: | |
| path: samples | |
| key: fate-samples-${{ steps.get_time.outputs.timestamp }} | |
| restore-keys: fate-samples- | |
| - name: Sync fate samples | |
| shell: msys2 {0} | |
| run: | | |
| mkdir -p samples | |
| rsync -vrltLW --timeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ samples/ | |
| - name: Set up SSH | |
| shell: msys2 {0} | |
| env: | |
| SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
| HOST: fate.ffmpeg.org | |
| FINGERPRINT: "76:9f:68:32:04:1e:d5:d4:ec:47:3f:dc:fc:18:17:86" | |
| run: | | |
| mkdir -p "$HOME/.ssh" | |
| chmod 700 "$HOME/.ssh" | |
| ssh-keyscan -t ecdsa "$HOST" > "$HOME/.ssh/known_hosts" | |
| SERVER_FINGERPRINT="$(ssh-keygen -lf "$HOME/.ssh/known_hosts" | grep "$HOST" | cut -d ' ' -f 2)" | |
| if [ "$SERVER_FINGERPRINT" != "$FINGERPRINT" ]; then | |
| echo "Fingerprint $SERVER_FINGERPRINT does not match expected $FINGERPRINT" | |
| exit 1 | |
| fi | |
| echo "${{ secrets.FATE_SSH_KEY }}" > "$HOME/.ssh/id_ed25519" | |
| chmod 600 "$HOME/.ssh/id_ed25519" | |
| ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
| ssh-add "$HOME/.ssh/id_ed25519" | |
| - name: Build | |
| id: build | |
| env: | |
| SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| $PSNativeCommandUseErrorActionPreference = $true | |
| # GHA images have polluted PATH, clean it up a bit | |
| $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and ` | |
| $_ -ne 'C:\Program Files\CMake\bin' -and ` | |
| $_ -ne 'C:\Strawberry\c\bin' }) -join ';' | |
| $env:PATH += ";$PWD\gas-preprocessor" | |
| Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" | |
| Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.arch }} -host_arch=${{ matrix.arch }}" | |
| msys2 -ec "./tests/fate.sh .github/fate/${{ matrix.conf }}" | |
| - name: Print version | |
| if: always() | |
| run: | | |
| cat .github/fate/version-${{ matrix.conf }} | |
| - name: Print report | |
| if: always() | |
| run: | | |
| cat .github/fate/report | |
| - name: Print configure.log | |
| if: always() | |
| run: | | |
| cat .github/fate/configure.log | |
| - name: Print compile.log | |
| if: always() | |
| run: | | |
| cat .github/fate/compile.log | |
| - name: Print test.log | |
| if: always() | |
| run: | | |
| cat .github/fate/test.log |