Skip to content

Commit

Permalink
Add Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
devraymondsh committed Apr 7, 2024
1 parent 7f492c3 commit 366f2b9
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check for newer versions and publish
name: Check for newer versions (Linux AMD64)

on:
schedule:
Expand All @@ -7,7 +7,7 @@ on:

jobs:
update:
name: Check for newer versions of Nodejs and update
name: Check for newer versions (Linux AMD64)
runs-on: ubuntu-latest
container:
image: ubuntu:devel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check for newer versions and publish
name: Check for newer versions (Linux ARM64)

on:
schedule:
Expand All @@ -7,7 +7,7 @@ on:

jobs:
update:
name: Check for newer versions of Nodejs and update
name: Check for newer versions (Linux ARM64)
runs-on: ubuntu-latest
steps:
- uses: pguyot/arm-runner-action@v2
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/windows-amd64-scheduled-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Check for newer versions (Windows AMD64)

on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:

jobs:
update:
name: Check for newer versions (Windows AMD64)
runs-on: windows-latest
steps:
- uses: ilammy/msvc-dev-cmd@v1
- uses: MinoruSekine/setup-scoop@v3
with:
update_path: true
run_as_admin: true
scoop_update: true
buckets: main extras

- name: Install building tools
run: scoop install nodejs python ninja nasm git

- name: Clone the repo
run: git clone https://github.com/devraymondsh/libnode-distributable

- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: Run the script
env:
SCCACHE_GHA_ENABLED: "true"
run: cd libnode-distributable ; node index.js

- name: Find the shared library
run: Get-ChildItem *.dll
9 changes: 6 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ if (!syncFs.existsSync("node")) {
);
}

await spawnAsync("./configure", ["--ninja", "--shared"], "node");

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

0 comments on commit 366f2b9

Please sign in to comment.