Skip to content

Commit

Permalink
Big code refactoring (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirherobrine23 committed Mar 15, 2024
1 parent 5d9851d commit 4069323
Show file tree
Hide file tree
Showing 49 changed files with 2,722 additions and 2,601 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test_linux:
name: Test Linux
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x, 18.x, 20.x, latest ]
steps:
- name: Disable sudo PATH replace
run: |
sudo cat /etc/sudoers | grep -v "secure_path=" > /tmp/.sudoers.tmp
cat /tmp/.sudoers.tmp | sudo tee /etc/sudoers
rm /tmp/.sudoers.tmp
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- uses: actions/setup-go@v4
with:
go-version-file: addon/userspace/go/go.mod
go-version: ">=1.22.0"

- name: "Setup zig"
uses: korandoru/setup-zig@v1
with:
zig-version: "master"

- name: Install build dependencies
run: sudo apt update && sudo apt install -y build-essential

- name: Install node dependencies
run: npm install --no-save --no-audit --no-fund --ignore-scripts

- name: Run tests
run: ./node_modules/.bin/rebory build && sudo node --no-warnings --loader ts-node/esm src/index_test.js
77 changes: 0 additions & 77 deletions .github/workflows/test.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ node_modules/
.DS_Store
*.log

# Addon
addon/userspace/wg-go.*

# Typescript
*.tsbuildinfo
src/**/*.d.ts
Expand Down
21 changes: 0 additions & 21 deletions .gitlab-ci.yml

This file was deleted.

91 changes: 26 additions & 65 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,46 @@
{
"version": 4,
"configurations": [
{
"name": "Win32",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64",
"compilerArgs": [
"-fpermissive",
"-fexceptions",
"-w",
"-fpermissive",
"-fPIC",
"-static"
"name": "Mac",
"includePath": [
"/usr/local/include/node",
"/usr/local/lib/zig//libc/include/any-linux-any",
"${workspaceFolder}/node_modules/node-addon-api",
"${workspaceFolder}/**",
"${workspaceFolder}/addon"
],
"defines": [
"NAPI_DISABLE_CPP_EXCEPTIONS",
"ONSTARTADDON",
"LISTDEV",
"GETCONFIG",
"SETCONFIG",
"DELIFACE"
"AF_NETLINK=16"
],
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
],
"includePath": [
"${env:appdata}/../Local/node-gyp/Cache/18.17.0/include/node",
"${workspaceFolder}/node_modules/node-addon-api",
"${workspaceFolder}/addons/genKey/**",
"${workspaceFolder}/addons/tools/**"
]
},
{
"name": "Linux",
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-clang-x64",
"compilerArgs": [
"-fpermissive",
"-fexceptions",
"-w",
"-fpermissive",
"-fPIC",
"-static"
],
"defines": [
"NAPI_DISABLE_CPP_EXCEPTIONS"
],
"intelliSenseMode": "macos-clang-x64"
},
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/node_modules/node-addon-api",
"/usr/include/node",
"${workspaceFolder}/node_modules/node-addon-api/**",
"${workspaceFolder}/node_modules/**",
"${workspaceFolder}/addons/genKey/**",
"${workspaceFolder}/addons/tools/**"
"${workspaceFolder}/**",
"${workspaceFolder}/addon"
]
},
{
"name": "Mac",
"name": "Win32",
"includePath": [
"${env:appdata}/../.cache/rebory/latest/node/include/node",
"${workspaceFolder}/node_modules/node-addon-api",
"/usr/local/include/node",
"${workspaceFolder}/addons/genKey/**",
"${workspaceFolder}/addons/tools/**"
"${workspaceFolder}/addon"
],
"defines": [
"NAPI_DISABLE_CPP_EXCEPTIONS"
],
"compilerArgs": [
"-fpermissive",
"-fexceptions",
"-w",
"-fpermissive",
"-fPIC",
"-static"
],
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"defines": [],
"intelliSenseMode": "windows-msvc-x64",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "macos-clang-x64"
"cppStandard": "c++17"
}
]
],
"version": 4
}
20 changes: 0 additions & 20 deletions .vscode/launch.json

This file was deleted.

Loading

0 comments on commit 4069323

Please sign in to comment.