Skip to content

Commit 712858a

Browse files
committed
Use sccache
1 parent 3124ff6 commit 712858a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/scheduled-builds.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
- name: Clone the repo
2525
run: git clone https://github.com/devraymondsh/libnode-distributable
2626

27-
- run: cd libnode-distributable && node index.js
27+
- name: Run sccache-cache
28+
uses: mozilla-actions/[email protected]
29+
2830
- name: Run the script
29-
uses: hendrikmuhs/[email protected]
31+
run: cd libnode-distributable && node index.js
3032

3133
- name: A buncha ls
3234
run: ls libnode-distributable/node/out ; ls libnode-distributable/node/out/Release

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { spawn } from "node:child_process";
55

66
const coreCount = os.cpus().length;
77
const threadCount = coreCount * 2;
8-
const ccacheEnv = { CC: "ccache gcc", CXX: "ccache g++" };
8+
const sccacheEnv = { CC: "sccache gcc", CXX: "sccache g++" };
99

1010
const nodejsGithubRepo = "https://github.com/nodejs/node";
1111
const removeTheVCharacter = (str) => str.replace("v", "");
@@ -74,9 +74,9 @@ if (!syncFs.existsSync("node")) {
7474

7575
await spawnAsync(
7676
"./configure",
77-
["--ninja", "--shared"],
77+
[`CC="sccache gcc"`, `CXX="sccache g++"`, "--ninja", "--shared"],
7878
"node",
79-
ccacheEnv
79+
sccacheEnv
8080
);
8181

82-
await spawnAsync("make", [`-j${threadCount}`], "node", ccacheEnv);
82+
await spawnAsync("make", [`-j${threadCount}`], "node", sccacheEnv);

0 commit comments

Comments
 (0)