Skip to content

Commit 116c72c

Browse files
committed
CI: Test Rust example
1 parent 5a672ea commit 116c72c

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/MediaInfoLib_Checks.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ jobs:
131131
with:
132132
repository: MediaArea/ZenLib
133133
path: ZenLib
134+
- name: Checkout MediaArea-Utils-Binaries for 7-Zip and NSIS
135+
uses: actions/checkout@v5
136+
with:
137+
repository: MediaArea/MediaArea-Utils-Binaries
138+
path: MediaArea-Utils-Binaries
139+
sparse-checkout: |
140+
Windows/7-Zip
141+
Windows/NSIS
134142
- name: Checkout MediaInfoLib
135143
uses: actions/checkout@v5
136144
with:
@@ -141,3 +149,57 @@ jobs:
141149
msbuild-architecture: x64
142150
- name: Build
143151
run: msbuild -p:Configuration=Release -p:Platform=${{ matrix.architecture }} ${{ github.workspace }}\MediaInfoLib\Project\MSVC2022\MediaInfoLib.sln -verbosity:quiet -warnaserror
152+
- name: Prepare package script
153+
run: (Get-Content ${{ github.workspace }}\MediaInfoLib\Release\Release_DLL_Windows_ARM64.bat) -replace 'ARM64EC', 'ARM64' | Set-Content ${{ github.workspace }}\MediaInfoLib\Release\Release_DLL_Windows_ARM64.bat
154+
- name: Package
155+
if: ${{ matrix.architecture != 'Win32' }}
156+
run: |
157+
cd ${{ github.workspace }}\MediaInfoLib\Release
158+
.\Release_DLL_Windows_${{ matrix.architecture }}.bat
159+
- name: Upload artifact
160+
if: ${{ matrix.architecture != 'Win32' }}
161+
uses: actions/upload-artifact@v4
162+
with:
163+
name: ${{ matrix.architecture }}
164+
path: ${{ github.workspace }}\MediaInfoLib\Release\MediaInfo_DLL_Windows_${{ matrix.architecture }}_WithoutInstaller.7z
165+
166+
Rust:
167+
needs: MSBuild
168+
strategy:
169+
matrix:
170+
include:
171+
- os: windows-latest
172+
architecture: x64
173+
- os: windows-11-arm
174+
architecture: ARM64
175+
- os: ubuntu-latest
176+
architecture: AMD64
177+
fail-fast: false
178+
runs-on: ${{ matrix.os }}
179+
env:
180+
CARGO_TERM_COLOR: always
181+
steps:
182+
- name: Checkout MediaInfoLib
183+
if: ${{ runner.os != 'Windows' }}
184+
uses: actions/checkout@v5
185+
- name: Download artifact
186+
if: ${{ runner.os == 'Windows' }}
187+
uses: actions/download-artifact@v5
188+
with:
189+
name: ${{ matrix.architecture }}
190+
- name: Delete artifact
191+
if: ${{ runner.os == 'Windows' }}
192+
uses: geekyeggo/delete-artifact@v5
193+
with:
194+
name: ${{ matrix.architecture }}
195+
- name: Extract package
196+
if: ${{ runner.os == 'Windows' }}
197+
run: 7z x MediaInfo_DLL_Windows_${{ matrix.architecture }}_WithoutInstaller.7z
198+
- name: Build
199+
run: |
200+
cd ${{ runner.os == 'Windows' && 'Developers\Source\Example\HowToUse_Dll-rs' || 'Source/Example/HowToUse_Dll-rs' }}
201+
cargo build --release
202+
- name: Test run
203+
run: |
204+
cd ${{ runner.os == 'Windows' && 'Developers\Source\Example\HowToUse_Dll-rs' || 'Source/Example/HowToUse_Dll-rs' }}
205+
cargo run --release ${{ runner.os != 'Windows' && '-- ../../../Release/Example.ogg' || '' }}

0 commit comments

Comments
 (0)