Skip to content

Commit

Permalink
fix: Publish native macos assets for the samplesapp
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed May 16, 2024
1 parent 057b269 commit 707ba69
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 37 deletions.
41 changes: 41 additions & 0 deletions build/ci/.azure-devops-package-native-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
parameters:
poolName: ''
UNO_UWP_BUILD: ''
XAML_FLAVOR_BUILD: ''

jobs:
- job: skia_package_macos_native_build
displayName: 'Skia macOS Native Binaries'
pool:
vmImage: ${{ parameters.macOSImageName }}

variables:
CombinedConfiguration: Release|Any CPU
CI_Build: true

NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget

# We're building packages on linux, so we need to enable WPF support
EnableWindowsTargeting: true

UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

steps:
- checkout: self
clean: true

- template: templates/download-winui-converted-tree.yml
- template: templates/gitversion.yml

- bash: |
cd $(build.sourcesdirectory)/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac
chmod +x build.sh
./build.sh
displayName: Build Skia macOS native
- task: PublishPipelineArtifact@1
retryCountOnTaskFailure: 3
inputs:
targetPath: $(build.sourcesdirectory)/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/build/Release
artifactName: NugetPackages-Artifacts-skia-macos-native-$(XAML_FLAVOR_BUILD)
42 changes: 42 additions & 0 deletions build/ci/.azure-devops-package-skia-native-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
parameters:
poolName: ''
UNO_UWP_BUILD: ''
XAML_FLAVOR_BUILD: ''
AssetNativeSuffix: ''

jobs:
- job: skia_package_macos_native_build
displayName: 'Skia macOS Native Binaries'
pool:
vmImage: ${{ parameters.macOSImageName }}

variables:
CombinedConfiguration: Release|Any CPU
CI_Build: true

NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget

# We're building packages on linux, so we need to enable WPF support
EnableWindowsTargeting: true

UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

steps:
- checkout: self
clean: true

- template: templates/download-winui-converted-tree.yml
- template: templates/gitversion.yml

- bash: |
cd $(build.sourcesdirectory)/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac
chmod +x build.sh
./build.sh
displayName: Build Skia macOS native
- task: PublishPipelineArtifact@1
retryCountOnTaskFailure: 3
inputs:
targetPath: $(build.sourcesdirectory)/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/build/Release
artifactName: NugetPackages-Artifacts-skia-macos-native${{ parameters.AssetNativeSuffix }}-$(XAML_FLAVOR_BUILD)
41 changes: 5 additions & 36 deletions build/ci/.azure-devops-package-skia.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
parameters:
poolName: ''
UNO_UWP_BUILD: ''
XAML_FLAVOR_BUILD: ''

jobs:
- job: skia_package_macos_native_build
displayName: 'Skia macOS Native Binaries'
pool:
vmImage: ${{ parameters.macOSImageName }}

variables:
CombinedConfiguration: Release|Any CPU
CI_Build: true

NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget

# We're building packages on linux, so we need to enable WPF support
EnableWindowsTargeting: true

UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

steps:
- checkout: self
clean: true

- template: templates/download-winui-converted-tree.yml
- template: templates/gitversion.yml

- bash: |
cd $(build.sourcesdirectory)/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac
chmod +x build.sh
./build.sh
displayName: Build Skia macOS native
- task: PublishPipelineArtifact@1
retryCountOnTaskFailure: 3
inputs:
targetPath: $(build.sourcesdirectory)/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/build/Release
artifactName: NugetPackages-Artifacts-skia-macos-native-$(XAML_FLAVOR_BUILD)
- template: .azure-devops-package-skia-native-assets.yml
parameters:
UNO_UWP_BUILD: '$(UNO_UWP_BUILD)'
XAML_FLAVOR_BUILD: '$(XAML_FLAVOR_BUILD)'
macOSImageName: ${{ parameters.macOSImageName }}

- job: skia_package_build
displayName: 'Skia Package Binaries'
Expand Down
17 changes: 16 additions & 1 deletion build/ci/.azure-devops-skia-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ parameters:
snapshotGroupCount: 3

jobs:
- template: .azure-devops-package-skia-native-assets.yml
parameters:
UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.UNO_UWP_BUILD }}
macOSImageName: ${{ parameters.vmMacImage }}
AssetNativeSuffix: '-SamplesApp'

- job: Skia_Tests_Build
displayName: 'Build Skia Samples App UI Tests'
timeoutInMinutes: 60
dependsOn: skia_package_macos_native_build

pool: ${{ parameters.poolName }}

Expand All @@ -33,7 +41,7 @@ jobs:
UnoDisableNetCurrent: true

UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.UNO_UWP_BUILD }}

steps:
- checkout: self
Expand All @@ -48,6 +56,13 @@ jobs:
parameters:
nugetPackages: $(NUGET_PACKAGES)

## Restore skia-macos native assets
- task: DownloadPipelineArtifact@2
displayName: Restoring macOS native assets
inputs:
artifact: NugetPackages-Artifacts-skia-macos-native-SamplesApp-$(XAML_FLAVOR_BUILD)
path: $(Build.SourcesDirectory)/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/build/Release

- powershell: dotnet msbuild src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj /r /m /p:Configuration=Release /detailedsummary /m /bl:$(build.artifactstagingdirectory)\build-gtk.binlog
displayName: Build GTK Head

Expand Down

0 comments on commit 707ba69

Please sign in to comment.