Skip to content

Commit 8774e35

Browse files
committed
spike: windows ffmpeg R1 v2 — vcvars (cl.exe) + bash + --toolchain=msvc
1 parent 6ef070c commit 8774e35

1 file changed

Lines changed: 11 additions & 19 deletions

File tree

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# TEMP R1 spike: can FFmpeg 8.1.2 configure (via MSYS2) + capture a windows-x86_64
2-
# snapshot on windows-latest? First step to determine Windows feasibility.
1+
# TEMP R1 spike v2: FFmpeg configure on windows with a PROPER MSVC dev env
2+
# (cl.exe on PATH via vcvars) + Git Bash + ffmpeg's documented --toolchain=msvc.
33
name: snapshot-windows-ffmpeg
44
on:
55
push:
@@ -10,30 +10,22 @@ jobs:
1010
runs-on: windows-latest
1111
timeout-minutes: 40
1212
steps:
13-
- uses: msys2/setup-msys2@v2
14-
with:
15-
msystem: UCRT64
16-
install: make diffutils tar
17-
- name: Fetch FFmpeg 8.1.2
18-
shell: msys2 {0}
13+
- uses: ilammy/msvc-dev-cmd@v1 # exports MSVC env (cl.exe/link.exe on PATH) to later steps
14+
- name: Fetch + configure (msvc) + make -n
15+
shell: bash
1916
run: |
17+
echo "cl.exe: $(which cl.exe 2>/dev/null || echo MISSING)"
2018
curl -L -fsS -o ffmpeg.tar.gz "https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.gz"
2119
tar -xzf ffmpeg.tar.gz
22-
- name: configure (msvc-abi via clang) + make -n
23-
shell: msys2 {0}
24-
run: |
2520
mkdir build && cd build
26-
echo "=== attempt A: --toolchain=msvc (cl.exe) ==="
27-
../ffmpeg-8.1.2/configure --toolchain=msvc --disable-autodetect --disable-programs --disable-doc >cfgA.log 2>&1 && echo "CONFIGURE-MSVC OK" || { echo "toolchain=msvc failed, tail:"; tail -25 cfgA.log; }
28-
if [ ! -f config.h ]; then
29-
echo "=== attempt B: clang targeting windows-msvc ==="
30-
../ffmpeg-8.1.2/configure --cc=clang --target-os=win64 --arch=x86_64 --disable-autodetect --disable-programs --disable-doc >cfgB.log 2>&1 && echo "CONFIGURE-CLANG OK" || { echo "clang win64 failed, tail:"; tail -25 cfgB.log; }
31-
fi
21+
# ffmpeg's MSVC path: cl.exe as cc; needs a couple of shims for the bash env
22+
../ffmpeg-8.1.2/configure --toolchain=msvc --disable-autodetect --disable-programs --disable-doc >cfg.log 2>&1 && echo "CONFIGURE-MSVC OK" || { echo "=== configure FAILED, tail ==="; tail -40 cfg.log; }
3223
if [ -f config.h ]; then
3324
echo "=== windows config.h facts ==="
34-
grep -E '#define (OS_NAME|ARCH_X86_64|EXTERN_PREFIX|HAVE_W32THREADS|HAVE_PTHREADS|HAVE_MMX|HAVE_ALIGNED_MALLOC|HAVE_WINDOWS_H)' config.h
25+
grep -E '#define (OS_NAME|ARCH_X86_64|EXTERN_PREFIX|SLIBSUF|HAVE_W32THREADS|HAVE_PTHREADS|HAVE_MMX|HAVE_ALIGNED_MALLOC|HAVE_WINDOWS_H|HAVE_INLINE_ASM)' config.h
3526
make -n >make-n.log 2>/dev/null || true
3627
echo ".c=$(grep -oE '[^ ]+\.c\b' make-n.log|sort -u|wc -l) .S=$(grep -oE '[^ ]+\.S\b' make-n.log|sort -u|wc -l) .asm=$(grep -oE '[^ ]+\.asm\b' make-n.log|sort -u|wc -l)"
28+
echo "CONFIGURE SUCCEEDED — R1 configure step is achievable on windows"
3729
else
38-
echo "BOTH CONFIGURE ATTEMPTS FAILED — windows configure is the R1 blocker"; exit 1
30+
echo "R1: windows configure still blocked"; exit 1
3931
fi

0 commit comments

Comments
 (0)