-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
2,991 additions
and
2,316 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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"ignorePatterns": [ | ||
"src/**" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:node/recommended" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 2022 | ||
}, | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"rules": { | ||
"arrow-parens": ["error", "always"], | ||
"no-trailing-spaces": [ | ||
"error", | ||
{ | ||
"skipBlankLines": true | ||
} | ||
], | ||
"indent": [ | ||
"error", | ||
"tab", | ||
{ | ||
"SwitchCase": 1 | ||
} | ||
], | ||
"operator-linebreak": [ | ||
"error", | ||
"after", | ||
{ | ||
"overrides": { | ||
"?": "before", | ||
":": "before" | ||
} | ||
} | ||
], | ||
"max-len": ["error", 110], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"no-multiple-empty-lines": ["error", { "max": 3, "maxEOF": 1, "maxBOF": 1 }], | ||
"keyword-spacing": ["error", { "before": true, "after": true }], | ||
"space-before-blocks": ["error"], | ||
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}], | ||
"camelcase": ["error"], | ||
"no-tabs": [0], | ||
"global-require": [0], | ||
"no-underscore-dangle": [0], | ||
"no-plusplus": [0], | ||
"no-shadow": [0], | ||
"node/no-unpublished-require": [0], | ||
"no-process-exit": [0], | ||
"linebreak-style": [0], | ||
"node/no-missing-require": [0], | ||
"no-console": [0], | ||
"node/no-unsupported-features/es-builtins": [ | ||
"error", | ||
{ "version": ">=18.16.0" } | ||
], | ||
"node/no-unsupported-features/node-builtins": [ | ||
"error", | ||
{ "version": ">=18.16.0" } | ||
], | ||
"func-names": [ | ||
"error", | ||
"never", | ||
{ | ||
"generators": "never" | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
src/binding.gyp linguist-vendored |
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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Build | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
create_release: | ||
name: Create Release | ||
if: contains('["raub"]', github.actor) | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
|
||
steps: | ||
|
||
- name: Fetch Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'npm' | ||
|
||
- name: Get Package Version | ||
id: package-version | ||
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT | ||
|
||
- name: Create Draft Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
draft: true | ||
tag_name: ${{ steps.package-version.outputs.version }} | ||
name: Release ${{ steps.package-version.outputs.version }} | ||
body: Binaries at ${{ github.sha }} | ||
|
||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, windows-2022, macos-11] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
||
- name: Fetch Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install Modules | ||
run: npm ci | ||
|
||
- name: Build Current Binary | ||
run: npm run build | ||
|
||
- name: Get Package Version | ||
id: package-version | ||
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT | ||
|
||
- name: Pack Files | ||
id: pack-files | ||
run: node -e "require('addon-tools-raub').actionPack()" >> $GITHUB_OUTPUT | ||
|
||
- name: Store Binaries | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
draft: true | ||
tag_name: ${{ steps.package-version.outputs.version }} | ||
name: Release ${{ steps.package-version.outputs.version }} | ||
files: ${{ steps.pack-files.outputs.pack }} |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Cpplint | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
eslint: | ||
name: Cpplint | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
|
||
- name: Fetch Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install Modules | ||
run: npm ci | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install Cpplint | ||
run: pip install cpplint | ||
|
||
- name: Run Cpplint | ||
run: | | ||
node -e "require('addon-tools-raub').cpcpplint()" | ||
cpplint --recursive ./src/cpp |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: ESLint | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
eslint: | ||
name: ESLint | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
|
||
- name: Fetch Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install Modules | ||
run: npm ci | ||
|
||
- name: Run ESLint | ||
run: npm run eslint |
Oops, something went wrong.