diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cb9a4d79..2b35af1e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,7 +76,22 @@ 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/configure-pagefile-action@v1.4 with: minimum-size: 32GB @@ -84,7 +99,7 @@ jobs: 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 @@ -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 @@ -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 @@ -362,4 +366,4 @@ jobs: if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} with: name: linux-logs - path: ./**/*.*log \ No newline at end of file + path: ./**/*.*log diff --git a/tooling b/tooling index f31a5e488..b9200002f 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit f31a5e4885ea6d17b66de1f315f7589ccf53299e +Subproject commit b9200002f4c6f4c479785bf014f928a4506b79a9