Skip to content

Commit 6efb3cf

Browse files
committed
spike: windows ffmpeg R1 v4 — MSYS2 (make) + msvc env for source capture
1 parent 9166f7b commit 6efb3cf

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
# TEMP R1 spike v3: windows ffmpeg configure (MSVC) + capture the source list
2-
# (install make) → the windows snapshot, and report the .c/.asm counts.
1+
# TEMP R1 spike v4: windows ffmpeg config + source list via MSYS2 (has make) +
2+
# msvc-dev-cmd (cl.exe env). configure already proven; this captures the sources.
33
name: snapshot-windows-ffmpeg
44
on:
5-
push:
6-
branches: ['spike/ffmpeg-windows']
5+
push: { branches: ['spike/ffmpeg-windows'] }
76
workflow_dispatch:
87
jobs:
98
capture:
109
runs-on: windows-latest
1110
timeout-minutes: 40
1211
steps:
1312
- uses: ilammy/msvc-dev-cmd@v1
14-
- name: Install make
15-
shell: pwsh
16-
run: choco install make -y --no-progress
13+
- uses: msys2/setup-msys2@v2
14+
with: { msystem: UCRT64, install: 'make diffutils tar', path-type: inherit }
1715
- name: configure (msvc) + make -n + capture
18-
shell: bash
16+
shell: msys2 {0}
1917
run: |
18+
set +o pipefail
19+
echo "cl.exe: $(which cl.exe 2>/dev/null || echo MISSING) make: $(which make)"
2020
curl -L -fsS -o ffmpeg.tar.gz "https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.gz"; tar -xzf ffmpeg.tar.gz
2121
mkdir build && cd build
22-
../ffmpeg-8.1.2/configure --toolchain=msvc --disable-autodetect --disable-programs --disable-doc >cfg.log 2>&1 && echo "CONFIGURE OK" || { tail -30 cfg.log; exit 1; }
23-
make -n >make-n.log 2>/dev/null || true
24-
echo "make-n lines: $(wc -l < make-n.log)"
25-
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)"
26-
echo "=== sample compile lines ==="; grep -m3 -E 'cl |clang|\.c ' make-n.log | head -3
22+
../ffmpeg-8.1.2/configure --toolchain=msvc --disable-autodetect --disable-programs --disable-doc >cfg.log 2>&1 && echo "CONFIGURE OK" || { echo FAIL; tail -30 cfg.log; exit 1; }
23+
make -n >make-n.log 2>make-n.err || true
24+
echo "make-n lines: $(wc -l < make-n.log) (stderr: $(head -1 make-n.err))"
25+
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|obj)\b' make-n.log|sort -u|wc -l)"
26+
echo "=== windows config.h facts ==="; grep -E '#define (OS_NAME|ARCH_X86_64|HAVE_W32THREADS|HAVE_MMX_EXTERNAL|HAVE_INLINE_ASM)' config.h
2727
mkdir -p ../snap/libavutil ../snap/libavcodec ../snap/libavformat ../snap/libavfilter ../snap/libavdevice
28-
cp config.h config_components.h config.asm config_components.asm make-n.log cfg.log ../snap/ 2>/dev/null || true
29-
cp libavutil/avconfig.h libavutil/ffversion.h ../snap/libavutil/ 2>/dev/null || true
30-
for d in libavcodec/codec_list.c libavcodec/parser_list.c libavcodec/bsf_list.c libavformat/demuxer_list.c libavformat/muxer_list.c libavformat/protocol_list.c libavfilter/filter_list.c libavdevice/indev_list.c libavdevice/outdev_list.c; do cp "$d" "../snap/$d" 2>/dev/null || true; done
28+
cp config.h config_components.h config.asm config_components.asm make-n.log cfg.log ../snap/ 2>/dev/null
29+
cp libavutil/avconfig.h libavutil/ffversion.h ../snap/libavutil/ 2>/dev/null
30+
for d in libavcodec/codec_list.c libavcodec/parser_list.c libavcodec/bsf_list.c libavformat/demuxer_list.c libavformat/muxer_list.c libavformat/protocol_list.c libavfilter/filter_list.c libavdevice/indev_list.c libavdevice/outdev_list.c; do cp "$d" "../snap/$d" 2>/dev/null; done
3131
grep -oE '\S+\.(c|S|asm)\b' make-n.log | sed 's|^|src/|; s|src/src/|src/|' | sort -u > ../snap/sources.txt
3232
echo "sources.txt: $(wc -l < ../snap/sources.txt)"
3333
- uses: actions/upload-artifact@v4
34-
with: { name: ffmpeg-windows-snapshot, path: build/../snap/ }
34+
with: { name: ffmpeg-windows-snapshot, path: snap/ }

0 commit comments

Comments
 (0)