Skip to content

Commit 6654a67

Browse files
authored
Merge pull request #335 from AArnott/merge/main_to_microbuild
Merge main to microbuild
2 parents 9f52c5d + 1cc471c commit 6654a67

File tree

86 files changed

+538
-189
lines changed

Some content is hidden

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

86 files changed

+538
-189
lines changed

.config/dotnet-tools.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,29 @@
66
"version": "7.4.6",
77
"commands": [
88
"pwsh"
9-
]
9+
],
10+
"rollForward": false
1011
},
1112
"dotnet-coverage": {
12-
"version": "17.12.6",
13+
"version": "17.13.1",
1314
"commands": [
1415
"dotnet-coverage"
15-
]
16+
],
17+
"rollForward": false
1618
},
1719
"nbgv": {
18-
"version": "3.6.146",
20+
"version": "3.7.112",
1921
"commands": [
2022
"nbgv"
21-
]
23+
],
24+
"rollForward": false
25+
},
26+
"docfx": {
27+
"version": "2.78.2",
28+
"commands": [
29+
"docfx"
30+
],
31+
"rollForward": false
2232
}
2333
}
24-
}
34+
}

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
2-
FROM mcr.microsoft.com/dotnet/sdk:8.0.402-jammy
2+
FROM mcr.microsoft.com/dotnet/sdk:9.0.101-noble
33

44
# Installing mono makes `dotnet test` work without errors even for net472.
55
# But installing it takes a long time, so it's excluded by default.

.devcontainer/devcontainer.json

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
{
22
"name": "Dev space",
33
"dockerFile": "Dockerfile",
4-
"settings": {
5-
"terminal.integrated.shell.linux": "/usr/bin/pwsh"
4+
"customizations": {
5+
"vscode": {
6+
"settings": {
7+
"terminal.integrated.shell.linux": "/usr/bin/pwsh"
8+
},
9+
"extensions": [
10+
"ms-azure-devops.azure-pipelines",
11+
"ms-dotnettools.csharp",
12+
"k--kato.docomment",
13+
"editorconfig.editorconfig",
14+
"esbenp.prettier-vscode",
15+
"pflannery.vscode-versionlens",
16+
"davidanson.vscode-markdownlint",
17+
"dotjoshjohnson.xml",
18+
"ms-vscode-remote.remote-containers",
19+
"ms-azuretools.vscode-docker",
20+
"tintoy.msbuild-project-tools"
21+
]
22+
}
623
},
7-
"postCreateCommand": "./init.ps1 -InstallLocality machine",
8-
"extensions": [
9-
"ms-azure-devops.azure-pipelines",
10-
"ms-dotnettools.csharp",
11-
"k--kato.docomment",
12-
"editorconfig.editorconfig",
13-
"pflannery.vscode-versionlens",
14-
"davidanson.vscode-markdownlint",
15-
"dotjoshjohnson.xml",
16-
"ms-vscode-remote.remote-containers",
17-
"ms-azuretools.vscode-docker",
18-
"ms-vscode.powershell"
19-
]
24+
"postCreateCommand": "./init.ps1 -InstallLocality machine"
2025
}

.github/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[renovate.json*]
2+
indent_style = tab
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Publish artifacts
2+
description: Publish artifacts
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: 📥 Collect artifacts
8+
run: tools/artifacts/_stage_all.ps1
9+
shell: pwsh
10+
if: always()
11+
12+
# TODO: replace this hard-coded list with a loop that utilizes the NPM package at
13+
# https://github.com/actions/toolkit/tree/main/packages/artifact (or similar) to push the artifacts.
14+
15+
- name: 📢 Upload project.assets.json files
16+
if: always()
17+
uses: actions/upload-artifact@v4
18+
with:
19+
name: projectAssetsJson-${{ runner.os }}
20+
path: ${{ runner.temp }}/_artifacts/projectAssetsJson
21+
continue-on-error: true
22+
- name: 📢 Upload variables
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: variables-${{ runner.os }}
26+
path: ${{ runner.temp }}/_artifacts/Variables
27+
continue-on-error: true
28+
- name: 📢 Upload build_logs
29+
if: always()
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: build_logs-${{ runner.os }}
33+
path: ${{ runner.temp }}/_artifacts/build_logs
34+
continue-on-error: true
35+
- name: 📢 Upload testResults
36+
if: always()
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: testResults-${{ runner.os }}
40+
path: ${{ runner.temp }}/_artifacts/testResults
41+
continue-on-error: true
42+
- name: 📢 Upload coverageResults
43+
if: always()
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: coverageResults-${{ runner.os }}
47+
path: ${{ runner.temp }}/_artifacts/coverageResults
48+
continue-on-error: true
49+
- name: 📢 Upload symbols
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: symbols-${{ runner.os }}
53+
path: ${{ runner.temp }}/_artifacts/symbols
54+
continue-on-error: true
55+
- name: 📢 Upload deployables
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: deployables-${{ runner.os }}
59+
path: ${{ runner.temp }}/_artifacts/deployables
60+
if: always()

.github/dependabot.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/renovate.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:recommended"],
4+
"semanticCommits": "disabled",
5+
"labels": ["dependencies"],
6+
"packageRules": [
7+
{
8+
"matchPackageNames": ["nbgv", "nerdbank.gitversioning"],
9+
"groupName": "nbgv and nerdbank.gitversioning updates"
10+
},
11+
{
12+
"matchPackageNames": ["xunit*"],
13+
"groupName": "xunit"
14+
},
15+
{
16+
"matchDatasources": ["dotnet-version", "docker"],
17+
"matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"],
18+
"groupName": "Dockerfile and global.json updates"
19+
}
20+
]
21+
}

.github/workflows/build.yml

Lines changed: 21 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
name: CI
1+
name: 🏭 Build
22

33
on:
44
push:
55
branches:
6-
- main
7-
- microbuild
8-
- validate/*
6+
- main
7+
- 'v*.*'
8+
- microbuild
9+
- validate/*
910
pull_request:
11+
workflow_dispatch:
1012

1113
env:
1214
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
@@ -16,6 +18,7 @@ env:
1618

1719
jobs:
1820
build:
21+
name: 🏭 Build
1922

2023
runs-on: ${{ matrix.os }}
2124
strategy:
@@ -41,75 +44,28 @@ jobs:
4144
}
4245
shell: pwsh
4346
- name: ⚙️ Set pipeline variables based on source
44-
run: azure-pipelines/variables/_pipelines.ps1
47+
run: tools/variables/_define.ps1
4548
shell: pwsh
4649
- name: 🛠 build
4750
run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog"
4851
- name: 🧪 test
49-
run: azure-pipelines/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }}
52+
run: tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }}
5053
shell: pwsh
51-
- name: ⚙ Update pipeline variables based on build outputs
52-
run: azure-pipelines/variables/_pipelines.ps1
54+
- name: 💅🏻 Verify formatted code
55+
run: dotnet format --verify-no-changes --no-restore
5356
shell: pwsh
54-
- name: 📥 Collect artifacts
55-
run: azure-pipelines/artifacts/_stage_all.ps1
57+
if: runner.os == 'Linux'
58+
- name: 📚 Verify docfx build
59+
run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures
60+
if: runner.os == 'Linux'
61+
- name: ⚙ Update pipeline variables based on build outputs
62+
run: tools/variables/_define.ps1
5663
shell: pwsh
57-
if: always()
58-
- name: 📢 Upload project.assets.json files
59-
if: always()
60-
uses: actions/upload-artifact@v4
61-
with:
62-
name: projectAssetsJson-${{ runner.os }}
63-
path: ${{ runner.temp }}/_artifacts/projectAssetsJson
64-
continue-on-error: true
65-
- name: 📢 Upload variables
66-
uses: actions/upload-artifact@v4
67-
with:
68-
name: variables-${{ runner.os }}
69-
path: ${{ runner.temp }}/_artifacts/Variables
70-
continue-on-error: true
71-
- name: 📢 Upload build_logs
72-
if: always()
73-
uses: actions/upload-artifact@v4
74-
with:
75-
name: build_logs-${{ runner.os }}
76-
path: ${{ runner.temp }}/_artifacts/build_logs
77-
continue-on-error: true
78-
- name: 📢 Upload test_logs
79-
if: always()
80-
uses: actions/upload-artifact@v4
81-
with:
82-
name: test_logs-${{ runner.os }}
83-
path: ${{ runner.temp }}/_artifacts/test_logs
84-
continue-on-error: true
85-
- name: 📢 Upload testResults
86-
if: always()
87-
uses: actions/upload-artifact@v4
88-
with:
89-
name: testResults-${{ runner.os }}
90-
path: ${{ runner.temp }}/_artifacts/testResults
91-
continue-on-error: true
92-
- name: 📢 Upload coverageResults
93-
if: always()
94-
uses: actions/upload-artifact@v4
95-
with:
96-
name: coverageResults-${{ runner.os }}
97-
path: ${{ runner.temp }}/_artifacts/coverageResults
98-
continue-on-error: true
99-
- name: 📢 Upload symbols
100-
uses: actions/upload-artifact@v4
101-
with:
102-
name: symbols-${{ runner.os }}
103-
path: ${{ runner.temp }}/_artifacts/symbols
104-
continue-on-error: true
105-
- name: 📢 Upload deployables
106-
uses: actions/upload-artifact@v4
107-
with:
108-
name: deployables-${{ runner.os }}
109-
path: ${{ runner.temp }}/_artifacts/deployables
110-
if: always()
64+
- name: 📢 Publish artifacts
65+
uses: ./.github/actions/publish-artifacts
66+
if: cancelled() == false
11167
- name: 📢 Publish code coverage results to codecov.io
112-
run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}Host,${{ env.BUILDCONFIGURATION }}"
68+
run: ./tools/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}"
11369
shell: pwsh
11470
timeout-minutes: 3
11571
continue-on-error: true

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: 📚 Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
actions: read
11+
pages: write
12+
id-token: write
13+
contents: read
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
20+
21+
jobs:
22+
publish-docs:
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
31+
- name: ⚙ Install prerequisites
32+
run: ./init.ps1 -UpgradePrerequisites
33+
34+
- run: dotnet docfx docfx/docfx.json
35+
name: 📚 Generate documentation
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: docfx/_site
41+
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)