Skip to content

Commit 46c9bc2

Browse files
committed
ci/win32: add fate test pipeline
1 parent 402de18 commit 46c9bc2

5 files changed

Lines changed: 159 additions & 0 deletions

File tree

.github/fate/amd64-clang-msvc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
slot=amd64-clang-msvc
2+
comment="VS2022 Clang AMD64"
3+
repo="file://$PWD"
4+
samples="$PWD/samples"
5+
makeopts="-j`nproc` V=1"
6+
arch=amd64
7+
as=clang
8+
cc=clang
9+
ld=lld-link
10+
extra_conf="--ar=llvm-ar --cxx=clang++ --nm=llvm-nm --strip=llvm-strip --windres=llvm-windres --enable-w32threads --enable-version3 --enable-nonfree"
11+
# TODO: those flags shouldn't be needed
12+
extra_ldflags="msvcrt.lib oldnames.lib"
13+
extra_conf+=" --host_extralibs='' --toolchain=msvc"

.github/fate/amd64-msvc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
slot=amd64-msvc
2+
comment="VS2022 MSVC AMD64"
3+
repo="file://$PWD"
4+
samples="../samples"
5+
makeopts="-j`nproc` V=1"
6+
arch=amd64
7+
extra_conf="--toolchain=msvc --enable-w32threads --enable-version3 --enable-nonfree"

.github/fate/arm64-clang-msvc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
slot=arm64-clang-msvc
2+
comment="VS2022 Clang ARM64"
3+
repo="file://$PWD"
4+
samples="../samples"
5+
makeopts="-j`nproc` V=1"
6+
arch=arm64
7+
as=clang
8+
cc=clang
9+
ld=lld-link
10+
extra_conf="--ar=llvm-ar --cxx=clang++ --nm=llvm-nm --strip=llvm-strip --windres=llvm-windres --enable-w32threads --enable-version3 --enable-nonfree"
11+
# TODO: those flags shouldn't be needed
12+
extra_ldflags="msvcrt.lib oldnames.lib"
13+
extra_conf+=" --host_extralibs='' --toolchain=msvc"

.github/fate/arm64-msvc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
slot=arm64-msvc
2+
comment="VS2022 MSVC ARM64"
3+
repo="file://$PWD"
4+
samples="../samples"
5+
makeopts="-j`nproc` V=1"
6+
arch=arm64
7+
extra_conf="--toolchain=msvc --enable-w32threads --enable-version3 --enable-nonfree"

.github/workflows/build.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- fate
7+
8+
jobs:
9+
win32:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- os: windows-latest
16+
arch: amd64
17+
conf: amd64-clang-msvc
18+
- os: windows-latest
19+
arch: amd64
20+
conf: amd64-msvc
21+
- os: windows-11-arm
22+
arch: arm64
23+
conf: arm64-clang-msvc
24+
- os: windows-11-arm
25+
arch: arm64
26+
conf: arm64-msvc
27+
env:
28+
VS: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise"
29+
MSYSTEM: MSYS
30+
steps:
31+
- uses: msys2/setup-msys2@v2
32+
with:
33+
msystem: MSYS
34+
path-type: inherit
35+
update: true
36+
install: >-
37+
make
38+
nasm
39+
rsync
40+
- name: Disable autocrlf
41+
shell: pwsh
42+
run: |
43+
git config --global core.autocrlf false
44+
git config --global core.eol lf
45+
- uses: actions/checkout@v4
46+
- name: Checkout gas-preprocessor
47+
if: ${{ !contains(matrix.conf, 'clang') }}
48+
uses: actions/checkout@v4
49+
with:
50+
repository: ffmpeg/gas-preprocessor
51+
path: gas-preprocessor
52+
- name: Get time
53+
id: get_time
54+
run: |
55+
"timestamp=$((Get-Date).Ticks)" >> $env:GITHUB_OUTPUT
56+
- name: Cache fate samples
57+
uses: actions/cache@v4
58+
with:
59+
path: .github/fate/samples
60+
key: fate-samples-${{ steps.get_time.outputs.timestamp }}
61+
restore-keys: fate-samples-
62+
- name: Sync fate samples
63+
shell: msys2 {0}
64+
run: |
65+
mkdir -p .github/fate/samples
66+
rsync -vrltLW --timeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ .github/fate/samples/
67+
# - name: Set up SSH
68+
# shell: msys2 {0}
69+
# env:
70+
# HOST: fate.ffmpeg.org
71+
# FINGERPRINT: "76:9f:68:32:04:1e:d5:d4:ec:47:3f:dc:fc:18:17:86"
72+
# run: |
73+
# mkdir -p "$HOME/.ssh"
74+
# chmod 700 "$HOME/.ssh"
75+
# ssh-keyscan -t ecdsa "$HOST" > "$HOME/.ssh/known_hosts"
76+
# SERVER_FINGERPRINT="$(ssh-keygen -E md5 -lf "$HOME/.ssh/known_hosts" | grep "$HOST" | awk '{gsub(/^MD5:/, "", $2); print $2}')"
77+
# if [ "$SERVER_FINGERPRINT" != "$FINGERPRINT" ]; then
78+
# echo "Fingerprint $SERVER_FINGERPRINT does not match expected $FINGERPRINT"
79+
# exit 1
80+
# fi
81+
# echo "${{ secrets.FATE_SSH_KEY }}" > "$HOME/.ssh/id_ed25519"
82+
# chmod 600 "$HOME/.ssh/id_ed25519"
83+
- name: Build
84+
id: build
85+
shell: pwsh
86+
run: |
87+
$ErrorActionPreference = "Stop"
88+
$PSNativeCommandUseErrorActionPreference = $true
89+
90+
# GHA images have polluted PATH, clean it up a bit
91+
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and `
92+
$_ -ne 'C:\Program Files\CMake\bin' -and `
93+
$_ -ne 'C:\Strawberry\c\bin' }) -join ';'
94+
$env:PATH += ";$PWD\gas-preprocessor"
95+
96+
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
97+
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.arch }} -host_arch=${{ matrix.arch }}"
98+
99+
msys2 -ec "./tests/fate.sh .github/fate/${{ matrix.conf }}"
100+
- name: Print version
101+
if: always()
102+
run: |
103+
cat .github/fate/version-${{ matrix.conf }}
104+
- name: Print report
105+
if: always()
106+
run: |
107+
cat .github/fate/report
108+
- name: Print configure.log
109+
if: always()
110+
run: |
111+
cat .github/fate/configure.log
112+
- name: Print compile.log
113+
if: always()
114+
run: |
115+
cat .github/fate/compile.log
116+
- name: Print test.log
117+
if: always()
118+
run: |
119+
cat .github/fate/test.log

0 commit comments

Comments
 (0)