spike: windows ffmpeg R1 v2 — vcvars (cl.exe) + bash + --toolchain=msvc #2
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
| # TEMP R1 spike v2: FFmpeg configure on windows with a PROPER MSVC dev env | |
| # (cl.exe on PATH via vcvars) + Git Bash + ffmpeg's documented --toolchain=msvc. | |
| name: snapshot-windows-ffmpeg | |
| on: | |
| push: | |
| branches: ['spike/ffmpeg-windows'] | |
| workflow_dispatch: | |
| jobs: | |
| capture: | |
| runs-on: windows-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: ilammy/msvc-dev-cmd@v1 # exports MSVC env (cl.exe/link.exe on PATH) to later steps | |
| - name: Fetch + configure (msvc) + make -n | |
| shell: bash | |
| run: | | |
| echo "cl.exe: $(which cl.exe 2>/dev/null || echo MISSING)" | |
| curl -L -fsS -o ffmpeg.tar.gz "https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.gz" | |
| tar -xzf ffmpeg.tar.gz | |
| mkdir build && cd build | |
| # ffmpeg's MSVC path: cl.exe as cc; needs a couple of shims for the bash env | |
| ../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; } | |
| if [ -f config.h ]; then | |
| echo "=== windows config.h facts ===" | |
| 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 | |
| make -n >make-n.log 2>/dev/null || true | |
| 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)" | |
| echo "CONFIGURE SUCCEEDED — R1 configure step is achievable on windows" | |
| else | |
| echo "R1: windows configure still blocked"; exit 1 | |
| fi |