Skip to content

Commit 366f2b9

Browse files
committed
Add Windows
1 parent 7f492c3 commit 366f2b9

File tree

4 files changed

+46
-7
lines changed

4 files changed

+46
-7
lines changed

.github/workflows/amd64-linux-scheduled-builds.yml renamed to .github/workflows/linux-amd64-scheduled-builds.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check for newer versions and publish
1+
name: Check for newer versions (Linux AMD64)
22

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

88
jobs:
99
update:
10-
name: Check for newer versions of Nodejs and update
10+
name: Check for newer versions (Linux AMD64)
1111
runs-on: ubuntu-latest
1212
container:
1313
image: ubuntu:devel

.github/workflows/arm64-linux-scheduled-builds.yml renamed to .github/workflows/linux-arm64-scheduled-builds.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check for newer versions and publish
1+
name: Check for newer versions (Linux ARM64)
22

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

88
jobs:
99
update:
10-
name: Check for newer versions of Nodejs and update
10+
name: Check for newer versions (Linux ARM64)
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: pguyot/arm-runner-action@v2
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Check for newer versions (Windows AMD64)
2+
3+
on:
4+
schedule:
5+
- cron: "0 8 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
update:
10+
name: Check for newer versions (Windows AMD64)
11+
runs-on: windows-latest
12+
steps:
13+
- uses: ilammy/msvc-dev-cmd@v1
14+
- uses: MinoruSekine/setup-scoop@v3
15+
with:
16+
update_path: true
17+
run_as_admin: true
18+
scoop_update: true
19+
buckets: main extras
20+
21+
- name: Install building tools
22+
run: scoop install nodejs python ninja nasm git
23+
24+
- name: Clone the repo
25+
run: git clone https://github.com/devraymondsh/libnode-distributable
26+
27+
- name: Run sccache-cache
28+
uses: mozilla-actions/[email protected]
29+
30+
- name: Run the script
31+
env:
32+
SCCACHE_GHA_ENABLED: "true"
33+
run: cd libnode-distributable ; node index.js
34+
35+
- name: Find the shared library
36+
run: Get-ChildItem *.dll

index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ if (!syncFs.existsSync("node")) {
7474
);
7575
}
7676

77-
await spawnAsync("./configure", ["--ninja", "--shared"], "node");
78-
79-
await spawnAsync("make", [`-j${threadCount}`], "node");
77+
if (process.platform == "linux") {
78+
await spawnAsync("./configure", ["--ninja", "--shared"], "node");
79+
await spawnAsync("make", [`-j${threadCount}`], "node");
80+
} else if (process.platform == "win32") {
81+
await spawnAsync(".\\vcbuild", ["--shared"], "node");
82+
}

0 commit comments

Comments
 (0)