Skip to content

Commit 6c2d6ad

Browse files
authored
Merge branch 'main' into BeforeMicrosoftNETSdkTargets
2 parents 75d88aa + 18985b1 commit 6c2d6ad

File tree

2,778 files changed

+222231
-112052
lines changed

Some content is hidden

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

2,778 files changed

+222231
-112052
lines changed

.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"microsoft.dotnet.darc": {
6+
"version": "1.1.0-beta.24327.2",
7+
"commands": [
8+
"darc"
9+
]
10+
}
11+
}
12+
}

.devcontainer/vmr/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!--
2+
######## ######## ### ######## ######## ## ## #### ######
3+
## ## ## ## ## ## ## ## ## ## ## ## ##
4+
## ## ## ## ## ## ## ## ## ## ## ##
5+
######## ###### ## ## ## ## ## ######### ## ######
6+
## ## ## ######### ## ## ## ## ## ## ##
7+
## ## ## ## ## ## ## ## ## ## ## ## ##
8+
## ## ######## ## ## ######## ## ## ## #### ######
9+
-->
10+
11+
This Codespace allows you to debug or make changes to the .NET SDK product. In case you ran this
12+
from a `dotnet/sdk` PR branch, the directory tree contains the VMR (`dotnet/dotnet`) checked out into
13+
`/workspaces/dotnet` with the PR changes pulled into it. Building the VMR from the codespace mimics
14+
what the VMR pipelines in an sdk PR are doing. The build takes about 45-75 minutes
15+
(depending on the machine spec and target OS) and, after completion, produces an archived .NET SDK located in
16+
`/workspaces/dotnet/artifacts/assets/Release`.
17+
18+
## Build the SDK
19+
20+
To build the repository, run one of the following:
21+
```bash
22+
# Microsoft based build
23+
./build.sh
24+
```
25+
or
26+
27+
```bash
28+
# Building from source only
29+
./prep-source-build.sh && ./build.sh -sb
30+
```
31+
32+
> Please note that, at this time, the build modifies some of the checked-in sources so it might
33+
be preferential to rebuild the Codespace between attempts (or reset the working tree changes).
34+
35+
For more details, see the instructions at https://github.com/dotnet/dotnet.
36+
37+
## Synchronize your changes in locally
38+
39+
When debugging the build, you have two options how to test your changes in this environment.
40+
41+
### Making changes to the VMR directly
42+
43+
You can make the changes directly to the local checkout of the VMR at `/workspaces/dotnet`. You
44+
can then try to build the VMR and see if the change works for you.
45+
46+
### Pull changes into the Codespace from your fork
47+
48+
You can also make a fix in the individual source repository (e.g. `dotnet/runtime`) and push the
49+
fix into a branch; can be in your fork too. Once you have the commit pushed, you can pull this
50+
version of the repository into the Codespace by running:
51+
52+
```
53+
/workspaces/synchronize-vmr.sh \
54+
--repository <repo>:<commit, tag or branch> \
55+
--remote <repo>:<fork URI>
56+
```
57+
58+
You can now proceed building the VMR in the Codespace using instructions above. You can repeat
59+
this process and sync a new commit from your fork. Only note that, at this time, Source-Build
60+
modifies some of the checked-in sources so you'll need to revert the working tree changes
61+
between attempts.

.devcontainer/vmr/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Container suitable for investigating issues with source build
2+
// Contains the VMR (dotnet/dotnet) with applied changes from the current PR
3+
// The container supports source-building the SDK
4+
{
5+
"name": "VMR with PR changes",
6+
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39",
7+
"hostRequirements": {
8+
// A completely source built .NET is >64 GB with all the repos/artifacts
9+
"storage": "128gb"
10+
},
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"ms-dotnettools.csharp"
15+
]
16+
},
17+
"codespaces": {
18+
"openFiles": [
19+
"sdk/.devcontainer/vmr/README.md"
20+
]
21+
}
22+
},
23+
"onCreateCommand": "${containerWorkspaceFolder}/sdk/.devcontainer/vmr/init.sh",
24+
"workspaceFolder": "/workspaces"
25+
}

.devcontainer/vmr/init.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
source="${BASH_SOURCE[0]}"
6+
script_root="$( cd -P "$( dirname "$source" )" && pwd )"
7+
8+
sdk_dir=$(realpath "$script_root/../..")
9+
workspace_dir=$(realpath "$sdk_dir/../")
10+
tmp_dir=$(realpath "$workspace_dir/tmp")
11+
vmr_dir=$(realpath "$workspace_dir/dotnet")
12+
13+
cp "$sdk_dir/.devcontainer/vmr/synchronize-vmr.sh" "$workspace_dir"
14+
15+
mkdir -p "$tmp_dir"
16+
17+
# Codespaces performs a shallow fetch only
18+
git -C "$sdk_dir" fetch --all --unshallow
19+
20+
# We will try to figure out, which branch is the current (PR) branch based off of
21+
# We need this to figure out, which VMR branch to use
22+
vmr_branch=$(git -C "$sdk_dir" log --pretty=format:'%D' HEAD^ \
23+
| grep 'origin/' \
24+
| head -n1 \
25+
| sed 's@origin/@@' \
26+
| sed 's@,.*@@')
27+
28+
"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --debug
29+
30+
(cd "$vmr_dir" && ./prep-source-build.sh)

.devcontainer/vmr/synchronize-vmr.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
(cd /workspaces/sdk \
4+
&& ./eng/vmr-sync.sh --vmr /workspaces/dotnet --tmp /workspaces/tmp $*)

.github/policies/resourceManagement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ configuration:
5858
label: Area-ILLink
5959
then:
6060
- addReply:
61-
reply: '@dotnet/illink-contrib a new issue has been filed in the ILLink area, please triage'
61+
reply: '@dotnet/illink a new issue has been filed in the ILLink area, please triage'
6262
description: Notify linker of new untriaged bugs
6363
- if:
6464
- payloadType: Pull_Request
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Inter-branch merge workflow
2+
on:
3+
push:
4+
branches:
5+
- release/**
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
Merge:
13+
uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main

.github/workflows/stale.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 'Stale: Label and Close Issues'
2+
on:
3+
schedule:
4+
- cron: '19 4,16 * * *' # Twice daily at 19 minutes after the hour (random/uncommon time)
5+
6+
workflow_dispatch:
7+
# Manual triggering through the GitHub UI, API, or CLI
8+
inputs:
9+
daysBeforeStale:
10+
required: true
11+
default: "2192"
12+
daysBeforeClose:
13+
required: true
14+
default: "30"
15+
operationsPerRun:
16+
required: true
17+
default: "4000"
18+
19+
permissions:
20+
actions: write # For managing the operation state cache
21+
issues: write
22+
23+
jobs:
24+
stale:
25+
if: github.repository_owner == 'dotnet' # Do not run on forks
26+
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/stale@v9 # https://github.com/actions/stale/blob/v9/README.md
30+
with:
31+
ascending: true # Process the oldest issues first
32+
stale-issue-label: 'stale'
33+
stale-issue-message: "Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label."
34+
close-issue-message: "This issue will now be closed since it has been labeled 'stale' without activity for 30 days."
35+
days-before-stale: ${{ fromJson(inputs.daysBeforeStale || 2192) }} # Default to 6 years if not specified as input
36+
days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }} # Default to 30 days if not specified as input
37+
days-before-pr-stale: -1 # Do not label PRs as 'stale'
38+
days-before-pr-close: -1 # Do not close PRs labeled as 'stale'
39+
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 4000 )}}

.vsts-ci-richnav.yml

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

0 commit comments

Comments
 (0)