@@ -41,6 +41,10 @@ resources:
4141 type : github
4242 endpoint : Microsoft
4343 name : microsoft/TypeScript
44+ - repository : typescript-go
45+ type : github
46+ endpoint : Microsoft
47+ name : microsoft/typescript-go
4448
4549 # https://stackoverflow.com/a/63276774
4650 pipelines :
@@ -85,6 +89,10 @@ parameters:
8589 displayName : Exhaustive list of agents
8690 type : string
8791 default : ' any,ts-perf1,ts-perf2,ts-perf3,ts-perf4,ts-perf5,ts-perf6,ts-perf7,ts-perf8,ts-perf9,ts-perf10,ts-perf11,ts-perf12'
92+ - name : TS_GO
93+ displayName : boolean to describe if building ts-go
94+ type : boolean
95+ default : false
8896
8997variables :
9098 Codeql.Enabled : false
@@ -95,7 +103,15 @@ variables:
95103 azureSubscription : ' TypeScript Public CI'
96104 KeyVaultName : ' jststeam-passwords'
97105
98- REF : $[ resources.repositories['TypeScript'].ref ]
106+ ${{ if eq(parameters.TS_GO, true) }} :
107+ REPO : ' typescript-go'
108+ REF : $[ replace(resources.repositories['typescript-go'].ref, 'heads/../', '') ]
109+ TSGOFLAG : ' --tsgo'
110+ ${{ else }} :
111+ REPO : ' TypeScript'
112+ REF : $[ replace(resources.repositories['TypeScript'].ref, 'heads/../', '') ]
113+ TSGOFLAG : ' '
114+
99115 PRETTY_REF : $[ replace(replace(replace(replace(variables['REF'], '/merge', ''), 'refs/pull/', 'pr.'), 'refs/heads/', ''), '/', '_') ]
100116 IS_PR : $[ startsWith(variables['REF'], 'refs/pull/') ]
101117 # True if this run should demand a baseline machine.
@@ -122,19 +138,27 @@ jobs:
122138
123139 variables :
124140 ARTIFACTS_DIR : $(Pipeline.Workspace)/artifacts
125- TYPESCRIPT_DIR : $(Pipeline.Workspace)/TypeScript
141+ TYPESCRIPT_DIR : $(Pipeline.Workspace)/$(REPO)
126142 TSPERF_PRESET : ${{ parameters.TSPERF_PRESET }}
127143
128144 steps :
129145 - template : templates/setup.yml
130146 - template : templates/cloneAndBuildBenchmarkRepo.yml # Sets $(BENCH_SCRIPTS), $(TSPERF_EXE)
131147
132- - checkout : TypeScript
133- path : TypeScript
134- fetchTags : false
135- fetchDepth : 2 # For PRs, we want the merge base to compare against.
136- clean : true
137- retryCountOnTaskFailure : 3
148+ - ${{ if eq(parameters.TS_GO, true) }} :
149+ - checkout : typescript-go
150+ path : typescript-go
151+ fetchTags : false
152+ fetchDepth : 2 # For PRs, we want the merge base to compare against.
153+ clean : true
154+ retryCountOnTaskFailure : 3
155+ - ${{ else }} :
156+ - checkout : TypeScript
157+ path : TypeScript
158+ fetchTags : false
159+ fetchDepth : 2 # For PRs, we want the merge base to compare against.
160+ clean : true
161+ retryCountOnTaskFailure : 3
138162
139163 # Ideally we'd just do this:
140164 # git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
@@ -146,7 +170,7 @@ jobs:
146170 set -exo pipefail
147171 OLD_REF=`git -C $(TYPESCRIPT_DIR) rev-parse HEAD`
148172 rm -rf $(TYPESCRIPT_DIR)
149- git clone --filter=blob:none https://github.com/microsoft/TypeScript $(TYPESCRIPT_DIR)
173+ git clone --filter=blob:none https://github.com/microsoft/$(REPO) $(TYPESCRIPT_DIR)
150174 cd $(TYPESCRIPT_DIR)
151175 git fetch origin $(OLD_REF)
152176 git switch --detach FETCH_HEAD
@@ -160,6 +184,8 @@ jobs:
160184 node $(BENCH_SCRIPTS)/setupPipeline.js
161185 displayName: Setup pipeline
162186 name: setupPipeline
187+ env:
188+ TSGOFLAG: $(TSGOFLAG)
163189
164190 - bash : |
165191 set -exo pipefail
@@ -170,7 +196,7 @@ jobs:
170196
171197 - bash : |
172198 set -exo pipefail
173- node $(BENCH_SCRIPTS)/buildTypeScript.js --outputDir $(ARTIFACTS_DIR)/new
199+ node $(BENCH_SCRIPTS)/buildTypeScript.js --outputDir $(ARTIFACTS_DIR)/new $(TSGOFLAG)
174200 displayName: Build new TypeScript
175201 condition: and(succeeded(), eq(variables['TSPERF_IS_COMPARISON'], 'true'))
176202 workingDirectory: $(TYPESCRIPT_DIR)
@@ -185,7 +211,7 @@ jobs:
185211
186212 - bash : |
187213 set -exo pipefail
188- node $(BENCH_SCRIPTS)/buildTypeScript.js --baseline --outputDir $(ARTIFACTS_DIR)/baseline
214+ node $(BENCH_SCRIPTS)/buildTypeScript.js --baseline --outputDir $(ARTIFACTS_DIR)/baseline $(TSGOFLAG)
189215 displayName: Build baseline TypeScript
190216 workingDirectory: $(TYPESCRIPT_DIR)
191217 name: buildTypeScriptBaseline
@@ -226,6 +252,12 @@ jobs:
226252 artifact : BuiltTypeScript
227253 displayName : Download built TypeScript
228254
255+ - ${{ if eq(parameters.TS_GO, true) }} :
256+ - bash : |
257+ set -exo pipefail
258+ find $(BUILT_TYPESCRIPT_DIR) -name 'tsgo' -type f -exec chmod +x {} +
259+ displayName: Make tsgo executable
260+
229261 # This is provided by the agent.
230262 - bash : |
231263 set -exo pipefail
@@ -237,7 +269,6 @@ jobs:
237269 node $(BENCH_SCRIPTS)/runTsPerf.js install-hosts
238270 displayName: Install hosts
239271 retryCountOnTaskFailure: 3
240-
241272 - bash : |
242273 set -exo pipefail
243274 # Special case for self benchmark
@@ -397,7 +428,7 @@ jobs:
397428
398429 - bash : |
399430 set -exo pipefail
400- node $(BENCH_SCRIPTS)/postPerfResult.js --fragment $(Pipeline.Workspace)/comment.html
431+ node $(BENCH_SCRIPTS)/postPerfResult.js --fragment $(Pipeline.Workspace)/comment.html $(TSGOFLAG)
401432 displayName: Publish PR comment
402433 condition: and(succeeded(), eq(variables['IS_PR'], 'true'))
403434 env:
@@ -480,7 +511,7 @@ jobs:
480511
481512 - bash : |
482513 set -exo pipefail
483- node $(BENCH_SCRIPTS)/postPerfResult.js --failed
514+ node $(BENCH_SCRIPTS)/postPerfResult.js --failed $(TSGOFLAG)
484515 displayName: Publish PR comment
485516 env:
486517 DISTINCT_ID: ${{ parameters.DISTINCT_ID }}
0 commit comments