forked from node-pcap/node_pcap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix basic running on Windows and enable prebuild
- Loading branch information
Showing
6 changed files
with
84 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest ] | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
node: [ 18, 20, 22 ] | ||
fail-fast: false | ||
steps: | ||
|
@@ -29,10 +29,18 @@ jobs: | |
brew update | ||
brew install libpcap | ||
shell: bash | ||
- name: Add msbuild to PATH | ||
if: matrix.os == 'windows' | ||
uses: microsoft/[email protected] | ||
- name: Install node-gyp | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
npm install --global node-gyp@latest | ||
- name: Build | ||
run: | | ||
npm install --build-from-source | ||
- name: Test | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
npm test | ||
timeout-minutes: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,12 @@ on: | |
workflow_dispatch: | ||
|
||
jobs: | ||
prebuild-macos: | ||
name: macOS | ||
runs-on: macos-latest | ||
prebuild: | ||
strategy: | ||
matrix: | ||
os: [ macos, windows ] | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }}-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
|
@@ -19,10 +22,18 @@ jobs: | |
node-version: latest | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install dependencies | ||
if: matrix.os == 'macos' | ||
run: | | ||
brew update | ||
brew install libpcap | ||
shell: bash | ||
- name: Add msbuild to PATH | ||
if: matrix.os == 'windows' | ||
uses: microsoft/[email protected] | ||
- name: Install node-gyp | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
npm install --global node-gyp@latest | ||
- name: Dependencies | ||
run: | | ||
npm install --ignore-scripts | ||
|
@@ -35,6 +46,7 @@ jobs: | |
env: | ||
MAKEFLAGS: -j4 | ||
- name: Publish | ||
if: matrix.os == 'macos' | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters