Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to .NET 7, enable WASM optimizations #485

Merged
merged 46 commits into from
Oct 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2aefbab
Upgraded to net7.0 and Uno 5 previews
Arlodotexe Jul 20, 2023
8e6316b
Update tooling
Arlodotexe Jul 20, 2023
d1eaf0c
Fixes for build errors
Arlodotexe Jul 20, 2023
c4558aa
Remove problematic empty sample project
Arlodotexe Jul 20, 2023
137324e
Update tooling
Arlodotexe Jul 20, 2023
be4533c
Update tooling to latest
Arlodotexe Jul 20, 2023
0404035
Update tooling
Arlodotexe Jul 20, 2023
69076df
Update editorconfig
Arlodotexe Jul 20, 2023
a86ff82
Update tooling
Arlodotexe Jul 20, 2023
71fb6d5
Set CA2213 to 'None'
Arlodotexe Jul 21, 2023
e88f5a5
Set CA1001 to 'none'
Arlodotexe Jul 21, 2023
4f0bf98
Update tooling
Arlodotexe Jul 21, 2023
68b7695
Fixed invalid XML comments
Arlodotexe Jul 21, 2023
586f641
Fixed invalid XML comments
Arlodotexe Jul 21, 2023
c5b7ca9
Fixed invalid xml doc param name
Arlodotexe Jul 21, 2023
fa095c7
Disable CS1572 in Labs
Arlodotexe Jul 21, 2023
d3ffaad
Update tooling
Arlodotexe Jul 21, 2023
9e08feb
Update tooling
Arlodotexe Jul 22, 2023
ea7e063
Update uno-check
Arlodotexe Jul 24, 2023
5b36a64
Update uno-check version
Arlodotexe Jul 24, 2023
7022eeb
Update tooling
Arlodotexe Jul 24, 2023
9e33753
Skip vswinworkloads in uno-check
Arlodotexe Jul 24, 2023
c66fb18
Update tooling repo
Arlodotexe Aug 1, 2023
1210368
Update tooling repo
Arlodotexe Aug 2, 2023
07f5f4b
Update tooling submodule
Arlodotexe Aug 2, 2023
cdb7c15
Update tooling submodule
Arlodotexe Aug 9, 2023
14fbe03
Merge branch 'main' into upgrade/net7
Arlodotexe Aug 9, 2023
f228ad6
Updated tooling to latest main
Arlodotexe Aug 18, 2023
4d89f42
Use .NET 7.0.100
Arlodotexe Aug 18, 2023
cced9d7
Use dotnet 7.0.100 in CI
Arlodotexe Aug 18, 2023
9ca1733
Suppress Uno0001
Arlodotexe Aug 18, 2023
52efbfd
Restore removed files
Arlodotexe Aug 18, 2023
90d29de
Bump uno-check to latest version
Arlodotexe Oct 2, 2023
10ec55b
Bump tooling to latest main
Arlodotexe Oct 2, 2023
d58e1cb
Remove CS1572 suppression
Arlodotexe Oct 2, 2023
5a246f3
Merge branch 'main' into upgrade/net7
Arlodotexe Oct 2, 2023
92b30f5
Update tooling to test fix
Arlodotexe Oct 3, 2023
b36f42a
Update .editorconfig
Arlodotexe Oct 3, 2023
28e80c9
Fixes issues with the build script in detecting dump files to upload …
Arlodotexe Oct 3, 2023
a964b90
Include component icons as library assets
Arlodotexe Oct 3, 2023
979aebf
Porting build.yml changes made in main repo
Arlodotexe Oct 3, 2023
4c6637f
Cleanup release steps
Arlodotexe Oct 12, 2023
77f997d
Restore pushing to LabsFeed
Arlodotexe Oct 12, 2023
cee0351
Fixed date versioning for PRs
Arlodotexe Oct 23, 2023
3122ae2
Bump uno-check
Arlodotexe Oct 23, 2023
dda9f2c
Update tooling to latest main
Arlodotexe Oct 24, 2023
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
66 changes: 51 additions & 15 deletions .github/workflows/build.yml
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -14,18 +14,24 @@ on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
merge_group:

env:
DOTNET_VERSION: ${{ '7.0.100' }}
ENABLE_DIAGNOSTICS: false
#COREHOST_TRACE: 1
MSBUILD_VERBOSITY: normal
COREHOST_TRACEFILE: corehosttrace.log
IS_MAIN: ${{ github.ref == 'refs/heads/main' }}
IS_PR: ${{ startsWith(github.ref, 'refs/pull/') }}
# Labs components are finalized and released via the CommunityToolkit/Windows repo, not here.
IS_RELEASE: false

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "Xaml-Style-Check"
Xaml-Style-Check:
runs-on: windows-latest
runs-on: windows-latest-large

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
@@ -61,8 +67,9 @@ jobs:
env:
MULTI_TARGET_DIRECTORY: tooling/MultiTarget
# faux-ternary expression to select which platforms to build for each platform vs. duplicating step below.
TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI3' && 'all' || 'all-uwp' }}
TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI3' && 'all-wasdk' || 'all-uwp' }}
TEST_PLATFORM: ${{ matrix.platform != 'WinUI3' && 'UWP' || 'WinAppSdk' }}
VERSION_PROPERTY: ${{ github.ref == 'refs/heads/main' && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
@@ -102,7 +109,15 @@ jobs:
run: dotnet tool restore

- name: Run Uno Check to Install Dependencies
run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator --skip vswinworkloads --verbose
run: >
dotnet tool run uno-check
--ci
--fix
--non-interactive
--skip wsl
--skip androidemulator
--skip vswinworkloads
--verbose

- name: Add msbuild to PATH
uses: microsoft/[email protected]
@@ -116,13 +131,34 @@ jobs:
run: powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -IncludeHeads ${{ env.TEST_PLATFORM }}${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}" -ErrorAction Stop

- name: Enable Uno.WinUI (in WinUI3 matrix only)
if: ${{ matrix.platform == 'WinUI3' }}
working-directory: ./${{ env.MULTI_TARGET_DIRECTORY }}
run: powershell -version 5.1 -command "./UseUnoWinUI.ps1 3" -ErrorAction Stop
if: ${{ matrix.platform == 'WinUI3' }}

- name: Format Date/Time of Commit for Package Version
if: ${{ env.IS_RELEASE == 'false' }}
run: |
echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_ENV
# Semver regex: https://regex101.com/r/Ly7O1x/3/
- name: Format Date/Time of Release Package Version
if: ${{ env.IS_RELEASE == 'true' }}
run: |
$ref = "${{ github.ref }}"
$ref -match "^refs/heads/rel/(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"
echo "VERSION_DATE=$($matches['patch'])" >> $env:GITHUB_ENV
echo "VERSION_PROPERTY=$($matches['prerelease'])" >> $env:GITHUB_ENV
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved

- name: MSBuild (With diagnostics)
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release /bl -v:diag
run: >
msbuild.exe /restore /nowarn:MSB4011
/p:Configuration=Release
/m
/p:DateForVersion=${{ env.VERSION_DATE }}
/p:PreviewVersion=${{ env.VERSION_PROPERTY }}
${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }}
/v:${{ env.MSBUILD_VERBOSITY }}
CommunityToolkit.AllComponents.sln

- name: MSBuild
if: ${{ env.ENABLE_DIAGNOSTICS == 'false' }}
@@ -131,16 +167,16 @@ jobs:
# Build All Packages
- name: pack experiments
working-directory: ./tooling/Scripts/
run: ./PackEachExperiment.ps1 all

# Push Packages to our DevOps Artifacts Feed
- name: Add source
if: ${{ github.ref == 'refs/heads/main' }}
run: dotnet nuget update source LabsFeed --username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }}
Comment on lines -137 to -140
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Arlodotexe this is still needed in between the added PR step and the 'Push packages' still. This is why main is failing, as the source isn't updated to include the token.


- name: Push packages
if: ${{ github.ref == 'refs/heads/main' }}
run: dotnet nuget push "**/*.nupkg" --api-key dummy --source LabsFeed --skip-duplicate
run: ./PackEachExperiment.ps1 -extraBuildProperties "${{ env.VERSION_PROPERTY }}"
# Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config)
- name: Push Pull Request Packages (if not fork)
if: ${{ env.IS_PR == 'true' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
run: |
dotnet nuget add source https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-PullRequests/nuget/v3/index.json `
--name PullRequests `
--username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }}
dotnet nuget push "**/*.nupkg" --api-key dummy --source PullRequests --skip-duplicate
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved

# Run tests
- name: Setup VSTest Path