|
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. |
3 | 3 | name: snapshot-windows-ffmpeg |
4 | 4 | on: |
5 | | - push: |
6 | | - branches: ['spike/ffmpeg-windows'] |
| 5 | + push: { branches: ['spike/ffmpeg-windows'] } |
7 | 6 | workflow_dispatch: |
8 | 7 | jobs: |
9 | 8 | capture: |
10 | 9 | runs-on: windows-latest |
11 | 10 | timeout-minutes: 40 |
12 | 11 | steps: |
13 | 12 | - 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 } |
17 | 15 | - name: configure (msvc) + make -n + capture |
18 | | - shell: bash |
| 16 | + shell: msys2 {0} |
19 | 17 | run: | |
| 18 | + set +o pipefail |
| 19 | + echo "cl.exe: $(which cl.exe 2>/dev/null || echo MISSING) make: $(which make)" |
20 | 20 | curl -L -fsS -o ffmpeg.tar.gz "https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.gz"; tar -xzf ffmpeg.tar.gz |
21 | 21 | 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 |
27 | 27 | 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 |
31 | 31 | grep -oE '\S+\.(c|S|asm)\b' make-n.log | sed 's|^|src/|; s|src/src/|src/|' | sort -u > ../snap/sources.txt |
32 | 32 | echo "sources.txt: $(wc -l < ../snap/sources.txt)" |
33 | 33 | - 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