forked from mpc-hc/FFmpeg
-
Notifications
You must be signed in to change notification settings - Fork 1
124 lines (119 loc) · 3.99 KB
/
Copy pathbuild.yml
File metadata and controls
124 lines (119 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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