diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5fa9d560..0e0fa1895 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -582,12 +582,6 @@ jobs: - name: Determine whether the Windows app needs to be built id: affected uses: ./.github/actions/affected - - name: Install Windows App SDK - if: ${{ steps.affected.outputs.windows != '' }} - uses: ./.github/actions/setup-windows-app-sdk - with: - solution: Example.sln - working-directory: packages/app/example/windows - name: Build id: build if: ${{ steps.affected.outputs.windows != '' }} @@ -599,25 +593,20 @@ jobs: } working-directory: packages/app/example continue-on-error: true - - name: Build (2nd attempt) + - name: Set build status if: ${{ steps.affected.outputs.windows != '' && steps.build.outcome != 'success' }} run: | - if ("${{ matrix.configuration }}" -eq "Release") { - yarn ci:windows --release --arch ${{ matrix.platform }} - } else { - yarn ci:windows --arch ${{ matrix.platform }} - } - working-directory: packages/app/example + echo "result=failed" >> "$GITHUB_OUTPUT" - name: Upload build logs - if: ${{ steps.affected.outputs.windows != '' && failure() }} + if: ${{ steps.affected.outputs.windows != '' && steps.build.outcome != 'success' }} uses: actions/upload-artifact@v6 with: name: windows-msbuild.binlog path: packages/app/example/windows/*.binlog - if-no-files-found: error retention-days: 14 + overwrite: true - name: Test - if: ${{ steps.affected.outputs.windows != '' && matrix.platform == 'x64' }} + if: ${{ steps.affected.outputs.windows != '' && matrix.platform == 'x64' && steps.build.outcome == 'success' }} run: | ../../../scripts/build/MSBuild.ps1 -Configuration ${{ matrix.configuration }} -Platform ${{ matrix.platform }} -Target Build ReactAppTests.vcxproj ../../../scripts/build/VSTest.ps1 ${{ matrix.platform }}\${{ matrix.configuration }}\ReactAppTests.dll @@ -657,12 +646,6 @@ jobs: - name: Determine whether the Windows app needs to be built id: affected uses: ./.github/actions/affected - - name: Install Windows App SDK - if: ${{ steps.affected.outputs.windows != '' }} - uses: ./.github/actions/setup-windows-app-sdk - with: - solution: TemplateExample.sln - working-directory: template-example/windows - name: Build id: build if: ${{ steps.affected.outputs.windows != '' }} @@ -670,20 +653,38 @@ jobs: yarn windows --logging --no-packager --no-launch --no-deploy working-directory: template-example continue-on-error: true - - name: Build (2nd attempt) + - name: Set build status if: ${{ steps.affected.outputs.windows != '' && steps.build.outcome != 'success' }} run: | - yarn windows --logging --no-packager --no-launch --no-deploy - working-directory: packages/app/example + echo "result=failed" >> "$GITHUB_OUTPUT" - name: Upload build logs - if: ${{ steps.affected.outputs.windows != '' && failure() }} + if: ${{ steps.affected.outputs.windows != '' && steps.build.outcome != 'success' }} uses: actions/upload-artifact@v6 with: name: windows-template-msbuild.binlog path: template-example/windows/*.binlog - if-no-files-found: error retention-days: 14 + overwrite: true timeout-minutes: 60 + windows-result: + name: "Windows [result]" + permissions: {} + runs-on: ubuntu-24.04 + if: ${{ github.event_name != 'schedule' }} + needs: + - windows + - windows-template + steps: + - name: Results + run: | + echo '${{ toJSON(needs.windows.outputs) }}' + echo '${{ toJSON(needs.windows-template.outputs) }}' + - name: Warn if Windows builds failed + if: ${{ needs.windows.outputs.result == 'failed' || needs.windows-template.outputs.result == 'failed' }} + run: | + echo "::warning::One or more Windows build jobs failed. This is non-blocking but should be investigated." + echo "Windows build result: ${{ needs.windows.outputs.result }}" + echo "Windows template build result: ${{ needs.windows-template.outputs.result }}" release: permissions: contents: write # create releases (Nx Release) @@ -696,8 +697,7 @@ jobs: - android-template - macos - macos-template - - windows - - windows-template + - windows-result runs-on: ubuntu-24.04 if: ${{ github.event_name != 'schedule' }} steps: