Skip to content

Commit 6a78836

Browse files
committed
Restore self-compilation using built compiler in CI tests
1 parent 9f5b4d3 commit 6a78836

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

Diff for: Gulpfile.js

+3
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ const buildSrc = () => buildProject("src");
126126

127127
task("build-src", series(preSrc, buildSrc));
128128

129+
const cleanSrc = () => cleanProject("src");
130+
task("clean-src", series(preSrc, cleanSrc));
131+
129132
/**
130133
* @param {string} entrypoint
131134
* @param {string} output

Diff for: scripts/build/projects.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ProjectQueue {
3232

3333
const execTsc = (/** @type {string[]} */ ...args) =>
3434
exec(process.execPath,
35-
[resolve(findUpRoot(), cmdLineOptions.lkg ? "./lib/tsc" : "./built/local/tsc"),
35+
[resolve(findUpRoot(), cmdLineOptions.lkg ? "./lib/tsc.js" : "./built/local/tsc.js"),
3636
"-b", ...args],
3737
{ hidePrompt: true });
3838

Diff for: scripts/build/tests.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,17 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode)
123123
errorStatus = exitCode;
124124
error = new Error(`Process exited with status code ${errorStatus}.`);
125125
}
126-
// else if (cmdLineOptions.ci) {
127-
// // finally, do a sanity check and build the compiler with the built version of itself
128-
// log.info("Starting sanity check build...");
129-
// // Cleanup everything except lint rules (we'll need those later and would rather not waste time rebuilding them)
130-
// await exec("gulp", ["clean-tsc", "clean-services", "clean-tsserver", "clean-lssl", "clean-tests"]);
131-
// const { exitCode } = await exec("gulp", ["local", "--lkg=false"]);
132-
// if (exitCode !== 0) {
133-
// errorStatus = exitCode;
134-
// error = new Error(`Sanity check build process exited with status code ${errorStatus}.`);
135-
// }
136-
// }
126+
else if (cmdLineOptions.ci) {
127+
// finally, do a sanity check and build the compiler with the built version of itself
128+
log.info("Starting sanity check build...");
129+
// Cleanup everything except lint rules (we'll need those later and would rather not waste time rebuilding them)
130+
await exec("gulp", ["clean-src"]);
131+
const { exitCode } = await exec("gulp", ["build-src", "--built"]);
132+
if (exitCode !== 0) {
133+
errorStatus = exitCode;
134+
error = new Error(`Sanity check build process exited with status code ${errorStatus}.`);
135+
}
136+
}
137137
}
138138
catch (e) {
139139
errorStatus = undefined;

0 commit comments

Comments
 (0)