6
6
#
7
7
# This job does not include the uploading part.
8
8
# Upload needs to be done manually, and it should be done only once
9
- # par new major release of FFmepg.
9
+ # per new major release of FFmepg.
10
10
name : Build non-GPL FFmpeg from source
11
11
12
12
on :
@@ -20,26 +20,47 @@ defaults:
20
20
21
21
jobs :
22
22
LGPL-Linux-x86_64 :
23
- runs-on : ubuntu-latest
24
23
strategy :
25
24
fail-fast : false
26
25
matrix :
27
26
ffmpeg-version : ["4.4.4", "5.1.4", "6.1.1", "7.0.1"]
28
- steps :
29
- - name : Check out repo
30
- uses : actions/checkout@v3
31
- - name : Build FFmpeg
32
- run : |
33
- export FFMPEG_VERSION="${{ matrix.ffmpeg-version }}"
34
- export FFMPEG_ROOT="${PWD}/ffmpeg"
35
-
36
- packaging/build_ffmpeg.sh
37
-
38
- tar -czf ffmpeg.tar.gz ffmpeg/include ffmpeg/lib
39
-
40
- mkdir -p artifact_dir
41
- mv ffmpeg.tar.gz artifact_dir/ffmpeg_"${FFMPEG_VERSION}".tar.gz
42
- - uses : actions/upload-artifact@v4
43
- with :
44
- name : " ffmpeg_${{ matrix.ffmpeg-version }}_linux_x86_64"
45
- path : artifact_dir
27
+ uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
28
+ with :
29
+ job-name : Build
30
+ upload-artifact : ffmpeg-lgpl
31
+ repository : pytorch/torchcodec
32
+ script : |
33
+ export FFMPEG_VERSION="${{ matrix.ffmpeg-version }}"
34
+ export FFMPEG_ROOT="${PWD}/ffmpeg"
35
+
36
+ packaging/build_ffmpeg.sh
37
+
38
+ tar -cf ffmpeg.tar.gz ffmpeg/include ffmpeg/lib
39
+
40
+ artifact_dir="${RUNNER_ARTIFACT_DIR}/$(date +%Y-%m-%d)/linux_x86_64"
41
+ mkdir -p "${artifact_dir}"
42
+ mv ffmpeg.tar.gz "${artifact_dir}/${FFMPEG_VERSION}.tar.gz"
43
+
44
+ LGPL-macOS :
45
+ strategy :
46
+ fail-fast : false
47
+ matrix :
48
+ ffmpeg-version : ["4.4.4", "5.1.4", "6.1.1", "7.0.1"]
49
+ runner : ["macos-m1-stable", "macos-12"]
50
+ uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
51
+ with :
52
+ job-name : Build
53
+ upload-artifact : ffmpeg-lgpl
54
+ repository : pytorch/torchcodec
55
+ runner : " ${{ matrix.runner }}"
56
+ script : |
57
+ export FFMPEG_VERSION="${{ matrix.ffmpeg-version }}"
58
+ export FFMPEG_ROOT="${PWD}/ffmpeg"
59
+
60
+ packaging/build_ffmpeg.sh
61
+
62
+ tar -cf ffmpeg.tar.gz ffmpeg/include ffmpeg/lib
63
+
64
+ artifact_dir="${RUNNER_ARTIFACT_DIR}/$(date +%Y-%m-%d)/macos_$(uname -m)"
65
+ mkdir -p "${artifact_dir}"
66
+ mv ffmpeg.tar.gz "${artifact_dir}/${FFMPEG_VERSION}.tar.gz"
0 commit comments