Skip to content

Commit 28c02b6

Browse files
authored
Merge branch 'dotnet:master' into bugfix/Power_Plan
2 parents 3437889 + 81a4e55 commit 28c02b6

File tree

599 files changed

+21311
-10673
lines changed

Some content is hidden

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

599 files changed

+21311
-10673
lines changed

.github/workflows/generate-changelog.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ jobs:
1919
with:
2020
ref: master
2121

22-
- name: Download changelog
23-
run: ./build.cmd docs-update --depth 1 --preview
22+
- name: Fetch changelog
23+
run: ./build.cmd docs-fetch --depth 1 --preview --force-clone
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626

2727
- name: Push changelog
2828
uses: JamesIves/[email protected]
2929
with:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
BRANCH: docs-changelog-details
32-
FOLDER: docs/_changelog/details
31+
BRANCH: docs-changelog
32+
FOLDER: docs/_changelog
3333
GIT_CONFIG_NAME: Andrey Akinshin
3434
GIT_CONFIG_EMAIL: [email protected]
35-
CLEAN: true
35+
CLEAN: true

.github/workflows/generate-gh-pages.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
- name: Build BenchmarkDotNet
2323
run: ./build.cmd build
2424

25-
- name: Download changelog
26-
run: ./build.cmd docs-update --depth 1 --preview
25+
- name: Fetch changelog
26+
run: ./build.cmd docs-fetch --depth 1 --preview --force-clone
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929

3030
- name: Build documentation
3131
run: ./build.cmd docs-build
3232

3333
- name: Upload Artifacts
34-
uses: actions/upload-artifact@v1
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: site
3737
path: docs/_site
@@ -48,9 +48,13 @@ jobs:
4848
ref: docs-stable
4949

5050
- name: Download Artifacts
51-
uses: actions/download-artifact@v1
51+
uses: actions/download-artifact@v4
5252
with:
5353
name: site
54+
path: site
55+
56+
- name: Print file tree
57+
run: tree $GITHUB_WORKSPACE
5458

5559
- name: Deploy documentation
5660
uses: JamesIves/[email protected]

.github/workflows/publish-nightly.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@ on:
55
push:
66
branches:
77
- master
8+
workflow_dispatch:
89

910
jobs:
1011
publish:
1112
runs-on: ubuntu-latest
1213
if: ${{ github.repository == 'dotnet/BenchmarkDotNet' }}
1314
steps:
14-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1516
- name: Set date
1617
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
1718
- name: Pack
1819
run: ./build.cmd pack /p:VersionSuffix=nightly.$DATE.$GITHUB_RUN_NUMBER
1920
- name: Upload nupkg to artifacts
20-
uses: actions/upload-artifact@v3
21+
uses: actions/upload-artifact@v4
2122
with:
2223
name: nupkgs
2324
path: "**/*.*nupkg"

.github/workflows/report-test-results.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,26 @@ jobs:
1111
report:
1212
runs-on: ubuntu-latest
1313
permissions: write-all
14+
if: ${{ github.event.workflow_run.conclusion != 'cancelled' }}
1415
steps:
16+
# Cleanup Old Files
17+
- name: Cleanup Old Files
18+
run: rm -rf $GITHUB_WORKSPACE/*.trx
19+
20+
# Download the Latest Artifacts with Unique Name
1521
- name: Download Artifacts
16-
uses: dawidd6/action-download-artifact@v2
22+
uses: dawidd6/action-download-artifact@v6
1723
with:
18-
workflow: ${{ github.event.workflow_run.workflow_id }}
24+
run_id: ${{ github.event.workflow_run.id }}
25+
26+
# Display the Structure of Downloaded Files
1927
- name: Display structure of downloaded files
2028
run: ls -R
29+
30+
# Display the Contents of .trx Files
31+
- name: Display .trx file contents
32+
run: cat **/*.trx || echo "No .trx files found"
33+
2134
- name: Report tests results
2235
uses: AndreyAkinshin/test-reporter@0e2c48ebec2007001dd77dd4bcbcd450b96d5a38
2336
with:
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: run-tests-selected
2+
run-name: Run selected tests (${{ inputs.runs_on }} --framework ${{ inputs.framework}} --filter ${{ inputs.filter }})
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
runs_on:
8+
type: choice
9+
description: GitHub Actions runner image name
10+
required: true
11+
default: ubuntu-latest
12+
options:
13+
- windows-latest
14+
- ubuntu-latest
15+
- macos-latest
16+
- windows-11-arm
17+
- ubuntu-24.04-arm
18+
- macos-13
19+
project:
20+
type: string
21+
description: Specify test project path
22+
required: true
23+
default: tests/BenchmarkDotNet.IntegrationTests
24+
options:
25+
- tests/BenchmarkDotNet.Tests
26+
- tests/BenchmarkDotNet.IntegrationTests
27+
- tests/BenchmarkDotNet.IntegrationTests.ManualRunning
28+
framework:
29+
type: choice
30+
description: Specify target framework
31+
required: true
32+
options:
33+
- net8.0
34+
- net462
35+
filter:
36+
type: string
37+
description: Test filter text (It's used for `dotnet test --filter`) Use default value when running all tests
38+
required: true
39+
default: "BenchmarkDotNet"
40+
iteration_count:
41+
type: number
42+
description: Count of test loop (It's expected to be used for flaky tests)
43+
required: true
44+
default: 1
45+
46+
jobs:
47+
test:
48+
name: test (${{ inputs.runs_on }} --framework ${{ inputs.framework}} --filter ${{ inputs.filter }})
49+
runs-on: ${{ inputs.runs_on }}
50+
timeout-minutes: 60 # Explicitly set timeout. When wrong input parameter is passed. It may continue to run until it times out (Default:360 minutes))
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
# Setup
55+
- name: Setup
56+
run: |
57+
mkdir artifacts
58+
59+
# Build
60+
- name: Run build
61+
working-directory: ${{ github.event.inputs.project }}
62+
run: |
63+
dotnet build -c Release --framework ${{ inputs.framework }} -tl:off
64+
65+
# Test
66+
- name: Run tests
67+
shell: pwsh
68+
working-directory: ${{ github.event.inputs.project }}
69+
run: |
70+
$PSNativeCommandUseErrorActionPreference = $true
71+
$iterationCount = ${{ inputs.iteration_count }}
72+
73+
foreach($i in 1..$iterationCount) {
74+
Write-Output ('##[group]Executing Iteration: {0}/${{ inputs.iteration_count }}' -f $i)
75+
76+
dotnet test -c Release --framework ${{ inputs.framework }} --filter ${{ inputs.filter }} -tl:off --no-build --logger "console;verbosity=normal"
77+
78+
Write-Output '##[endgroup]'
79+
}
80+
81+
# Upload artifact files that are located at `$(GITHUB_WORKSPACE)/artifacts` directory
82+
- name: Upload test results
83+
uses: actions/upload-artifact@v4
84+
if: always()
85+
with:
86+
name: results
87+
if-no-files-found: ignore
88+
path: |
89+
artifacts/**/*

.github/workflows/run-tests.yaml

Lines changed: 68 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ jobs:
1717
- name: Disable Windows Defender
1818
run: Set-MpPreference -DisableRealtimeMonitoring $true
1919
shell: powershell
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
21+
# Build and Test
2122
- name: Run task 'build'
2223
shell: cmd
2324
run: ./build.cmd build
2425
- name: Run task 'in-tests-core'
2526
shell: cmd
2627
run: ./build.cmd in-tests-core -e
28+
# Upload Artifacts with Unique Name
2729
- name: Upload test results
28-
uses: actions/upload-artifact@v3
30+
uses: actions/upload-artifact@v4
2931
if: always()
3032
with:
31-
name: test-windows-core-trx
33+
name: test-windows-core-trx-${{ github.run_id }}
3234
path: "**/*.trx"
3335

3436
test-windows-full:
@@ -37,71 +39,118 @@ jobs:
3739
- name: Disable Windows Defender
3840
run: Set-MpPreference -DisableRealtimeMonitoring $true
3941
shell: powershell
40-
- uses: actions/checkout@v3
42+
- uses: actions/checkout@v4
43+
# Build and Test
4144
- name: Run task 'build'
4245
shell: cmd
4346
run: ./build.cmd build
4447
- name: Run task 'in-tests-full'
4548
shell: cmd
4649
run: ./build.cmd in-tests-full -e
50+
# Upload Artifacts with Unique Name
4751
- name: Upload test results
48-
uses: actions/upload-artifact@v3
52+
uses: actions/upload-artifact@v4
4953
if: always()
5054
with:
51-
name: test-windows-full-trx
55+
name: test-windows-full-trx-${{ github.run_id }}
5256
path: "**/*.trx"
5357

5458
test-linux:
5559
runs-on: ubuntu-latest
5660
steps:
57-
- uses: actions/checkout@v3
61+
- uses: actions/checkout@v4
62+
# Set up the environment
5863
- name: Set up Clang
59-
uses: egor-tensin/setup-clang@v1
64+
uses: egor-tensin/setup-clang@ef434b41eb33a70396fb336b1bae39c76d740c3d # v1.4
6065
with:
6166
version: latest
6267
platform: x64
6368
- name: Set up zlib-static
6469
run: sudo apt-get install -y libkrb5-dev
70+
- name: Set up node
71+
uses: actions/setup-node@v4
72+
with:
73+
node-version: "22"
74+
- name: Set up v8
75+
run: npm install jsvu -g && jsvu --os=linux64 --engines=v8 && echo "$HOME/.jsvu/bin" >> $GITHUB_PATH
76+
- name: Install wasm-tools workload
77+
run: ./build.cmd install-wasm-tools
78+
# Build and Test
6579
- name: Run task 'build'
6680
run: ./build.cmd build
6781
- name: Run task 'unit-tests'
6882
run: ./build.cmd unit-tests -e
6983
- name: Run task 'in-tests-core'
7084
run: ./build.cmd in-tests-core -e
85+
# Upload Artifacts with Unique Name
7186
- name: Upload test results
72-
uses: actions/upload-artifact@v3
87+
uses: actions/upload-artifact@v4
7388
if: always()
7489
with:
75-
name: test-linux-trx
90+
name: test-linux-trx-${{ github.run_id }}
7691
path: "**/*.trx"
7792

7893
test-macos:
79-
runs-on: macos-13
94+
name: test-macos (${{ matrix.os.arch }})
95+
runs-on: ${{ matrix.os.runs-on }}
96+
strategy:
97+
matrix:
98+
os:
99+
- runs-on: 'macos-latest'
100+
jsvu-os: 'mac64arm'
101+
arch: 'arm64'
102+
- runs-on: 'macos-13'
103+
jsvu-os: 'mac64'
104+
arch: 'x64'
80105
steps:
81-
- uses: actions/checkout@v3
106+
- uses: actions/checkout@v4
107+
- name: Set up node
108+
uses: actions/setup-node@v4
109+
with:
110+
node-version: "22"
111+
- name: Set up v8
112+
run: npm install jsvu -g && jsvu --os=${{ matrix.os.jsvu-os }} --engines=v8 && echo "$HOME/.jsvu/bin" >> $GITHUB_PATH
113+
- name: Install wasm-tools workload
114+
run: ./build.cmd install-wasm-tools
115+
# Build and Test
82116
- name: Run task 'build'
83117
run: ./build.cmd build
84118
- name: Run task 'unit-tests'
85119
run: ./build.cmd unit-tests -e
86120
- name: Run task 'in-tests-core'
87121
run: ./build.cmd in-tests-core -e
122+
# Upload Artifacts with Unique Name
88123
- name: Upload test results
89-
uses: actions/upload-artifact@v3
124+
uses: actions/upload-artifact@v4
90125
if: always()
91126
with:
92-
name: test-macos-trx
127+
name: test-macos(${{ matrix.os.arch }})-trx-${{ github.run_id }}
93128
path: "**/*.trx"
94-
129+
130+
test-pack:
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@v4
134+
- name: Set up Clang
135+
uses: egor-tensin/setup-clang@v1
136+
with:
137+
version: latest
138+
platform: x64
139+
- name: Set up zlib-static
140+
run: sudo apt-get install -y libkrb5-dev
141+
- name: Run task 'pack'
142+
run: ./build.cmd pack
143+
95144
spellcheck-docs:
96145
runs-on: ubuntu-latest
97146
steps:
98-
- uses: actions/checkout@v3
99-
- uses: actions/setup-node@v3
147+
- uses: actions/checkout@v4
148+
- uses: actions/setup-node@v4
100149
name: Setup node
101150
with:
102-
node-version: "18"
151+
node-version: "22"
103152
- name: Install cSpell
104-
run: npm install -g cspell@8.0.0
153+
run: npm install -g cspell@9.0.2
105154
- name: Copy cSpell config
106155
run: cp ./build/cSpell.json ./cSpell.json
107156
- name: Run cSpell

0 commit comments

Comments
 (0)