Skip to content

Commit 159ca50

Browse files
Add base template files for GC Infra CI tests in Azure Pipelines (dotnet#1547)
* Add new yml files for GC CI runs * Initial template for GC Infra CI tests in Azure Pipelines. * Added "include" paths to azure-pipelines-gc Co-authored-by: Drew Scoggins <[email protected]>
1 parent e67c80b commit 159ca50

File tree

3 files changed

+116
-0
lines changed

3 files changed

+116
-0
lines changed

azure-pipelines-gc.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
resources:
2+
containers:
3+
- container: ubuntu_x64_build_container
4+
image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544
5+
6+
# Trigger builds for PR's targeting master
7+
pr:
8+
branches:
9+
include:
10+
- master
11+
paths:
12+
include:
13+
- src/benchmarks/gc/__main__.py
14+
- src/benchmarks/gc/src/*
15+
exclude:
16+
- src/benchmarks/gc/docs/*
17+
- src/benchmarks/gc/.gitignore
18+
- src/benchmarks/gc/README.md
19+
- src/benchmarks/gc/jupyter_notebook.py
20+
21+
jobs:
22+
23+
- template: /eng/performance/gc_jobs.yml
24+
parameters:
25+
osName: windows
26+
osVersion: RS5
27+
architecture: x64
28+
pool: Hosted VS2017
29+
kind: scenarios
30+
queue: Windows.10.Amd64.ClientRS5.Open

eng/performance/gc_jobs.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
parameters:
2+
osName: '' # required -- windows | linux | macos
3+
osVersion: '' # required -- OS version
4+
kind: '' # required -- benchmark kind. As of today, only "micro" and "mlnet" benchmarks are supported, we plan to add "scenarios" soon
5+
architecture: '' # required -- Architecture. Allowed values: x64, x86, arm, arm64
6+
pool: '' # required -- name of the Helix pool
7+
queue: '' # required -- name of the Helix queue
8+
container: '' # optional -- id of the container
9+
10+
jobs:
11+
- template: ../common/templates/jobs/jobs.yml
12+
parameters:
13+
enableTelemetry: false
14+
enablePublishBuildArtifacts: true
15+
helixRepo: dotnet/performance
16+
jobs:
17+
- job: '${{ parameters.osName }}_${{ parameters.osVersion }}_${{ parameters.architecture }}_${{ parameters.kind }}'
18+
displayName: '${{ parameters.osName }} ${{ parameters.osVersion }} ${{ parameters.architecture }} ${{ parameters.kind }}'
19+
timeoutInMinutes: 320
20+
variables:
21+
- name: Python
22+
value: 'py -3'
23+
- group: DotNet-HelixApi-Access
24+
workspace:
25+
clean: all
26+
pool:
27+
name: ${{ parameters.pool }}
28+
container: ${{ parameters.container }}
29+
30+
steps:
31+
- checkout: self
32+
clean: true
33+
- script: $(Python) scripts/gcinfra_setup.py
34+
displayName: Set up GCPerf, GCPerfSim, and C Tools
35+
36+
#Your steps here
37+
38+
# - template: /eng/performance/send-to-helix.yml
39+
# parameters:
40+
# HelixSource: '$(HelixSourcePrefix)/dotnet/performance/$(Build.SourceBranch)' # Need to update this
41+
# HelixType: 'test/performance_$(_BuildConfig)/' #Need to update this
42+
# HelixAccessToken: $(HelixApiAccessToken)
43+
# HelixTargetQueues: ${{ parameters.queue }}
44+
# HelixPreCommands: $(HelixPreCommand)
45+
# Creator: $(Creator)
46+
# Architecture: ${{ parameters.architecture }}
47+
# TargetCsproj: ${{ parameters.csproj }}
48+
# WorkItemTimeout: 4:00 # 4 hours
49+
# Python: $(Python)
50+
# ${{ if eq(parameters.osName, 'windows') }}:
51+
# WorkItemDirectory: '$(Build.SourcesDirectory)\docs' # Need to update this
52+
# CorrelationPayloadDirectory: '$(Build.SourcesDirectory)\notLocked' # Need to update this

scripts/gcinfra_setup.py

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env python3
2+
3+
import os
4+
import sys
5+
6+
from performance.common import get_repo_root_path
7+
from performance.common import push_dir
8+
from performance.common import RunCommand
9+
10+
def _get_gcinfra_path() -> str:
11+
return os.path.join(get_repo_root_path(), "src", "benchmarks", "gc")
12+
13+
def __main(args: list) -> int:
14+
infra_base_path = _get_gcinfra_path()
15+
with push_dir(infra_base_path):
16+
gcperfsim_path = os.path.join(infra_base_path, "src", "exec", "GCPerfSim")
17+
gcperf_path = os.path.join(infra_base_path, "src", "analysis", "managed-lib")
18+
ctools_path = os.path.join(infra_base_path, "src", "exec", "env")
19+
20+
with push_dir(gcperfsim_path):
21+
cmdline = ['dotnet', 'build', '-c', 'release']
22+
RunCommand(cmdline, verbose=True).run()
23+
24+
with push_dir(gcperf_path):
25+
cmdline = ['dotnet', 'publish']
26+
RunCommand(cmdline, verbose=True).run()
27+
28+
with push_dir(ctools_path):
29+
cmdline = ['build.cmd']
30+
RunCommand(cmdline, verbose=True).run()
31+
return 0
32+
33+
if __name__ == "__main__":
34+
__main(sys.argv[1:])

0 commit comments

Comments
 (0)