Skip to content
Open
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
14 changes: 0 additions & 14 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
"version": 1,
"isRoot": true,
"tools": {
"powershell": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is helpful for non-Windows users to easily acquire and use powershell via dotnet pwsh. It's not required but it's very handy for some users.
Now, for this repo in particular how many users are on non-Windows machines? Not many, perhaps.

"version": "7.6.6",
"commands": [
"pwsh"
],
"rollForward": false
},
"dotnet-coverage": {
"version": "18.12.0",
"commands": [
Expand All @@ -29,13 +22,6 @@
"docfx"
],
"rollForward": false
},
"nerdbank.dotnetrepotools": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a convenient CLI tool that I use in all my repos. I don't actively work in CsWin32 at this point, so I'd leave it to Jevan Saks (@jevansaks) to decide whether he wants to keep it. Leaving it here for folks that want it doesn't seem harmful though, IMHO.

"version": "1.5.42",
"commands": [
"repo"
],
"rollForward": false
}
}
}
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,6 @@ dotnet_diagnostic.MsgPack002.severity = error
# CA2016: Forward the CancellationToken parameter
dotnet_diagnostic.CA2016.severity = warning

[*.sln]
indent_style = tab
[*.slnx]
indent_style = space
indent_size = 2
60 changes: 0 additions & 60 deletions .github/actions/publish-artifacts/action.yaml

This file was deleted.

85 changes: 57 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
paths-ignore:
- doc/
- '*.md'
- .vscode/
- azure-pipelines/release.yml
workflow_dispatch:

Expand All @@ -21,7 +20,6 @@ env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
NBGV_GitEngine: Disabled
BuildConfiguration: Release
RestoreRetryCount: ${{ github.event_name == 'pull_request' && github.event.pull_request.user.login == 'renovate[bot]' && 10 || 1 }}

jobs:
build:
Expand All @@ -31,14 +29,17 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Verify restore retry behavior
run: ./test/Restore.Tests.ps1
shell: pwsh
- name: ⚙️ Install prerequisites
run: ./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider -RestoreRetryCount $env:RestoreRetryCount
shell: pwsh
- name: ⚙️ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: 🛠️ Build
run: dotnet build -t:build,pack -c ${{ env.BuildConfiguration }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904
run: dotnet build -c ${{ env.BuildConfiguration }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904
- name: 📦 Pack
run: dotnet pack --no-build -c ${{ env.BuildConfiguration }}
- name: 📦 Upload build output
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand All @@ -54,14 +55,20 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: ⚙️ Install prerequisites
run: ./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider -RestoreRetryCount $env:RestoreRetryCount
shell: pwsh
- name: ⚙️ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: 📦 Download build
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-windows
path: bin/
- name: Restore packages
run: dotnet restore
- name: 🧪 Run tests
run: |
dotnet test --no-build -c ${{ env.BuildConfiguration }} `
Expand All @@ -87,9 +94,13 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: ⚙️ Install prerequisites
run: ./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider -RestoreRetryCount $env:RestoreRetryCount
shell: pwsh
- name: ⚙️ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: 📦 Download build
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand All @@ -99,6 +110,8 @@ jobs:
# tests (Direct2D uses the WARP software rasterizer, so no GPU is required). They remain
# tagged RequiresHardware so the locked-down Azure DevOps 1ES build pool keeps excluding
# them, but we exercise the real runtime code paths here rather than only on dev machines.
- name: Restore packages
run: dotnet restore
- name: 🧪 Run hardware-dependent tests
run: |
dotnet test --no-build -c ${{ env.BuildConfiguration }} `
Expand All @@ -123,18 +136,23 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Verify restore retry behavior
run: ./test/Restore.Tests.ps1
shell: pwsh
- name: ⚙️ Install prerequisites
run: ./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider -RestoreRetryCount $env:RestoreRetryCount
shell: pwsh
- name: ⚙️ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: ⚙️ Install Mono
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends mono-complete
- name: 🛠️ Build
run: dotnet build -t:build,pack -c ${{ env.BuildConfiguration }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904
run: dotnet build -c ${{ env.BuildConfiguration }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904
- name: 📦 Pack
run: dotnet pack --no-build -c ${{ env.BuildConfiguration }}
- name: Restore packages
run: dotnet restore
- name: 🧪 Run tests
run: |
# Keep this list aligned with the portable projects exercised by the official Linux build.
Expand Down Expand Up @@ -203,14 +221,20 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: ⚙️ Install prerequisites
run: ./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider -RestoreRetryCount $env:RestoreRetryCount
shell: pwsh
- name: ⚙️ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: 📦 Download build
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-windows
path: bin/
- name: Restore packages
run: dotnet restore
- name: 🧪 Run heavy tests
run: |
dotnet test test/Microsoft.Windows.CsWin32.Tests --no-build -c ${{ env.BuildConfiguration }} `
Expand All @@ -220,6 +244,7 @@ jobs:
--logger trx `
--results-directory TestResults `
-- RunConfiguration.TreatNoTestsAsError=false
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dotnet test test/CsWin32Generator.Tests --no-build -c ${{ env.BuildConfiguration }} `
--filter "${{ matrix.filter }}" `
--blame-hang-timeout 7200s `
Expand All @@ -246,9 +271,13 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- name: ⚙️ Install prerequisites
run: ./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider -RestoreRetryCount $env:RestoreRetryCount
shell: pwsh
- name: ⚙️ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: ⚙️ Install .NET 8 analyzer-floor SDK
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: ⚙ Install prerequisites
- name: ⚙ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: Restore packages
run: |
./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider
dotnet restore
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dotnet --info

# Print mono version if it is present.
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: ⚙ Install prerequisites
run: ./init.ps1 -UpgradePrerequisites
- name: ⚙ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: Restore CLI tools
run: dotnet tool restore

- run: dotnet docfx docfx/docfx.json
name: 📚 Generate documentation
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/docs_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ on:
- main
- microbuild

env:
RestoreRetryCount: ${{ github.event_name == 'pull_request' && github.event.pull_request.user.login == 'renovate[bot]' && 10 || 1 }}

jobs:
build:
name: 📚 Doc validation
runs-on: ubuntu-26.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -23,11 +20,15 @@ jobs:
uses: becheran/mlc@b0d0d353e04fcbcfd1d86716103d78a61e5b25dd # v1.2.2
with:
args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx -i https://aka.ms/onboardsupport,https://aka.ms/spot,https://msrc.microsoft.com/*,https://www.microsoft.com/msrc*,https://microsoft.com/msrc*,https://www.npmjs.com/package/*,https://get.dot.net/
- name: ⚙ Install prerequisites
run: |
./init.ps1 -UpgradePrerequisites -RestoreRetryCount $env:RestoreRetryCount
dotnet --info
shell: pwsh
- name: ⚙ Install .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: Restore CLI tools
run: dotnet tool restore
- name: 📚 Verify docfx build
run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures
if: runner.os == 'Linux'
Loading