From 426f4f9e3fc8829fbecc27d906f0154f2a7cbcba Mon Sep 17 00:00:00 2001 From: Cameron Aavik Date: Fri, 11 Aug 2023 00:59:17 +0000 Subject: [PATCH 1/6] Updated performance-setup.ps1 --- eng/testing/performance/performance-setup.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1 index 8caea345a893d..080575b6e804d 100644 --- a/eng/testing/performance/performance-setup.ps1 +++ b/eng/testing/performance/performance-setup.ps1 @@ -128,7 +128,7 @@ if ($RunFromPerformanceRepo) { robocopy $SourceDirectory $PerformanceDirectory /E /XD $PayloadDirectory $SourceDirectory\artifacts $SourceDirectory\.git } else { - git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory + git clone --branch caaavik/crank-runner-wip --depth 1 --quiet https://github.com/caaavik-msft/performance $PerformanceDirectory } if ($MonoDotnet -ne "") { From b39c5809fe029c58cf9b60d117abb67a2a4209f3 Mon Sep 17 00:00:00 2001 From: Cameron Aavik Date: Fri, 11 Aug 2023 01:00:07 +0000 Subject: [PATCH 2/6] Updated performance-setup.sh --- eng/testing/performance/performance-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh index 9a1c95ec73082..d3044437893c9 100755 --- a/eng/testing/performance/performance-setup.sh +++ b/eng/testing/performance/performance-setup.sh @@ -385,7 +385,7 @@ else if [[ -n "$perf_fork" ]]; then git clone --branch $perf_fork_branch --depth 1 --quiet $perf_fork $performance_directory else - git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $performance_directory + git clone --branch caaavik/crank-runner-wip --depth 1 --quiet https://github.com/caaavik-msft/performance.git $performance_directory fi # uncomment to use BenchmarkDotNet sources instead of nuget packages # git clone https://github.com/dotnet/BenchmarkDotNet.git $benchmark_directory From c4ca341db20c7fd26f22aae19b578d44469d8c8b Mon Sep 17 00:00:00 2001 From: Cameron Aavik Date: Fri, 11 Aug 2023 12:22:32 +1000 Subject: [PATCH 3/6] Update yaml files to work with updated ci_setup --- .../coreclr/templates/run-performance-job.yml | 10 +++++++++- .../coreclr/templates/run-scenarios-job.yml | 12 ++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index ba93a839ad42e..ff76f63256ddd 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -55,6 +55,9 @@ jobs: - IsInternal: '' - HelixApiAccessToken: '' + - ${{ if eq( parameters.osGroup, 'windows') }}: + - name: TargetsWindowsParam + value: '--target-windows' - ${{ if and(eq(parameters.runtimeType, 'wasm'), in(variables['Build.Reason'], 'PullRequest')) }}: - HelixPerfUploadTokenValue: '' - ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.osGroup, 'windows')) }}: @@ -162,7 +165,12 @@ jobs: displayName: Performance Setup (Unix) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) ${{ parameters.additionalSetupParameters }} + - ${{ if ne(parameters.osName, 'windows') }}: + - script: wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && $(Python) get-pip.py --user + displayName: Ensure pip is installed + - script: $(Python) -m pip install --user dataclasses + displayName: Install dataclasses library used in ci_setup.py + - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) ${{ parameters.additionalSetupParameters }} $(TargetsWindowsParam) displayName: Run ci setup script # Run perf testing in helix - template: /eng/pipelines/coreclr/templates/perf-send-to-helix.yml diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml index bc142530cc52d..26c0d2a6501cd 100644 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml @@ -49,6 +49,9 @@ jobs: - IsInternal: '' - HelixApiAccessToken: '' + - ${{ if eq( parameters.osGroup, 'windows') }}: + - name: TargetsWindowsParam + value: '--target-windows' - SharedHelixPreCommands: '' - AdditionalHelixPreCommands: '' - AdditionalHelixPostCommands: '' @@ -131,10 +134,15 @@ jobs: condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} # run ci-setup - - script: $(Python) $(PerformanceDirectory)\scripts\ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)\machine-setup.cmd + - ${{ if ne(parameters.osName, 'windows') }}: + - script: wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && $(Python) get-pip.py --user + displayName: Ensure pip is installed + - script: $(Python) -m pip install --user dataclasses + displayName: Install dataclasses library used in ci_setup.py + - script: $(Python) $(PerformanceDirectory)\scripts\ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)\machine-setup $(TargetsWindowsParam) displayName: Run ci setup script (Windows) condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) - - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)/machine-setup.sh + - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)/machine-setup $(TargetsWindowsParam) displayName: Run ci setup script (Linux/MAC) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) # copy wasm packs if running on wasm From d96f593ee1f934e5c898e0c095056a19918b6e84 Mon Sep 17 00:00:00 2001 From: Cameron Aavik Date: Fri, 11 Aug 2023 12:48:26 +1000 Subject: [PATCH 4/6] Undo all changes except pip installation --- eng/pipelines/coreclr/templates/run-performance-job.yml | 5 +---- eng/pipelines/coreclr/templates/run-scenarios-job.yml | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index ff76f63256ddd..fe8a0252cb7e9 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -55,9 +55,6 @@ jobs: - IsInternal: '' - HelixApiAccessToken: '' - - ${{ if eq( parameters.osGroup, 'windows') }}: - - name: TargetsWindowsParam - value: '--target-windows' - ${{ if and(eq(parameters.runtimeType, 'wasm'), in(variables['Build.Reason'], 'PullRequest')) }}: - HelixPerfUploadTokenValue: '' - ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.osGroup, 'windows')) }}: @@ -170,7 +167,7 @@ jobs: displayName: Ensure pip is installed - script: $(Python) -m pip install --user dataclasses displayName: Install dataclasses library used in ci_setup.py - - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) ${{ parameters.additionalSetupParameters }} $(TargetsWindowsParam) + - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) ${{ parameters.additionalSetupParameters }} displayName: Run ci setup script # Run perf testing in helix - template: /eng/pipelines/coreclr/templates/perf-send-to-helix.yml diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml index 26c0d2a6501cd..c6a2553502f57 100644 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml @@ -49,9 +49,6 @@ jobs: - IsInternal: '' - HelixApiAccessToken: '' - - ${{ if eq( parameters.osGroup, 'windows') }}: - - name: TargetsWindowsParam - value: '--target-windows' - SharedHelixPreCommands: '' - AdditionalHelixPreCommands: '' - AdditionalHelixPostCommands: '' @@ -139,10 +136,10 @@ jobs: displayName: Ensure pip is installed - script: $(Python) -m pip install --user dataclasses displayName: Install dataclasses library used in ci_setup.py - - script: $(Python) $(PerformanceDirectory)\scripts\ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)\machine-setup $(TargetsWindowsParam) + - script: $(Python) $(PerformanceDirectory)\scripts\ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)\machine-setup.cmd displayName: Run ci setup script (Windows) condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) - - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)/machine-setup $(TargetsWindowsParam) + - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)/machine-setup.sh displayName: Run ci setup script (Linux/MAC) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) # copy wasm packs if running on wasm From f70f0c23e5f064a5f6cb14f63209222c585d2072 Mon Sep 17 00:00:00 2001 From: Cameron Aavik Date: Fri, 11 Aug 2023 13:52:58 +1000 Subject: [PATCH 5/6] Fix windows check --- eng/pipelines/coreclr/templates/run-performance-job.yml | 6 +++--- eng/pipelines/coreclr/templates/run-scenarios-job.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index fe8a0252cb7e9..9cde063db857b 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -162,9 +162,9 @@ jobs: displayName: Performance Setup (Unix) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - - ${{ if ne(parameters.osName, 'windows') }}: - - script: wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && $(Python) get-pip.py --user - displayName: Ensure pip is installed + - script: wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && $(Python) get-pip.py --user + displayName: Ensure pip is installed (non-Windows) + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) - script: $(Python) -m pip install --user dataclasses displayName: Install dataclasses library used in ci_setup.py - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) ${{ parameters.additionalSetupParameters }} diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml index c6a2553502f57..3a767657b7506 100644 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml @@ -131,9 +131,9 @@ jobs: condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} # run ci-setup - - ${{ if ne(parameters.osName, 'windows') }}: - - script: wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && $(Python) get-pip.py --user - displayName: Ensure pip is installed + - script: wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && $(Python) get-pip.py --user + displayName: Ensure pip is installed (non-Windows) + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) - script: $(Python) -m pip install --user dataclasses displayName: Install dataclasses library used in ci_setup.py - script: $(Python) $(PerformanceDirectory)\scripts\ci_setup.py $(SetupArguments) $(ExtraSetupArguments) --output-file $(WorkItemDirectory)\machine-setup.cmd From 3aac3a6a099fcc0bd426cd39618bf121710b0fc0 Mon Sep 17 00:00:00 2001 From: Cameron Aavik Date: Fri, 11 Aug 2023 16:15:34 +1000 Subject: [PATCH 6/6] Point git clone back at main --- eng/testing/performance/performance-setup.ps1 | 2 +- eng/testing/performance/performance-setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1 index 080575b6e804d..8caea345a893d 100644 --- a/eng/testing/performance/performance-setup.ps1 +++ b/eng/testing/performance/performance-setup.ps1 @@ -128,7 +128,7 @@ if ($RunFromPerformanceRepo) { robocopy $SourceDirectory $PerformanceDirectory /E /XD $PayloadDirectory $SourceDirectory\artifacts $SourceDirectory\.git } else { - git clone --branch caaavik/crank-runner-wip --depth 1 --quiet https://github.com/caaavik-msft/performance $PerformanceDirectory + git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory } if ($MonoDotnet -ne "") { diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh index d3044437893c9..9a1c95ec73082 100755 --- a/eng/testing/performance/performance-setup.sh +++ b/eng/testing/performance/performance-setup.sh @@ -385,7 +385,7 @@ else if [[ -n "$perf_fork" ]]; then git clone --branch $perf_fork_branch --depth 1 --quiet $perf_fork $performance_directory else - git clone --branch caaavik/crank-runner-wip --depth 1 --quiet https://github.com/caaavik-msft/performance.git $performance_directory + git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $performance_directory fi # uncomment to use BenchmarkDotNet sources instead of nuget packages # git clone https://github.com/dotnet/BenchmarkDotNet.git $benchmark_directory