Skip to content

Commit f81e714

Browse files
authored
Merge branch 'master' into FixToolSetupBat
2 parents 7f06622 + 4ff51f3 commit f81e714

File tree

340 files changed

+15107
-4904
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+15107
-4904
lines changed

.azurepipelines/templates/basetools-build-steps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ parameters:
1010
tool_chain_tag: ''
1111

1212
steps:
13-
- task: CmdLine@1
13+
- task: CmdLine@2
1414
displayName: Build Base Tools from source
1515
inputs:
16-
filename: python
17-
arguments: BaseTools/Edk2ToolsBuild.py -t ${{ parameters.tool_chain_tag }}
16+
script: |
17+
python BaseTools/Edk2ToolsBuild.py -t ${{ parameters.tool_chain_tag }}
1818
condition: and(gt(variables.pkg_count, 0), succeeded())
1919

2020
- task: CopyFiles@2

.azurepipelines/templates/defaults.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
variables:
1111
default_python_version: "3.12"
12-
default_linux_image: "ghcr.io/tianocore/containers/fedora-41-test:4dbfa9e"
12+
default_linux_image: "ghcr.io/tianocore/containers/fedora-43-test:bde74f8"

.azurepipelines/templates/platform-build-run-steps.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,27 +73,27 @@ steps:
7373
condition: eq(variables['Build.Reason'], 'PullRequest')
7474

7575
# trim the package list if this is a PR
76-
- task: CmdLine@1
76+
- task: CmdLine@2
7777
displayName: Check if ${{ parameters.build_pkg }} need testing
7878
inputs:
79-
filename: stuart_pr_eval
80-
arguments: -c ${{ parameters.build_file }} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} --pr-target origin/$(System.PullRequest.targetBranch) --output-count-format-string "##vso[task.setvariable variable=pkg_count;isOutpout=true]{pkgcount}"
79+
script: |
80+
stuart_pr_eval -c ${{ parameters.build_file }} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} --pr-target origin/$(System.PullRequest.targetBranch) --output-count-format-string "##vso[task.setvariable variable=pkg_count;isOutpout=true]{pkgcount}"
8181
condition: eq(variables['Build.Reason'], 'PullRequest')
8282

8383
# Setup repo
84-
- task: CmdLine@1
84+
- task: CmdLine@2
8585
displayName: Setup
8686
inputs:
87-
filename: stuart_setup
88-
arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
87+
script: |
88+
stuart_setup -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
8989
condition: and(gt(variables.pkg_count, 0), succeeded())
9090

9191
# Stuart Update
92-
- task: CmdLine@1
92+
- task: CmdLine@2
9393
displayName: Update
9494
inputs:
95-
filename: stuart_update
96-
arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
95+
script: |
96+
stuart_update -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
9797
condition: and(gt(variables.pkg_count, 0), succeeded())
9898

9999
# build basetools
@@ -107,19 +107,19 @@ steps:
107107
- ${{ parameters.extra_install_step }}
108108

109109
# Build
110-
- task: CmdLine@1
110+
- task: CmdLine@2
111111
displayName: Build
112112
inputs:
113-
filename: stuart_build
114-
arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
113+
script: |
114+
stuart_build -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
115115
condition: and(gt(variables.pkg_count, 0), succeeded())
116116

117117
# Run
118-
- task: CmdLine@1
118+
- task: CmdLine@2
119119
displayName: Run to shell
120120
inputs:
121-
filename: stuart_build
122-
arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{ parameters.run_flags }} --FlashOnly
121+
script: |
122+
stuart_build -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{ parameters.run_flags }} --FlashOnly
123123
condition: and(and(gt(variables.pkg_count, 0), succeeded()), eq(variables['Run'], true))
124124
timeoutInMinutes: 2
125125

.azurepipelines/templates/pr-gate-steps.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,29 @@ steps:
5454
- ${{ parameters.extra_install_step }}
5555

5656
# trim the package list if this is a PR
57-
- task: CmdLine@1
57+
- task: CmdLine@2
5858
displayName: Check if ${{ parameters.build_pkgs }} need testing
5959
inputs:
60-
filename: stuart_pr_eval
61-
arguments: -c .pytool/CISettings.py -p ${{ parameters.build_pkgs }} --pr-target origin/$(System.PullRequest.targetBranch) --output-csv-format-string "##vso[task.setvariable variable=pkgs_to_build;isOutpout=true]{pkgcsv}" --output-count-format-string "##vso[task.setvariable variable=pkg_count;isOutpout=true]{pkgcount}"
60+
script: |
61+
stuart_pr_eval -c .pytool/CISettings.py -p ${{ parameters.build_pkgs }} --pr-target origin/$(System.PullRequest.targetBranch) --output-csv-format-string "##vso[task.setvariable variable=pkgs_to_build;isOutpout=true]{pkgcsv}" --output-count-format-string "##vso[task.setvariable variable=pkg_count;isOutpout=true]{pkgcount}"
6262
condition: eq(variables['Build.Reason'], 'PullRequest')
6363

6464
# install spell check prereqs
6565
- template: spell-check-prereq-steps.yml
6666

6767
# Build repo
68-
- task: CmdLine@1
68+
- task: CmdLine@2
6969
displayName: Setup ${{ parameters.build_pkgs }} ${{ parameters.build_archs}}
7070
inputs:
71-
filename: stuart_setup
72-
arguments: -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}
71+
script: |
72+
stuart_setup -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}
7373
condition: and(gt(variables.pkg_count, 0), succeeded())
7474

75-
- task: CmdLine@1
75+
- task: CmdLine@2
7676
displayName: Update ${{ parameters.build_pkgs }} ${{ parameters.build_archs}}
7777
inputs:
78-
filename: stuart_update
79-
arguments: -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}
78+
script: |
79+
stuart_update -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}
8080
condition: and(gt(variables.pkg_count, 0), succeeded())
8181

8282
# build basetools
@@ -86,11 +86,11 @@ steps:
8686
parameters:
8787
tool_chain_tag: ${{ parameters.tool_chain_tag }}
8888

89-
- task: CmdLine@1
89+
- task: CmdLine@2
9090
displayName: Build and Test ${{ parameters.build_pkgs }} ${{ parameters.build_archs}}
9191
inputs:
92-
filename: stuart_ci_build
93-
arguments: -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}
92+
script: |
93+
stuart_ci_build -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}
9494
condition: and(gt(variables.pkg_count, 0), succeeded())
9595

9696
# Publish Test Results to Azure Pipelines/TFS

.azurepipelines/templates/spell-check-prereq-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ parameters:
1111
none: ''
1212

1313
steps:
14-
- task: NodeTool@0
14+
- task: UseNode@1
1515
inputs:
16-
versionSpec: '14.x'
16+
version: '24.x'
1717
#checkLatest: false # Optional
1818
condition: and(gt(variables.pkg_count, 0), succeeded())
1919

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "ghcr.io/tianocore/containers/fedora-40-dev:latest",
2+
"image": "ghcr.io/tianocore/containers/fedora-43-dev:latest",
33
"postCreateCommand": "git config --global --add safe.directory '*' && pip install --upgrade -r pip-requirements.txt",
44
"customizations": {
55
"vscode": {

.github/scripts/GitHub.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,13 @@ def add_reviewers_to_pr(
232232
repo_collaborators = [c.login.strip().lower() for c in repo_gh.get_collaborators() if c]
233233
non_collaborators = [u for u in user_names if u.lower() not in repo_collaborators]
234234

235-
excluded_pr_reviewers = [pr_author] + current_pr_reviewers + non_collaborators
236-
new_pr_reviewers = [u for u in user_names if u not in excluded_pr_reviewers]
235+
excluded_pr_reviewers = {
236+
e.lower()
237+
for e in [pr_author] + current_pr_reviewers + non_collaborators
238+
}
239+
new_pr_reviewers = [
240+
u for u in user_names if u.lower() not in excluded_pr_reviewers
241+
]
237242

238243
# Notify the admins of the repository if non-collaborators are requested.
239244
if non_collaborators:

.github/workflows/BuildPlatform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161

6262
runs-on: ${{ inputs.runs-on }}
6363
container:
64-
image: ${{ startswith(inputs.runs-on, 'ubuntu') && 'ghcr.io/tianocore/containers/fedora-40-dev:latest' || '' }}
64+
image: ${{ startswith(inputs.runs-on, 'ubuntu') && 'ghcr.io/tianocore/containers/fedora-43-dev:latest' || '' }}
6565

6666
steps:
6767
- name: Checkout

.pytool/Plugin/HostUnitTestCompilerPlugin/HostUnitTestCompilerPlugin.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,19 @@ def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, environment, PLM,
9191
tc.LogStdError("DscPath not found in config file. Nothing to compile for HostBasedUnitTests.")
9292
return -1
9393

94+
if pkgconfig["DscPath"].strip() == "":
95+
tc.SetSkipped()
96+
tc.LogStdError("Package HostBasedUnitTest Dsc not assigned.")
97+
return -1
98+
9499
AP = Edk2pathObj.GetAbsolutePathOnThisSystemFromEdk2RelativePath(packagename)
95100

96101
APDSC = os.path.join(AP, pkgconfig["DscPath"].strip())
97102
AP_Path = Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(APDSC)
98103
if AP is None or AP_Path is None or not os.path.isfile(APDSC):
99-
tc.SetSkipped()
104+
tc.SetFailed("Package HostBasedUnitTest Dsc not found: {0}".format(AP_Path), "FILE_NOT_FOUND")
100105
tc.LogStdError("Package HostBasedUnitTest Dsc not found.")
101-
return -1
106+
return 1
102107

103108
logging.info("Building {0}".format(AP_Path))
104109
self._env.SetValue("ACTIVE_PLATFORM", AP_Path, "Set in Compiler Plugin")

.pytool/Readme.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ per package configuration which comes from this file.
8686

8787
The EDKII Tools environment (and by extension the ci) is designed to support
8888
easily and consistently running locally and in a cloud ci environment. To do
89-
that a few steps should be followed. Details of EDKII Tools can be found in the
90-
[docs folder here](https://github.com/tianocore/edk2-pytool-extensions/tree/master/docs)
89+
that a few steps should be followed. These steps are detailed on the
90+
[How to Build With Stuart](https://github.com/tianocore/tianocore.github.io/wiki/How-to-Build-With-Stuart)
91+
page. Details of EDKII Tools can be found in the
92+
[docs folder here](https://github.com/tianocore/edk2-pytool-extensions/tree/master/docs).
9193

9294
### Running CI
9395

0 commit comments

Comments
 (0)