@@ -26,16 +26,71 @@ jobs:
2626 with :
2727 fetch-depth : 0
2828
29+ - name : create submodule status file
30+ run : git submodule status > submodule_status
31+
32+ - name : Restore ffmpeg cache
33+ id : cache-ffmpeg-restore
34+ uses : actions/cache/restore@v4
35+ env :
36+ cache-name : cache-ffmpeg-build-win32
37+ with :
38+ path : ${{github.workspace}}/ffmpeg/build/x86
39+ key : ${{env.cache-name}}-${{hashFiles('submodule_status', 'ffmpeg/build_ffmpeg.sh')}}
40+
41+ # 1. Setup MSVC environment variables (cl.exe, link.exe, etc.)
42+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
43+ name : Setup MSVC
44+ uses : ilammy/msvc-dev-cmd@v1
45+ with :
46+ arch : x86
47+
48+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
49+ name : Setup MSYS2
50+ uses : msys2/setup-msys2@v2
51+ id : setup-msys2
52+ with :
53+ msystem : MSYS
54+ install : >-
55+ make
56+ diffutils
57+ nasm
58+ pkg-config
59+ git
60+ path-type : inherit
61+ update : true
62+
63+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
64+ name : Checkout ffmpeg submodule
65+ run : git submodule update --init --recursive
66+
67+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
68+ name : Build ffmpeg
69+ shell : msys2 {0}
70+ run : |
71+ pushd ffmpeg
72+ ./build_ffmpeg.sh x86
73+ popd
74+
75+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
76+ name : Save FFmpeg cache
77+ id : cache-ffmpeg-save
78+ uses : actions/cache/save@v4
79+ with :
80+ path : |
81+ ${{github.workspace}}/ffmpeg/build/x86
82+ key : ${{ steps.cache-ffmpeg-restore.outputs.cache-primary-key }}
83+
2984 - name : Install Qt
30- uses : jurplel/install-qt-action@v3
85+ uses : jurplel/install-qt-action@v4
3186 with :
32- version : ' 5.15.2 '
87+ version : ' 5.15.* '
3388 host : ' windows'
3489 target : ' desktop'
3590 arch : ' win32_msvc2019'
3691 install-deps : ' true'
3792 cache : ' true'
38- cache-key-prefix : ' install-qt-action-x86 '
93+ cache-key-prefix : ' install-qt-action-win32 '
3994
4095 - name : Configure CMake
4196 run : >
@@ -65,17 +120,72 @@ jobs:
65120 - uses : actions/checkout@v4
66121 with :
67122 fetch-depth : 0
68-
123+
124+ - name : create submodule status file
125+ run : git submodule status > submodule_status
126+
127+ - name : Restore ffmpeg cache
128+ id : cache-ffmpeg-restore
129+ uses : actions/cache/restore@v4
130+ env :
131+ cache-name : cache-ffmpeg-build-win64
132+ with :
133+ path : ${{github.workspace}}/ffmpeg/build/x86_64
134+ key : ${{env.cache-name}}-${{hashFiles('submodule_status', 'ffmpeg/build_ffmpeg.sh')}}
135+
136+ # 1. Setup MSVC environment variables (cl.exe, link.exe, etc.)
137+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
138+ name : Setup MSVC
139+ uses : ilammy/msvc-dev-cmd@v1
140+ with :
141+ arch : x64
142+
143+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
144+ name : Setup MSYS2
145+ uses : msys2/setup-msys2@v2
146+ id : setup-msys2
147+ with :
148+ msystem : MSYS
149+ install : >-
150+ make
151+ diffutils
152+ nasm
153+ pkg-config
154+ git
155+ path-type : inherit
156+ update : true
157+
158+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
159+ name : Checkout ffmpeg submodule
160+ run : git submodule update --init --recursive
161+
162+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
163+ name : Build ffmpeg
164+ shell : msys2 {0}
165+ run : |
166+ pushd ffmpeg
167+ ./build_ffmpeg.sh
168+ popd
169+
170+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
171+ name : Save FFmpeg cache
172+ id : cache-ffmpeg-save
173+ uses : actions/cache/save@v4
174+ with :
175+ path : |
176+ ${{github.workspace}}/ffmpeg/build/x86_64
177+ key : ${{ steps.cache-ffmpeg-restore.outputs.cache-primary-key }}
178+
69179 - name : Install Qt
70- uses : jurplel/install-qt-action@v3
180+ uses : jurplel/install-qt-action@v4
71181 with :
72- version : ' 5.15.2 '
182+ version : ' 5.15.* '
73183 host : ' windows'
74184 target : ' desktop'
75185 arch : ' win64_msvc2019_64'
76186 install-deps : ' true'
77187 cache : ' true'
78- cache-key-prefix : ' install-qt-action'
188+ cache-key-prefix : ' install-qt-action-win64 '
79189
80190 - name : Configure CMake
81191 run : >
@@ -113,29 +223,37 @@ jobs:
113223 run : git submodule status > submodule_status
114224
115225 - name : Restore ffmpeg cache
116- id : cache-ffmpeg
117- uses : actions/cache@v4
226+ id : cache-ffmpeg-restore
227+ uses : actions/cache/restore @v4
118228 env :
119- cache-name : cache-ffmpeg-build
229+ cache-name : cache-ffmpeg-build-linux64
120230 with :
121- path : ${{github.workspace}}/ffmpeg/lib_lin_x64
122- key : ${{runner.os}}-build-${{ env.cache-name}}-${{hashFiles('submodule_status', 'ffmpeg/build-scripts/** ')}}
231+ path : ${{github.workspace}}/ffmpeg/build/x86_64
232+ key : ${{env.cache-name}}-${{hashFiles('submodule_status', 'ffmpeg/build_ffmpeg.sh ')}}
123233
124- - if : ${{ steps.cache-ffmpeg.outputs.cache-hit != 'true' }}
234+ - if : ${{ steps.cache-ffmpeg-restore .outputs.cache-hit != 'true' }}
125235 name : Build ffmpeg
126236 run : |
127- git submodule init
128- git submodule update
237+ git submodule update --init --recursive
129238 sudo apt-get update
130- sudo apt-get install -y yasm
131- pushd ffmpeg/build-scripts
239+ sudo apt-get install -y nasm
240+ pushd ffmpeg
132241 ./build_ffmpeg.sh
133242 popd
134243
244+ - if : ${{ steps.cache-ffmpeg-restore.outputs.cache-hit != 'true' }}
245+ name : Save FFmpeg cache
246+ id : cache-ffmpeg-save
247+ uses : actions/cache/save@v4
248+ with :
249+ path : |
250+ ${{github.workspace}}/ffmpeg/build/x86_64
251+ key : ${{ steps.cache-ffmpeg-restore.outputs.cache-primary-key }}
252+
135253 - name : Install Qt
136- uses : jurplel/install-qt-action@v3
254+ uses : jurplel/install-qt-action@v4
137255 with :
138- version : ' 5.15.2 '
256+ version : ' 5.15.* '
139257 host : ' linux'
140258 target : ' desktop'
141259 arch : ' gcc_64'
@@ -165,7 +283,7 @@ jobs:
165283
166284 # ### PACKAGE JOB ####
167285 package :
168- runs-on : windows -latest
286+ runs-on : ubuntu -latest
169287 needs :
170288 - build-win32
171289 - build-win64
@@ -195,7 +313,9 @@ jobs:
195313 path : ${{github.workspace}}/install
196314
197315 - name : package final plugin file
198- run : cmake -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DRPSB_PLUGINFILE_OUTPUT_DIR=${{github.workspace}}/release -P create-pluginfile.cmake
316+ run : |
317+ mkdir release
318+ cmake -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DRPSB_PLUGINFILE_OUTPUT_DIR=${{github.workspace}}/release -P create-pluginfile.cmake
199319
200320 - name : Archive
201321 uses : actions/upload-artifact@v4
0 commit comments