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
55 changes: 53 additions & 2 deletions .github/workflows/build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ on:
branches:
- main
- net10.0
- net11.0
paths:
- 'workload/**'
- '.github/workflows/build-matrix.yml'
pull_request:
branches:
- main
- net10.0
- net11.0
paths:
- 'workload/**'
- '.github/workflows/build-matrix.yml'
Expand All @@ -37,9 +39,22 @@ jobs:
validate-metadata:
name: Validate workload metadata
runs-on: ubuntu-22.04
outputs:
net11_sdk: ${{ steps.versions.outputs.net11_sdk }}
steps:
- uses: actions/checkout@v3

- name: Resolve .NET 11 SDK version from Versions.props
id: versions
run: |
NET11=$(grep -oP '(?<=<DotNet11SdkVersion>)[^<]+' workload/build/Versions.props)
if [ -z "$NET11" ]; then
echo "::error::DotNet11SdkVersion not found in workload/build/Versions.props"
exit 1
fi
echo "net11_sdk=$NET11" >> "$GITHUB_OUTPUT"
echo "::notice ::.NET 11 SDK for CI: $NET11"

- name: Authenticate GitHub Packages NuGet source
run: |
dotnet nuget update source github \
Expand All @@ -51,10 +66,45 @@ jobs:
- name: Run validate-workload-metadata.py
run: python3 workload/scripts/validate-workload-metadata.py

- name: Run test-matrix.sh --self-test
run: bash workload/scripts/test-matrix.sh --self-test

- name: Run test-version-band.sh
run: bash workload/scripts/test-version-band.sh

- name: Run test-template-conditions.sh
run: bash workload/scripts/test-template-conditions.sh

- name: Run test-package-fallback.sh
run: bash workload/scripts/test-package-fallback.sh

- name: Run test-release-workflow.sh
run: bash workload/scripts/test-release-workflow.sh

- name: Run test-install-failure.sh
run: bash workload/scripts/test-install-failure.sh

test-matrix:
name: Multi-TFM build matrix
name: Multi-TFM build matrix (${{ matrix.name }})
needs: validate-metadata
runs-on: ubuntu-22.04
# The .NET 11 leg BLOCKS by default. The SDK version is pinned exactly
# (DotNet11SdkVersion), so the leg is deterministic - and a branch whose purpose is
# .NET 11 support gains nothing from an advisory-only .NET 11 gate.
#
# Set the repository variable TIZEN_NET11_ADVISORY=true to temporarily downgrade it,
# e.g. while chasing an upstream preview-SDK regression.
continue-on-error: ${{ matrix.experimental && vars.TIZEN_NET11_ADVISORY == 'true' }}
strategy:
fail-fast: false
matrix:
include:
- name: .NET 10
dotnet_version: ''
experimental: false
- name: .NET 11 preview
dotnet_version: ${{ needs.validate-metadata.outputs.net11_sdk }}
experimental: true
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -71,14 +121,15 @@ jobs:
- name: Run make test-matrix
env:
PULLREQUEST_ID: ${{ github.event.number }}
DOTNET_VERSION: ${{ matrix.dotnet_version }}
working-directory: ./workload
run: make test-matrix

- name: Upload matrix logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-matrix-logs
name: test-matrix-logs-${{ matrix.name }}
path: |
workload/.tmp/matrix/**/build.log
workload/.tmp/matrix/**/dotnet-new.log
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/build-workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ on:
branches:
- main
- net10.0
- net11.0
paths:
- 'workload/**'
- '.github/workflows/**'
pull_request:
branches:
- main
- net10.0
- net11.0
paths:
- 'workload/**'
- '.github/workflows/**'
Expand Down Expand Up @@ -41,10 +43,31 @@ jobs:
--store-password-in-clear-text \
--configfile workload/NuGet.config

# On a net11.0 branch (or a PR into one) .NET 11 is the product being built, so the
# workload must be built against the .NET 11 SDK rather than the Versions.props
# default. DotNet11SdkVersion in Versions.props is the single source of truth.
- name: Select target SDK band
id: sdk
run: |
TARGET_BRANCH="${{ github.base_ref || github.ref_name }}"
if [ "$TARGET_BRANCH" = "net11.0" ]; then
NET11=$(grep -oP '(?<=<DotNet11SdkVersion>)[^<]+' workload/build/Versions.props)
if [ -z "$NET11" ]; then
echo "::error::DotNet11SdkVersion not found in workload/build/Versions.props"
exit 1
fi
echo "dotnet_version=$NET11" >> "$GITHUB_OUTPUT"
echo "::notice ::Branch '$TARGET_BRANCH' builds against .NET 11 SDK $NET11"
else
echo "dotnet_version=" >> "$GITHUB_OUTPUT"
echo "::notice ::Branch '$TARGET_BRANCH' builds against the Versions.props default SDK band"
fi

- name: Build
env:
PULLREQUEST_ID: ${{ github.event.number }}
PRERELEASE_TAG: ${{ github.event.inputs.prerelease }}
DOTNET_VERSION: ${{ steps.sdk.outputs.dotnet_version }}
run: make test
working-directory: ./workload

Expand Down
Loading
Loading