Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions .github/workflows/azure-static-web-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

jobs:
build_and_deploy_job:
env:
DIST_PATH: samples/WinUI.TableView.SampleApp.Uno/bin/Release/net10.0-browserwasm/publish/wwwroot
DotnetVersion: '10.0.100'
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
container: 'unoplatform/wasm-build:3.0'
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false

# When running on macos, set the DOTNET_INSTALL_DIR so a workspace local folder
# is used to install the SDK. This is required for the Uno.Sdk.Updater to work
- name: Set DOTNET_INSTALL_DIR
if: runner.os == 'macos' || runner.os == 'linux'
shell: bash
run: echo "DOTNET_INSTALL_DIR=$GITHUB_WORKSPACE/.dotnet" >> $GITHUB_ENV

- name: 'Set Wasm cache path'
shell: pwsh
run: echo "WasmCachePath=${{ github.workspace }}/.emscripten-cache" >> $env:GITHUB_ENV

- name: Cache EMSDK
id: cache-emsdk
uses: actions/cache@v4
env:
cache-name: cache-emsdk-modules
with:
path: ${{ env.WasmCachePath }}
key: ${{ runner.os }}-build-emsdk-${{ env.ValidationUnoCheckVersion }}
restore-keys: |
${{ runner.os }}-build-emsdk-${{ env.ValidationUnoCheckVersion }}

- name: Cache .NET
id: cache-dotnet
uses: actions/cache@v4
env:
cache-name: cache-dotnet-install
with:
path: ${{ github.workspace }}/.dotnet
key: ${{ runner.os }}-build-dotnet-${{ env.DotnetVersion }}
restore-keys: |
${{ runner.os }}-build-dotnet-${{ env.DotnetVersion }}

- name: Setup .NET
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DotnetVersion }}

- uses: dotnet/nbgv@f088059084cb5d872e9d1a994433ca6440c2bf72 # v0.4.2
id: nbgv
with:
toolVersion: 3.6.139
setAllVars: true

- run: |
cd samples/WinUI.TableView.SampleApp.Uno
dotnet workload restore
name: Setup Workloads

- run: |
cd samples/WinUI.TableView.SampleApp.Uno
dotnet workload install wasm-tools
name: Setup Workloads

- run: |
cd samples/WinUI.TableView.SampleApp.Uno
dotnet publish -c Release -f net10.0-browserwasm "/p:PackageVersion=${{ steps.nbgv.outputs.SemVer2 }}" /p:EnableWindowsTargeting=true /bl:../binlogs/output.binlog
name: Build Uno Wasm App

- uses: actions/upload-artifact@v4
with:
name: wasm-site
path: ${{ env.DIST_PATH }}

- uses: actions/upload-artifact@v4
with:
name: logs
path: binlogs

- name: Build And Deploy
id: builddeploy
continue-on-error: true
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_LIVELY_GROUND_0D0F6A810 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "${{ env.DIST_PATH }}" # App source code path
api_location: "" # Api source code path - optional
output_location: "" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_LIVELY_GROUND_0D0F6A810 }}
action: "close"


4 changes: 2 additions & 2 deletions .github/workflows/cd-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: windows-2022
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
Expand All @@ -18,7 +18,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x
10.0.100

- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/ci-build-samples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci-build-samples

on:
push:
branches: main
paths-ignore:
- 'docs/**'

pull_request:
branches: main
paths-ignore:
- 'docs/**'

jobs:
build:
runs-on: windows-latest

strategy:
matrix:
architecture: [x86, x64, ARM64]

steps:
- name: Checkout
uses: actions/checkout@v4.1.4
with:
submodules: recursive

- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: |
8.0.x
9.0.x
10.0.100

- name: Build
run: |
msbuild /restore samples/WinUI.TableView.SampleApp/WinUI.TableView.SampleApp.csproj /p:Configuration=Release /p:Platform=${{ matrix.architecture }}
9 changes: 5 additions & 4 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ on:
branches: main
paths-ignore:
- 'docs/**'
- 'samples/**'
pull_request:
branches: main
paths-ignore:
- 'docs/**'
- 'samples/**'

jobs:
build:
runs-on: windows-2022
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
Expand All @@ -26,8 +28,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x

10.0.100
- name: Build
run: |
msbuild /restore `
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:

publish:
needs: build
runs-on: windows-2022
runs-on: windows-latest
environment: ci-nuget-publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ name: ci-docs
on:
push:
branches: main
paths-ignore:
- 'samples/**'

jobs:
build:
runs-on: windows-2022
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
Expand All @@ -17,7 +19,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x
10.0.100

- name: Install DocFX
run: dotnet tool update -g docfx
Expand Down
7 changes: 7 additions & 0 deletions WinUI.TableView.slnx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<Solution>
<Folder Name="/samples/">
<Project Path="samples/WinUI.TableView.SampleApp.Uno/WinUI.TableView.SampleApp.Uno.csproj" />
<Project Path="samples/WinUI.TableView.SampleApp/WinUI.TableView.SampleApp.csproj">
<Platform Project="x64" />
<Deploy />
</Project>
</Folder>
<Project Path="src/WinUI.TableView.csproj" />
<Project Path="tests/WinUI.TableView.Tests.csproj">
<Platform Project="x64" />
Expand Down
10 changes: 10 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"msbuild-sdks": {
"Uno.Sdk": "6.4.53"
},
"sdk": {
"version": "10.0.100",
"rollForward": "patch",
"allowPrerelease": false
}
}
18 changes: 18 additions & 0 deletions samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>
<PropertyGroup>
<NetVersion>net10.0</NetVersion>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>WinUI.TableView.SampleApp</RootNamespace>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<!--
Adding NoWarn to remove build warnings
NU1507: Warning when there are multiple package sources when using CPM with no source mapping
NETSDK1201: Warning that specifying RID won't create self containing app
PRI257: Ignore default language (en) not being one of the included resources (eg en-us, en-uk)
-->
<NoWarn>$(NoWarn);NU1507;NETSDK1201;PRI257</NoWarn>
</PropertyGroup>
</Project>
12 changes: 12 additions & 0 deletions samples/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project ToolsVersion="15.0">
<ItemGroup>
<PackageVersion Include="ColorCode.WinUI" Version="2.0.15" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageVersion Include="CommunityToolkit.WinUI.Controls.ColorPicker" Version="8.1.240916" />
<PackageVersion Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.1.240916" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="9.0.4" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.6.250108002" />
<PackageVersion Include="ClosedXML" Version="0.105.0" />
<PackageVersion Include="WinUIEx" Version="2.6.0" />
</ItemGroup>
</Project>
42 changes: 42 additions & 0 deletions samples/WinUI.TableView.SampleApp.Uno/Assets/Icons/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading