Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykingxyz committed Sep 21, 2023
1 parent a2cfe22 commit b7105ca
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ runs:
cache: 'pnpm'
- name: Install dependencies
shell: bash
run: $PNPM_HOME/pnpm --version && $PNPM_HOME/pnpm install
run: |
export PATH=$PNPM_HOME:$PATH
pnpm --version && pnpm install
- name: Use rust cache
uses: actions/cache@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/scheduled_bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
uses: ./.github/actions/env
- name: Build rspack
run: node bin/build-rspack.js
- name: Debug
uses: csexton/debugger-action@master
- name: Run benchmark
run: node bin/bench.js
- id: print-compare-results
Expand Down
1 change: 1 addition & 0 deletions lib/rspack.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export async function buildRspack(remote, branch) {
await switchToBranch(remote, branch);

console.log("== install deps ==");
await runCommand("pnpm", ["--version"]);
await runCommand("pnpm", ["install"]);

console.log("== build rspack ==");
Expand Down
10 changes: 10 additions & 0 deletions lib/scenarios/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import path from "path";
import { readFile, unlink, writeFile } from "fs/promises";
import { fileURLToPath } from "url";
import { runCommand } from "../utils.js";
import { spawnSync } from "child_process";
import {
getDirSizes,
calcStatistics,
Expand Down Expand Up @@ -41,6 +42,15 @@ async function runRspack(ctx) {
}
};
let remainingLine = "";

console.log(123);
spawnSync(
process.env.RSPACK_CLI_BIN ||
path.resolve(rootDir, ".rspack/packages/rspack-cli/bin/rspack"),
ctx.rspackArgs,
{ stdio: [process.stdin, process.stdout, process.stderr] }
);
console.log(321);
await runCommand(
process.env.RSPACK_CLI_BIN ||
path.resolve(rootDir, ".rspack/packages/rspack-cli/bin/rspack"),
Expand Down

0 comments on commit b7105ca

Please sign in to comment.