Skip to content

Commit 4069323

Browse files
1 parent 5d9851d commit 4069323

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2722
-2601
lines changed

.github/dependabot.yml

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

.github/workflows/test.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
test_linux:
12+
name: Test Linux
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [ 16.x, 18.x, 20.x, latest ]
17+
steps:
18+
- name: Disable sudo PATH replace
19+
run: |
20+
sudo cat /etc/sudoers | grep -v "secure_path=" > /tmp/.sudoers.tmp
21+
cat /tmp/.sudoers.tmp | sudo tee /etc/sudoers
22+
rm /tmp/.sudoers.tmp
23+
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- uses: actions/setup-go@v4
33+
with:
34+
go-version-file: addon/userspace/go/go.mod
35+
go-version: ">=1.22.0"
36+
37+
- name: "Setup zig"
38+
uses: korandoru/setup-zig@v1
39+
with:
40+
zig-version: "master"
41+
42+
- name: Install build dependencies
43+
run: sudo apt update && sudo apt install -y build-essential
44+
45+
- name: Install node dependencies
46+
run: npm install --no-save --no-audit --no-fund --ignore-scripts
47+
48+
- name: Run tests
49+
run: ./node_modules/.bin/rebory build && sudo node --no-warnings --loader ts-node/esm src/index_test.js

.github/workflows/test.yml

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ node_modules/
1111
.DS_Store
1212
*.log
1313

14+
# Addon
15+
addon/userspace/wg-go.*
16+
1417
# Typescript
1518
*.tsbuildinfo
1619
src/**/*.d.ts

.gitlab-ci.yml

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

.vscode/c_cpp_properties.json

Lines changed: 26 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,46 @@
11
{
2-
"version": 4,
32
"configurations": [
43
{
5-
"name": "Win32",
6-
"cStandard": "c17",
7-
"cppStandard": "c++17",
8-
"intelliSenseMode": "windows-msvc-x64",
9-
"compilerArgs": [
10-
"-fpermissive",
11-
"-fexceptions",
12-
"-w",
13-
"-fpermissive",
14-
"-fPIC",
15-
"-static"
4+
"name": "Mac",
5+
"includePath": [
6+
"/usr/local/include/node",
7+
"/usr/local/lib/zig//libc/include/any-linux-any",
8+
"${workspaceFolder}/node_modules/node-addon-api",
9+
"${workspaceFolder}/**",
10+
"${workspaceFolder}/addon"
1611
],
1712
"defines": [
18-
"NAPI_DISABLE_CPP_EXCEPTIONS",
19-
"ONSTARTADDON",
20-
"LISTDEV",
21-
"GETCONFIG",
22-
"SETCONFIG",
23-
"DELIFACE"
13+
"AF_NETLINK=16"
14+
],
15+
"macFrameworkPath": [
16+
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
2417
],
25-
"includePath": [
26-
"${env:appdata}/../Local/node-gyp/Cache/18.17.0/include/node",
27-
"${workspaceFolder}/node_modules/node-addon-api",
28-
"${workspaceFolder}/addons/genKey/**",
29-
"${workspaceFolder}/addons/tools/**"
30-
]
31-
},
32-
{
33-
"name": "Linux",
3418
"compilerPath": "/usr/bin/clang",
3519
"cStandard": "c17",
3620
"cppStandard": "c++17",
37-
"intelliSenseMode": "linux-clang-x64",
38-
"compilerArgs": [
39-
"-fpermissive",
40-
"-fexceptions",
41-
"-w",
42-
"-fpermissive",
43-
"-fPIC",
44-
"-static"
45-
],
46-
"defines": [
47-
"NAPI_DISABLE_CPP_EXCEPTIONS"
48-
],
21+
"intelliSenseMode": "macos-clang-x64"
22+
},
23+
{
24+
"name": "Linux",
4925
"includePath": [
26+
"${workspaceFolder}/node_modules/node-addon-api",
5027
"/usr/include/node",
51-
"${workspaceFolder}/node_modules/node-addon-api/**",
52-
"${workspaceFolder}/node_modules/**",
53-
"${workspaceFolder}/addons/genKey/**",
54-
"${workspaceFolder}/addons/tools/**"
28+
"${workspaceFolder}/**",
29+
"${workspaceFolder}/addon"
5530
]
5631
},
5732
{
58-
"name": "Mac",
33+
"name": "Win32",
5934
"includePath": [
35+
"${env:appdata}/../.cache/rebory/latest/node/include/node",
6036
"${workspaceFolder}/node_modules/node-addon-api",
61-
"/usr/local/include/node",
62-
"${workspaceFolder}/addons/genKey/**",
63-
"${workspaceFolder}/addons/tools/**"
37+
"${workspaceFolder}/addon"
6438
],
65-
"defines": [
66-
"NAPI_DISABLE_CPP_EXCEPTIONS"
67-
],
68-
"compilerArgs": [
69-
"-fpermissive",
70-
"-fexceptions",
71-
"-w",
72-
"-fpermissive",
73-
"-fPIC",
74-
"-static"
75-
],
76-
"macFrameworkPath": [
77-
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
78-
],
79-
"compilerPath": "/usr/bin/clang",
39+
"defines": [],
40+
"intelliSenseMode": "windows-msvc-x64",
8041
"cStandard": "c17",
81-
"cppStandard": "c++17",
82-
"intelliSenseMode": "macos-clang-x64"
42+
"cppStandard": "c++17"
8343
}
84-
]
44+
],
45+
"version": 4
8546
}

.vscode/launch.json

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

0 commit comments

Comments
 (0)