Skip to content

Commit 8373294

Browse files
committed
Use strategies
1 parent f2146a1 commit 8373294

File tree

4 files changed

+21
-45
lines changed

4 files changed

+21
-45
lines changed

.github/workflows/linux-amd64-daily-check.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/linux-arm64-daily-check.yml renamed to .github/workflows/linux-daily-check.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Linux ARM64 daily check
1+
name: Linux daily check
22

33
on:
44
schedule:
@@ -7,10 +7,14 @@ on:
77

88
jobs:
99
update:
10-
name: Linux ARM64 daily check
10+
name: Linux daily check
1111
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
arch: [amd64, arm64]
1215
steps:
13-
- uses: pguyot/arm-runner-action@v2
16+
- if: matrix.arch == 'arm64'
17+
uses: pguyot/arm-runner-action@v2
1418

1519
- name: Update system
1620
run: sudo apt-get update && sudo apt-get --yes upgrade

.github/workflows/windows-amd64-daily-check.yml renamed to .github/workflows/windows-daily-check.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows AMD64 daily check
1+
name: Windows daily check
22

33
on:
44
schedule:
@@ -7,10 +7,16 @@ on:
77

88
jobs:
99
update:
10-
name: Windows AMD64 daily check
10+
name: Windows daily check
1111
runs-on: windows-latest
12+
strategy:
13+
matrix:
14+
arch: [amd64, amd64_arm64]
1215
steps:
1316
- uses: ilammy/msvc-dev-cmd@v1
17+
with:
18+
arch: ${{ matrix.arch }}
19+
1420
- uses: MinoruSekine/setup-scoop@v3
1521
with:
1622
buckets: extras
@@ -29,8 +35,9 @@ jobs:
2935

3036
- name: Run the script
3137
env:
38+
ARCH: ${{ matrix.arch }}
3239
SCCACHE_GHA_ENABLED: "true"
3340
run: cd libnode-distributable ; node index.js
3441

3542
- name: Find the shared library
36-
run: Get-ChildItem *.dll
43+
run: dir /s libnode-distributable\node\out\Release\libnode.dll

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ const threadCount = coreCount * 2;
88

99
let CC = process.env.CC;
1010
let CXX = process.env.CXX;
11+
let ARCH = process.env.CXX;
1112
if (!CC) CC = "gcc";
1213
if (!CXX) CXX = "g++";
14+
if (!ARCH) ARCH = "x64";
1315

1416
const nodejsGithubRepo = "https://github.com/nodejs/node";
1517
const removeTheVCharacter = (str) => str.replace("v", "");
@@ -78,5 +80,6 @@ if (process.platform == "linux") {
7880
await spawnAsync("./configure", ["--ninja", "--shared"], "node");
7981
await spawnAsync("make", [`-j${threadCount}`], "node");
8082
} else if (process.platform == "win32") {
81-
await spawnAsync("vcbuild.bat", ["dll"], "node");
83+
const arch = ARCH == "x64" ? "x64" : "arm64";
84+
await spawnAsync("vcbuild.bat", [arch, "dll"], "node");
8285
}

0 commit comments

Comments
 (0)