Create access module using SharedStorageAccessManager #129
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
env: | |
VLC_VERSION: 3.0.20 | |
UWP_LIBVLC_BUILD_FLAGS: -z -r -u -w | |
jobs: | |
libvlc: | |
runs-on: ubuntu-latest | |
container: | |
image: registry.videolan.org/vlc-debian-llvm-uwp:20220713124227 | |
options: -u root | |
strategy: | |
matrix: | |
arch: [x86, x64, arm64] | |
include: | |
- arch: x86 | |
short-arch: win32 | |
host-arch: i686 | |
- arch: x64 | |
short-arch: win64 | |
host-arch: x86_64 | |
- arch: arm64 | |
short-arch: winarm64 | |
host-arch: aarch64 | |
env: | |
SHORTARCH: ${{ matrix.short-arch }} | |
HOST_ARCH: ${{ matrix.host-arch }} | |
TRIPLET: ${{ matrix.host-arch }}-w64-mingw32 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Apply patches | |
run: | | |
cd vlc | |
git config --global user.email "[email protected]" | |
git config --global user.name "Cony Cone" | |
git am -3 ../patches/*.patch | |
if [ $? -ne 0 ]; then | |
git am --abort | |
echo "Applying the patches failed, aborting git-am" | |
exit 1 | |
fi | |
- name: Build | |
run: vlc/extras/package/win32/build.sh -c -a ${{ matrix.host-arch }} $UWP_LIBVLC_BUILD_FLAGS | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libvlc-${{ matrix.arch }} | |
path: ${{ matrix.short-arch }}-uwp/vlc-${{ env.VLC_VERSION }}-*.7z | |
if-no-files-found: error | |
UWP_access_v3: | |
strategy: | |
matrix: | |
arch: [x64, x86, arm64] | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout libvlc uwp access module code | |
shell: bash | |
run: | | |
git clone --depth 1 https://github.com/huynhsontung/vlc-winrt.git && cd vlc-winrt | |
mkdir -p libvlc/Universal/vlc-${{ matrix.arch }}/Release | |
- name: Download VLC headers | |
run: Invoke-WebRequest -Uri "https://code.videolan.org/videolan/vlc/-/archive/3.0.x/vlc-3.0.x.zip" -OutFile "vlc-3.0.x.zip" | |
- name: Extract LibVLC | |
shell: bash | |
run: | | |
7z x vlc-3.0.x.zip -ovlc | |
mv vlc/vlc-3.0.x/include vlc-winrt/libvlc/Universal/vlc-${{ matrix.arch }}/Release | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: MSBuild x64/ARM64 | |
if: matrix.arch != 'x86' | |
working-directory: vlc-winrt/modules/libaccess_winrt_plugin.UWP | |
run: msbuild libaccess_winrt_plugin.UWP.vcxproj /p:Configuration=Release /p:Platform=${{ matrix.arch }} | |
- name: MSBuild x86 | |
if: matrix.arch == 'x86' | |
working-directory: vlc-winrt/modules/libaccess_winrt_plugin.UWP | |
run: msbuild libaccess_winrt_plugin.UWP.vcxproj /p:Configuration=Release /p:Platform=Win32 | |
- name: Upload build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libvlc-uwp-access-build-${{ matrix.arch }} | |
path: vlc-winrt/modules/libaccess_winrt_plugin.UWP/Release/libaccess_winrt_plugin.UWP | |
if-no-files-found: error | |
UWP_NuGet: | |
runs-on: ubuntu-latest | |
needs: | |
- UWP_access_v3 | |
- libvlc | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
- uses: NuGet/setup-nuget@v2 | |
with: | |
nuget-version: '5.x' | |
- name: Create NuGet folders | |
shell: bash | |
run: | | |
mkdir -p build/win10-arm64/native | |
mkdir -p build/win10-x64/native | |
mkdir -p build/win10-x86/native | |
- name: Download and extract UWP builds | |
shell: bash | |
run: | | |
7z x libvlc-arm64/vlc-$VLC_VERSION-win32.7z -oarm64/vlc/winarm64-uwp -y | |
7z x libvlc-x86/vlc-$VLC_VERSION-win32.7z -ox86/vlc/win32-uwp -y | |
7z x libvlc-x64/vlc-$VLC_VERSION-win64.7z -ox64/vlc/win64-uwp -y | |
mv arm64/vlc/winarm64-uwp/vlc-$VLC_VERSION/lua build/win10-arm64/native | |
mv arm64/vlc/winarm64-uwp/vlc-$VLC_VERSION/plugins build/win10-arm64/native | |
mv libvlc-uwp-access-build-arm64/libaccess_winrt_plugin.dll build/win10-arm64/native/plugins/access | |
mv arm64/vlc/winarm64-uwp/vlc-$VLC_VERSION/sdk build/win10-arm64/native | |
mv arm64/vlc/winarm64-uwp/vlc-$VLC_VERSION/libvlc.dll build/win10-arm64/native | |
mv arm64/vlc/winarm64-uwp/vlc-$VLC_VERSION/libvlccore.dll build/win10-arm64/native | |
mv x86/vlc/win32-uwp/vlc-$VLC_VERSION/lua build/win10-x86/native | |
mv x86/vlc/win32-uwp/vlc-$VLC_VERSION/plugins build/win10-x86/native | |
mv libvlc-uwp-access-build-x86/libaccess_winrt_plugin.dll build/win10-x86/native/plugins/access | |
mv x86/vlc/win32-uwp/vlc-$VLC_VERSION/sdk build/win10-x86/native | |
mv x86/vlc/win32-uwp/vlc-$VLC_VERSION/libvlc.dll build/win10-x86/native | |
mv x86/vlc/win32-uwp/vlc-$VLC_VERSION/libvlccore.dll build/win10-x86/native | |
mv x64/vlc/win64-uwp/vlc-$VLC_VERSION/lua build/win10-x64/native | |
mv x64/vlc/win64-uwp/vlc-$VLC_VERSION/plugins build/win10-x64/native | |
mv libvlc-uwp-access-build-x64/libaccess_winrt_plugin.dll build/win10-x64/native/plugins/access | |
mv x64/vlc/win64-uwp/vlc-$VLC_VERSION/sdk build/win10-x64/native | |
mv x64/vlc/win64-uwp/vlc-$VLC_VERSION/libvlc.dll build/win10-x64/native | |
mv x64/vlc/win64-uwp/vlc-$VLC_VERSION/libvlccore.dll build/win10-x64/native | |
- name: Get tag | |
id: get-tag | |
run: echo "tag=$(date +'%y%m%d%H%M')" >> "$GITHUB_OUTPUT" | |
- name: Package NuGet | |
shell: bash | |
run: nuget pack VideoLAN.LibVLC.UWP.nuspec -Version $VLC_VERSION-${{ steps.get-tag.outputs.tag }}+$(printf '%.10s' $GITHUB_SHA) | |
- name: Upload NuGet package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libvlc-uwp | |
path: '*.nupkg' | |
- name: Push to Nuget | |
if: github.event_name == 'push' | |
run: nuget push *.nupkg -Source "https://api.nuget.org/v3/index.json" -ApiKey ${{ secrets.NUGET_TOKEN }} -SkipDuplicate |