Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge latest Library.Template #1350

Merged
merged 101 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
c5cc5f0
Merge remote-tracking branch 'libtemplate/microbuild' into dev/andarn…
AArnott Aug 27, 2024
5baa224
Merge remote-tracking branch 'libtemplate/optprofTestSigned' into dev…
AArnott Aug 27, 2024
9f52c5d
Bump MicroBuild to 2.0.171
AArnott Nov 1, 2024
762e59b
Verify formatted code on GitHub workflows
AArnott Nov 2, 2024
d046e43
Add docfx site placeholder
AArnott Nov 5, 2024
9b5b71c
Fix release notes link to work by default
AArnott Nov 5, 2024
373a8ad
Fix flags sent to codecov.io
AArnott Nov 6, 2024
2c7d5a3
Bump .NET SDK to 9.0
AArnott Nov 12, 2024
134713d
Target .NET 8 instead of .NET 6
AArnott Nov 12, 2024
d76ba4a
Merge pull request #305 from AArnott/net9sdk
AArnott Nov 12, 2024
5669382
Fix token permissions for Library.Template update workflow
AArnott Nov 12, 2024
f49fb31
Print diff of what has changed recently
AArnott Nov 12, 2024
0459d74
Skip PR creation step when no changes are present to merge
AArnott Nov 12, 2024
faade5e
Compile with C# language version 13
AArnott Nov 12, 2024
2be8070
Merge pull request #306 from AArnott/libtemplateWorkflowUpdates
AArnott Nov 12, 2024
e935b27
Merge pull request #307 from AArnott/net9sdk
AArnott Nov 12, 2024
928d88e
Fix to avoid deprecation warning
AArnott Nov 12, 2024
57a21a8
Update prerequisite verbiage
AArnott Nov 13, 2024
0683b79
Merge pull request #308 from AArnott/workflowfixes
AArnott Nov 13, 2024
53ba423
Avoid pushing workflow changes in Library.Template updates
AArnott Nov 13, 2024
77ef017
Improve placement of warning
AArnott Nov 13, 2024
61efb71
Merge pull request #309 from AArnott/workflowfixes
AArnott Nov 13, 2024
7f14687
Bump docfx from 2.77.0 to 2.78.0 (#311)
dependabot[bot] Nov 18, 2024
64483bf
Fix libtemplate update workflow
AArnott Nov 18, 2024
20e285c
Avoid `dotnet format` hang
AArnott Nov 19, 2024
6775c31
Update devcontainer for latest SDK and extension
AArnott Nov 19, 2024
5bd86bb
Get dependabot to help us keep the .NET SDK current
AArnott Nov 20, 2024
325831e
Bump docfx from 2.78.0 to 2.78.1 (#313)
dependabot[bot] Nov 20, 2024
2d80693
Bump Microsoft.NET.Test.Sdk from 17.11.1 to 17.12.0 (#312)
dependabot[bot] Nov 20, 2024
49241ec
Use `-LiteralPath` instead of `-Path` in ps1 scripts
AArnott Nov 23, 2024
b20e0d9
Merge pull request #315 from AArnott/fix314
AArnott Nov 23, 2024
110da23
Replace `Nullable` with `PolySharp` as a dependency
AArnott Nov 25, 2024
f8235e4
Add docfx verification to build
AArnott Nov 27, 2024
45279a7
Fix nb.gv failure during docfx build
AArnott Nov 27, 2024
3a32d09
Remove double word from boilerplate docfx text
AArnott Nov 30, 2024
feb1a46
Bump docfx to 2.78.2
AArnott Dec 2, 2024
130ad67
Bump dotnet-coverage to 17.13.1
AArnott Dec 9, 2024
8a0d319
Move artifact publishing into a composite action
AArnott Dec 9, 2024
904ff78
Make the CI workflow dispatchable
AArnott Dec 9, 2024
9bbf8a3
Fix docfx build on private repos
AArnott Dec 9, 2024
4fa9e72
Fix code coverage merge on GitHub Actions
AArnott Dec 9, 2024
89afbfc
Add release workflow
AArnott Dec 9, 2024
03ec9e0
Merge pull request #318 from AArnott/githubActionsDevelopment
AArnott Dec 9, 2024
1a06053
Document release process
AArnott Dec 9, 2024
7bb9a6c
Publish test results when they fail on github workflows
AArnott Dec 11, 2024
f6204f3
Fix push to nuget.org in github release workflow
AArnott Dec 13, 2024
0a42cd9
Bump nbgv and Nerdbank.GitVersioning to 3.7.112
AArnott Dec 16, 2024
d8df5c8
Activate GitHub Actions test reporting
AArnott Dec 18, 2024
01eeb1a
Merge pull request #319 from AArnott/betterTestingLibTemplate
AArnott Dec 18, 2024
d2f4c5e
Revert "Merge pull request #319 from AArnott/betterTestingLibTemplate"
AArnott Dec 18, 2024
b1fa3bc
Merge pull request #321 from AArnott/betterTestingLibTemplate
AArnott Dec 18, 2024
7b18fd0
Resolve schema validation error in VS Code for docfx yml files
AArnott Dec 20, 2024
ad4ff0f
Bump xunit.runner.visualstudio to 3.0.0
AArnott Dec 20, 2024
2e9751f
Bump .NET SDK to 9.0.101
AArnott Dec 20, 2024
3459e45
Merge pull request #322 from AArnott/depUpdates
AArnott Dec 20, 2024
0c33c69
Organize Directory.Packages.props to reduce merge conflicts going for…
AArnott Dec 20, 2024
99ee1fc
Bump to Xunit v3
AArnott Dec 23, 2024
867012d
Merge pull request #323 from AArnott/xunitv3
AArnott Dec 23, 2024
94eba4a
Build servicing branches
AArnott Dec 23, 2024
275a44b
Do not publish artifacts on cancelled GitHub workflows
AArnott Dec 23, 2024
aa130d0
Merge pull request #324 from AArnott/publishArtifactsOnCancel
AArnott Dec 23, 2024
8870497
Move scripts that apply to github workflows from azp to tools
AArnott Dec 24, 2024
bb60632
Remove unused nuget.config file
AArnott Dec 24, 2024
abbd6b0
Move artifacts and variables scripts to `tools`
AArnott Dec 24, 2024
709bc0e
Merge pull request #325 from AArnott/azpPurify
AArnott Dec 24, 2024
fe7350f
Move variable definition script
AArnott Dec 24, 2024
e833efe
Merge pull request #326 from AArnott/azpPurify
AArnott Dec 24, 2024
bd10eaa
Group dependabot update PRs
AArnott Dec 26, 2024
05072c1
Switch from Dependabot to Renovate
AArnott Dec 26, 2024
72caf2d
Update mcr.microsoft.com/dotnet/sdk Docker tag to v9.0.101
renovate[bot] Dec 26, 2024
b353d1f
Update dependency ubuntu to v24
renovate[bot] Dec 26, 2024
92e7a46
Merge pull request #328 from AArnott/renovate/ubuntu-24.x
AArnott Dec 26, 2024
13397fd
Merge pull request #327 from AArnott/renovate/dockerfile-and-global.j…
AArnott Dec 26, 2024
147f846
Drop renovate PR hourly limit back to default
AArnott Dec 27, 2024
ddc4c2d
Use JSON5 for renovate configuration
AArnott Dec 28, 2024
7e3ea78
Update devcontainer schema
AArnott Dec 28, 2024
6ad0c94
Rename renovate config back to .json
AArnott Dec 30, 2024
fadd4eb
Fix test logs collection
AArnott Dec 31, 2024
daddccc
Merge pull request #330 from AArnott/fixTestResults
AArnott Dec 31, 2024
16f72e3
Take care to use proper slashes per OS for testing
AArnott Jan 1, 2025
392ed3f
Merge pull request #331 from AArnott/fixTestResults
AArnott Jan 1, 2025
656c5ff
Match test assemblies that are built as exe's
AArnott Jan 5, 2025
5f9a344
Ensure Expand-Template uses UTF-8 when replacing placeholders.
richardstanton Jun 8, 2024
b3fc0f3
Simplify certain ps1 script paths
AArnott Jan 7, 2025
871638a
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Jan 6, 2025
1cc471c
Merge remote-tracking branch 'origin/main' into merge/main_to_microbuild
AArnott Jan 7, 2025
6654a67
Merge pull request #335 from AArnott/merge/main_to_microbuild
AArnott Jan 7, 2025
048010c
Update xunit (#336)
renovate[bot] Jan 10, 2025
6ac5aae
Fix InsertJsonValues script (#337)
matteo-prosperi Jan 10, 2025
b47196d
Update nbgv and nerdbank.gitversioning updates to 3.7.115 (#338)
renovate[bot] Jan 11, 2025
56aa0b3
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Jan 11, 2025
d51161c
Merge remote-tracking branch 'libtemplate/microbuild' into dev/andarn…
AArnott Jan 11, 2025
c200aec
Merge remote-tracking branch 'upstream/main' into dev/andarno/optProf…
AArnott Jan 11, 2025
71eb73a
Turn off InternalsVisibleTo for the analyzer assemblies and fix up mo…
AArnott Jan 11, 2025
1652589
Bump analyzer testing framework so it works with .NET 8
AArnott Jan 11, 2025
eb84f5b
Switch to resx source generator
AArnott Jan 11, 2025
4d61581
Touch-up PublicAPI.Shipped for net8.0
AArnott Jan 11, 2025
3d25ab8
Disable tests that fail and filed #1364 to track
AArnott Jan 12, 2025
40d7bfa
Fix bad merge
AArnott Jan 12, 2025
3375b97
Merge the microbuild branch from https://github.com/aarnott/Library.T…
AArnott Jan 12, 2025
552a5bf
Rollback xunit runner to avoid delay-signed assembly load failures
AArnott Jan 13, 2025
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
22 changes: 16 additions & 6 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,29 @@
"version": "7.4.6",
"commands": [
"pwsh"
]
],
"rollForward": false
},
"dotnet-coverage": {
"version": "17.12.6",
"version": "17.13.1",
"commands": [
"dotnet-coverage"
]
],
"rollForward": false
},
"nbgv": {
"version": "3.6.146",
"version": "3.7.115",
"commands": [
"nbgv"
]
],
"rollForward": false
},
"docfx": {
"version": "2.78.2",
"commands": [
"docfx"
],
"rollForward": false
}
}
}
}
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
FROM mcr.microsoft.com/dotnet/sdk:8.0.402-jammy
FROM mcr.microsoft.com/dotnet/sdk:9.0.101-noble

# Installing mono makes `dotnet test` work without errors even for net472.
# But installing it takes a long time, so it's excluded by default.
Expand Down
35 changes: 20 additions & 15 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
{
"name": "Dev space",
"dockerFile": "Dockerfile",
"settings": {
"terminal.integrated.shell.linux": "/usr/bin/pwsh"
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/usr/bin/pwsh"
},
"extensions": [
"ms-azure-devops.azure-pipelines",
"ms-dotnettools.csharp",
"k--kato.docomment",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"pflannery.vscode-versionlens",
"davidanson.vscode-markdownlint",
"dotjoshjohnson.xml",
"ms-vscode-remote.remote-containers",
"ms-azuretools.vscode-docker",
"tintoy.msbuild-project-tools"
]
}
},
"postCreateCommand": "./init.ps1 -InstallLocality machine",
"extensions": [
"ms-azure-devops.azure-pipelines",
"ms-dotnettools.csharp",
"k--kato.docomment",
"editorconfig.editorconfig",
"pflannery.vscode-versionlens",
"davidanson.vscode-markdownlint",
"dotjoshjohnson.xml",
"ms-vscode-remote.remote-containers",
"ms-azuretools.vscode-docker",
"ms-vscode.powershell"
]
"postCreateCommand": "./init.ps1 -InstallLocality machine"
}
2 changes: 2 additions & 0 deletions .github/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[renovate.json*]
indent_style = tab
60 changes: 60 additions & 0 deletions .github/actions/publish-artifacts/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish artifacts
description: Publish artifacts

runs:
using: composite
steps:
- name: 📥 Collect artifacts
run: tools/artifacts/_stage_all.ps1
shell: pwsh
if: always()

# TODO: replace this hard-coded list with a loop that utilizes the NPM package at
# https://github.com/actions/toolkit/tree/main/packages/artifact (or similar) to push the artifacts.

- name: 📢 Upload project.assets.json files
if: always()
uses: actions/upload-artifact@v4
with:
name: projectAssetsJson-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/projectAssetsJson
continue-on-error: true
- name: 📢 Upload variables
uses: actions/upload-artifact@v4
with:
name: variables-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/Variables
continue-on-error: true
- name: 📢 Upload build_logs
if: always()
uses: actions/upload-artifact@v4
with:
name: build_logs-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/build_logs
continue-on-error: true
- name: 📢 Upload testResults
if: always()
uses: actions/upload-artifact@v4
with:
name: testResults-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/testResults
continue-on-error: true
- name: 📢 Upload coverageResults
if: always()
uses: actions/upload-artifact@v4
with:
name: coverageResults-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/coverageResults
continue-on-error: true
- name: 📢 Upload symbols
uses: actions/upload-artifact@v4
with:
name: symbols-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/symbols
continue-on-error: true
- name: 📢 Upload deployables
uses: actions/upload-artifact@v4
with:
name: deployables-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/deployables
if: always()
13 changes: 0 additions & 13 deletions .github/dependabot.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"semanticCommits": "disabled",
"labels": ["dependencies"],
"packageRules": [
{
"matchPackageNames": ["nbgv", "nerdbank.gitversioning"],
"groupName": "nbgv and nerdbank.gitversioning updates"
},
{
"matchPackageNames": ["xunit*"],
"groupName": "xunit"
},
{
"matchPackageNames": ["xunit.runner.visualstudio"],
"allowedVersions": "<3.0"
},
{
"matchDatasources": ["dotnet-version", "docker"],
"matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"],
"groupName": "Dockerfile and global.json updates"
}
]
}
44 changes: 44 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 📚 Docs

on:
push:
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
actions: read
pages: write
id-token: write
contents: read

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
publish-docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: ⚙ Install prerequisites
run: ./init.ps1 -UpgradePrerequisites

- run: dotnet docfx docfx/docfx.json
name: 📚 Generate documentation

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docfx/_site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
42 changes: 34 additions & 8 deletions .github/workflows/libtemplate-update.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Library.Template update
name: Library.Template update

# PREREQUISITE: This workflow requires the repo to be configured to allow workflows to push commits and create pull requests.
# PREREQUISITE: This workflow requires the repo to be configured to allow workflows to create pull requests.
# Visit https://github.com/USER/REPO/settings/actions
# Under "Workflow permissions", select "Read and write permissions" and check "Allow GitHub Actions to create ...pull requests"
# Under "Workflow permissions" check "Allow GitHub Actions to create ...pull requests"
# Click Save.

on:
Expand All @@ -13,15 +13,19 @@ on:
jobs:
merge:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: merge
id: merge
shell: pwsh
run: |
$LibTemplateBranch = & ./azure-pipelines/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
$LibTemplateBranch = & ./tools/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Expand All @@ -31,15 +35,37 @@ jobs:
exit $LASTEXITCODE
}
$LibTemplateCommit = git rev-parse FETCH_HEAD
git diff --stat ...FETCH_HEAD

if ((git rev-list FETCH_HEAD ^HEAD --count) -eq 0) {
Write-Host "There are no Library.Template updates to merge."
echo "uptodate=true" >> $env:GITHUB_OUTPUT
exit 0
}

git -c http.extraheader="AUTHORIZATION: bearer $env:GH_TOKEN" push origin -u FETCH_HEAD:refs/heads/auto/libtemplateUpdate
# Pushing commits that add or change files under .github/workflows will cause our workflow to fail.
# But it usually isn't necessary because the target branch already has (or doesn't have) these changes.
# So if the merged doesn't bring in any changes to these files, try the merge locally and push that
# to keep github happy.
if ((git rev-list FETCH_HEAD ^HEAD --count -- .github/workflows) -eq 0) {
# Indeed there are no changes in that area. So merge locally to try to appease GitHub.
git checkout -b auto/libtemplateUpdate
git config user.name "Andrew Arnott"
git config user.email "[email protected]"
git merge FETCH_HEAD
if ($LASTEXITCODE -ne 0) {
Write-Host "Merge conflicts prevent creating the pull request. Please run tools/MergeFrom-Template.ps1 locally and push the result as a pull request."
exit 2
}

git -c http.extraheader="AUTHORIZATION: bearer $env:GH_TOKEN" push origin -u HEAD
} else {
Write-Host "Changes to github workflows are included in this update. Please run tools/MergeFrom-Template.ps1 locally and push the result as a pull request."
exit 1
}
- name: pull request
shell: pwsh
if: success() && steps.merge.outputs.uptodate != 'true'
run: |
# If there is already an active pull request, don't create a new one.
$existingPR = gh pr list -H auto/libtemplateUpdate --json url | ConvertFrom-Json
Expand All @@ -51,6 +77,8 @@ jobs:
$prTitle = "Merge latest Library.Template"
$prBody = "This merges the latest features and fixes from [Library.Template's branch](https://github.com/AArnott/Library.Template/tree/).

⚠️ Do **not** squash this pull request when completing it. You must *merge* it.

<details>
<summary>Merge conflicts?</summary>
Resolve merge conflicts locally by carrying out these steps:
Expand All @@ -63,9 +91,7 @@ jobs:
git commit
git push
```
</details>

⚠️ Do **not** squash this pull request when completing it. You must *merge* it."
</details>"

gh pr create -H auto/libtemplateUpdate -b $prBody -t $prTitle
env:
Expand Down
Loading