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
40 changes: 22 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,30 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Get changed components
run: |
$changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }})
$buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }})
echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV
echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV

- name: Configure Pagefile
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
uses: al-cheb/[email protected]
with:
minimum-size: 32GB
maximum-size: 32GB
disk-root: "C:"

- name: Enable User-Mode Dumps collecting
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '' }}
if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
shell: powershell
run: |
New-Item '${{ github.workspace }}\CrashDumps' -Type Directory
Expand All @@ -93,27 +108,22 @@ jobs:
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpType' -Type DWord -Value '2'

- name: Install .NET SDK v${{ env.DOTNET_VERSION }}
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: .NET Info (if diagnostics)
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
run: dotnet --info

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

# Restore Tools from Manifest list in the Repository
- name: Restore dotnet tools
if: ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
run: dotnet tool restore

- name: Run Uno Check to Install Dependencies
if: ${{ matrix.multitarget != 'wasdk' && matrix.multitarget != 'linuxgtk' && matrix.multitarget != 'wpf' }}
if: ${{ matrix.multitarget != 'wasdk' && matrix.multitarget != 'linuxgtk' && matrix.multitarget != 'wpf' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
run: >
dotnet tool run uno-check
--ci
Expand All @@ -127,15 +137,9 @@ jobs:

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
if: ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
with:
vs-version: '[17.9,)'
# Get changed components
- name: Get changed components
run: |
$changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }})
$buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }})
echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV
echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV

# Generate full solution with all projects (sample gallery heads, components, tests)
- name: Generate solution with ${{ matrix.multitarget }} gallery, components and tests
Expand Down Expand Up @@ -362,4 +366,4 @@ jobs:
if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
with:
name: linux-logs
path: ./**/*.*log
path: ./**/*.*log
2 changes: 1 addition & 1 deletion tooling
Loading