Skip to content

Commit

Permalink
Restore self-compilation using built compiler in CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Oct 10, 2022
1 parent 8d7b12f commit a1f24e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions Gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ const buildSrc = () => buildProject("src");

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

const cleanSrc = () => cleanProject("src");
task("clean-src", series(preSrc, cleanSrc));

/**
* @param {string} entrypoint
* @param {string} output
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/projects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ProjectQueue {

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

Expand Down
22 changes: 11 additions & 11 deletions scripts/build/tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, _wa
errorStatus = exitCode;
error = new Error(`Process exited with status code ${errorStatus}.`);
}
// else if (cmdLineOptions.ci && runJs.startsWith("built")) {
// // finally, do a sanity check and build the compiler with the built version of itself
// log.info("Starting sanity check build...");
// // Cleanup everything except lint rules (we'll need those later and would rather not waste time rebuilding them)
// await exec("gulp", ["clean-tsc", "clean-services", "clean-tsserver", "clean-lssl", "clean-tests"]);
// const { exitCode } = await exec("gulp", ["local", "--lkg=false"]);
// if (exitCode !== 0) {
// errorStatus = exitCode;
// error = new Error(`Sanity check build process exited with status code ${errorStatus}.`);
// }
// }
else if (cmdLineOptions.ci && runJs.startsWith("built")) {
// finally, do a sanity check and build the compiler with the built version of itself
log.info("Starting sanity check build...");
// Cleanup everything except lint rules (we'll need those later and would rather not waste time rebuilding them)
await exec("gulp", ["clean-src"]);
const { exitCode } = await exec("gulp", ["build-src", "--built"]);
if (exitCode !== 0) {
errorStatus = exitCode;
error = new Error(`Sanity check build process exited with status code ${errorStatus}.`);
}
}
}
catch (e) {
errorStatus = undefined;
Expand Down

0 comments on commit a1f24e5

Please sign in to comment.