Skip to content

Commit 21d5686

Browse files
Merge pull request #1358 from microsoft/main
FI main to develop
2 parents 77d8f2d + 925b258 commit 21d5686

122 files changed

Lines changed: 38267 additions & 3 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
# Windows Implementation Library submodule
1111
/wil/ @microsoft/driver-samples-maintainers
1212

13+
# Samples
14+
1315
# Audio
1416
/audio/ @microsoft/windowsaudio
1517

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Issue with a sample
2+
description: Report a problem you have with a specific sample.
3+
title: '[path/to/sample]: '
4+
body:
5+
- type: dropdown
6+
id: sample_area
7+
attributes:
8+
label: Which is the area where the sample lives?
9+
description: Select the area where you're experiencing the problem.
10+
options:
11+
- /TrEE/
12+
- /audio/
13+
- /avstream/
14+
- /bluetooth/
15+
- /filesys/cdfs/
16+
- /filesys/fastfat/
17+
- /filesys/miniFilter/
18+
- /general/DCHU/
19+
- /general/PLX9x5x/
20+
- /general/SimpleMediaSource/
21+
- /general/SystemDma/
22+
- /general/cancel/
23+
- /general/echo/
24+
- /general/event/
25+
- /general/ioctl/
26+
- /general/pcidrv/
27+
- /general/perfcounters/
28+
- /general/registry/
29+
- /general/toaster/
30+
- /general/tracing/
31+
- /gnss/
32+
- /gpio/
33+
- /hid/
34+
- /input/
35+
- /network/config/
36+
- /network/modem/
37+
- /network/ndis/
38+
- /network/radio/
39+
- /network/trans/
40+
- /network/wlan/
41+
- /network/wsk/
42+
- /network/wwan/
43+
- /nfc/
44+
- /pofx/PEP/
45+
- /pofx/UMDF2/
46+
- /pofx/WDF/
47+
- /pos/
48+
- /powerlimit/
49+
- /print/
50+
- /prm/
51+
- /sd/
52+
- /security/
53+
- /sensors/
54+
- /serial/
55+
- /setup/
56+
- /simbatt/
57+
- /smartcrd/
58+
- /spb/
59+
- /storage/
60+
- /thermal/
61+
- /tools/
62+
- /usb/
63+
- /video/
64+
- /wia/
65+
- /wmi/wmiacpi/
66+
- /wmi/wmisamp/
67+
validations:
68+
required: true
69+
- type: textarea
70+
id: description
71+
attributes:
72+
label: Describe the issue
73+
description: Provide a clear and concise description of what the issue is.
74+
validations:
75+
required: true
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import yaml
2+
import os
3+
4+
# Read the CODEOWNERS file
5+
codeowners_path = os.path.join(os.path.dirname(__file__), "..", "CODEOWNERS")
6+
with open(codeowners_path, "r") as file:
7+
lines = file.readlines()
8+
9+
# Parse the CODEOWNERS file to extract areas and their paths
10+
areas = []
11+
sample_section_found = False
12+
13+
for line in lines:
14+
line = line.strip()
15+
if line.startswith("# Samples"):
16+
sample_section_found = True
17+
continue
18+
19+
if sample_section_found:
20+
if line.startswith("#"):
21+
continue
22+
elif line:
23+
path, codeowner = line.split()
24+
if path in areas:
25+
raise ValueError(f"Path:{path} has been found two times inside CODEOWNERS file")
26+
areas.append(path)
27+
28+
29+
# Sort the areas in lexicographical order
30+
areas = sorted(areas)
31+
32+
# Generate the YAML structure
33+
yaml_form = {
34+
"name": "Issue with a sample",
35+
"description": "Report a problem you have with a specific sample.",
36+
"title": "[path/to/sample]: ",
37+
"body": []
38+
}
39+
40+
dropdown = {
41+
"type": "dropdown",
42+
"id": "sample_area",
43+
"attributes": {
44+
"label": "Which is the area where the sample lives?",
45+
"description": "Select the area where you're experiencing the problem.",
46+
"options": areas
47+
},
48+
"validations": {
49+
"required": True
50+
}
51+
}
52+
53+
# Add a description field
54+
description_field = {
55+
"type": "textarea",
56+
"id": "description",
57+
"attributes": {
58+
"label": "Describe the issue",
59+
"description": "Provide a clear and concise description of what the issue is."
60+
},
61+
"validations": {
62+
"required": True
63+
}
64+
}
65+
66+
yaml_form["body"].append(dropdown)
67+
yaml_form["body"].append(description_field)
68+
69+
# Write the YAML to a file
70+
output_path = os.path.join(os.path.dirname(__file__), "sample_issue.yml")
71+
with open(output_path, "w") as outfile:
72+
yaml.dump(yaml_form, outfile, sort_keys=False)

.github/workflows/StaleIssues.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Close inactive issues
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
close-issues:
6+
runs-on: ubuntu-latest
7+
permissions:
8+
issues: write
9+
steps:
10+
- uses: actions/stale@v10
11+
with:
12+
days-before-issue-stale: 365
13+
stale-issue-label: "stale"
14+
stale-issue-message: "This issue has been inactive for a year. It will be closed in 31 days if no further activity occurs. If you believe this issue is still relevant, please comment to keep it open."
15+
operations-per-run: 400
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Check Sample Issue Template
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/CODEOWNERS'
7+
- '.github/ISSUE_TEMPLATE/sample_issue.yml'
8+
- '.github/ISSUE_TEMPLATE/sample_issue_generator.py'
9+
10+
11+
jobs:
12+
generate-template:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.x'
23+
24+
- name: Install dependencies
25+
run: pip install pyyaml
26+
27+
- name: Run the generator script
28+
run: python .github/ISSUE_TEMPLATE/sample_issue_generator.py
29+
30+
- name: Check for discrepancies
31+
run: |
32+
if git diff --quiet .github/ISSUE_TEMPLATE/sample_issue.yml; then
33+
echo "✅ No discrepancies found. The sample issue template is up to date."
34+
else
35+
echo "❌ Discrepancy detected!"
36+
echo "The CODEOWNERS file was modified, but the sample issue template is not up to date."
37+
echo ""
38+
echo "Please regenerate the sample issue template by running:"
39+
echo " python .github/ISSUE_TEMPLATE/sample_issue_generator.py"
40+
echo ""
41+
echo "Or manually update it."
42+
echo ""
43+
echo "Then commit both files together:"
44+
echo " git add .github/CODEOWNERS .github/ISSUE_TEMPLATE/sample_issue.yml"
45+
echo " git commit -m 'Update CODEOWNERS and regenerate sample issue template'"
46+
echo ""
47+
echo "Differences found:"
48+
git diff .github/ISSUE_TEMPLATE/sample_issue.yml
49+
exit 1
50+
fi
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Tag Codeowner on Sample Issue
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
tag-codeowner:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Install dependencies
21+
run: pip install pyyaml requests
22+
23+
- name: Extract selected path and tag codeowner
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
ISSUE_BODY: ${{ github.event.issue.body }}
27+
ISSUE_NUMBER: ${{ github.event.issue.number }}
28+
run: |
29+
python3 - <<EOF
30+
import os
31+
import re
32+
import requests
33+
34+
issue_body = os.environ['ISSUE_BODY']
35+
selected_path = None
36+
37+
# Try to extract the selected path from the issue body
38+
match = re.search(r'### Which is the area where the sample lives\?\s*\n(.+)', issue_body, re.MULTILINE)
39+
if match:
40+
selected_path = match.group(1).strip()
41+
42+
if not selected_path:
43+
print("No sample path found in issue body.")
44+
exit(0)
45+
46+
# Read CODEOWNERS
47+
with open(".github/CODEOWNERS", "r") as f:
48+
lines = f.readlines()
49+
50+
codeowner = None
51+
sample_section = False
52+
for line in lines:
53+
line = line.strip()
54+
if line.startswith("# Samples"):
55+
sample_section = True
56+
continue
57+
if sample_section:
58+
if line.startswith("#") or not line:
59+
continue
60+
path, owner = line.split()
61+
if path == selected_path:
62+
codeowner = owner
63+
break
64+
65+
if codeowner is None:
66+
print(f"No codeowner found for path: {selected_path}")
67+
exit(0)
68+
69+
# Post a comment tagging the owner
70+
comment = f"{codeowner} can you please take a look at this issue related to {selected_path}?"
71+
repo = os.environ['GITHUB_REPOSITORY']
72+
token = os.environ['GITHUB_TOKEN']
73+
issue_number = os.environ['ISSUE_NUMBER']
74+
75+
url = f"https://api.github.com/repos/{repo}/issues/{issue_number}/comments"
76+
headers = {
77+
"Authorization": f"Bearer {token}",
78+
"Accept": "application/vnd.github.v3+json"
79+
}
80+
response = requests.post(url, headers=headers, json={"body": comment})
81+
print("Comment posted:", response.status_code, response.text)
82+
EOF

Build-AllSamples.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ param(
4040
[string[]]$Configurations = @(if ([string]::IsNullOrEmpty($env:WDS_Configuration)) { ('Debug', 'Release') } else { $env:WDS_Configuration }),
4141
[string[]]$Platforms = @(if ([string]::IsNullOrEmpty($env:WDS_Platform)) { ('x64', 'arm64') } else { $env:WDS_Platform }),
4242
[string]$LogFilesDirectory = (Join-Path (Get-Location) "_logs"),
43+
[string]$InfOptions = "",
4344
[int]$ThrottleLimit
4445
)
4546

@@ -68,4 +69,4 @@ foreach ($file in $solutionFiles) {
6869
}
6970
}
7071

71-
.\Build-SampleSet -SampleSet $sampleSet -Configurations $Configurations -Platform $Platforms -LogFilesDirectory $LogFilesDirectory -Verbose:$Verbose -ThrottleLimit $ThrottleLimit
72+
.\Build-SampleSet -SampleSet $sampleSet -Configurations $Configurations -Platform $Platforms -LogFilesDirectory $LogFilesDirectory -Verbose:$Verbose -ThrottleLimit $ThrottleLimit -InfOptions $InfOptions

Build-SampleSet.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ param(
55
[string[]]$Platforms = @(if ([string]::IsNullOrEmpty($env:WDS_Platform)) { "x64" } else { $env:WDS_Platform }),
66
$LogFilesDirectory = (Get-Location),
77
[string]$ReportFileName = $(if ([string]::IsNullOrEmpty($env:WDS_ReportFileName)) { "_overview" } else { $env:WDS_ReportFileName }),
8+
[string]$InfOptions = "",
89
[int]$ThrottleLimit = 0
910
)
1011

1112
$root = Get-Location
1213

1314
# launch developer powershell (if necessary to prevent multiple developer sessions)
1415
if (-not $env:VSCMD_VER) {
15-
Import-Module (Resolve-Path "$env:ProgramFiles\Microsoft Visual Studio\2022\*\Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
16-
Enter-VsDevShell -VsInstallPath (Resolve-Path "$env:ProgramFiles\Microsoft Visual Studio\2022\*")
16+
Import-Module (Resolve-Path "$env:ProgramFiles\Microsoft Visual Studio\*\*\Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
17+
Enter-VsDevShell -VsInstallPath (Resolve-Path "$env:ProgramFiles\Microsoft Visual Studio\*\*")
1718
Set-Location $root
1819
}
1920

@@ -135,6 +136,11 @@ if ($build_environment -match '^EWDK') {
135136
#
136137
$InfVerif_AdditionalOptions=($build_number -le 22621 ? "/sw1284 /sw1285 /sw1293 /sw2083 /sw2086" : "/samples")
137138

139+
# Override InfVerif_AdditionalOptions if InfOptions parameter was provided
140+
if (-not [string]::IsNullOrEmpty($InfOptions)) {
141+
$InfVerif_AdditionalOptions = $InfOptions
142+
}
143+
138144
#
139145
# Determine exclusions.
140146
#
149 KB
Binary file not shown.

audio/SoundWire/LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
The Microsoft Public License (MS-PL)
2+
Copyright (c) 2015 Microsoft
3+
4+
This license governs use of the accompanying software. If you use the software, you
5+
accept this license. If you do not accept the license, do not use the software.
6+
7+
1. Definitions
8+
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the
9+
same meaning here as under U.S. copyright law.
10+
A "contribution" is the original software, or any additions or changes to the software.
11+
A "contributor" is any person that distributes its contribution under this license.
12+
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
13+
14+
2. Grant of Rights
15+
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
16+
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
17+
18+
3. Conditions and Limitations
19+
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
20+
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
21+
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
22+
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
23+
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

0 commit comments

Comments
 (0)