Skip to content

Commit

Permalink
Merge branch 'main' of ssh://github.com/thegecko/bindings-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
thegecko committed Feb 24, 2024
2 parents a10e79a + 39fd4be commit 5469353
Show file tree
Hide file tree
Showing 39 changed files with 10,238 additions and 6,866 deletions.
21 changes: 20 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,24 @@
],
"prHourlyLimit": 0,
"prConcurrentLimit": 20,
"timezone": "America/New_York"
"timezone": "America/New_York",
"packageRules": [
{
"matchDepTypes": [
"devDependencies"
],
"matchPackagePatterns": [
"eslint",
"@types",
"esbuild",
"sinon",
"chai",
"mocha",
"nyc",
"cc"
],
"automerge": true,
"automergeType": "branch"
}
]
}
27 changes: 15 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
branches:
- main
- beta
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: false
jobs:
prebuild:
strategy:
Expand All @@ -15,11 +18,11 @@ jobs:
command: prebuildify
args: --arch x64+arm64
- name: win32-x86
os: windows-latest
os: windows-2019
node: x86
command: prebuildify
- name: win32-x64
os: windows-latest
os: windows-2019
node: x64
command: prebuildify
- name: linux-x64
Expand All @@ -29,7 +32,7 @@ jobs:
- name: linux-arm
os: ubuntu-latest
command: prebuildify-cross
args: -i linux-arm64 -i linux-armv7 -i linux-armv6
args: -i linux-arm64-lts -i linux-armv7 -i linux-armv6
- name: android-arm
os: ubuntu-latest
command: prebuildify-cross
Expand All @@ -38,33 +41,33 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- if: matrix.node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
architecture: ${{ matrix.node }}
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: npm ci
- run: npm run ${{ matrix.command }} -- ${{ matrix.args }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: prebuilds/
if-no-files-found: error
- if: failure()
run: ls -la
run: npx shx ls -lA
release:
needs: prebuild
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: build-artifacts
path: prebuilds
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- run: npm ci
- run: npm run build
- run: npm run semantic-release
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,38 @@ name: Test / Lint
on:
push:
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- run: npm ci
- run: npm run lint
- run: npm run typecheck
test:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [16.x, 18.x, 20.x]
config:
# arch isn't used and we have no way to use it currently
- { os: macos-latest, arch: x64 }
- { os: ubuntu-latest, arch: x64 }
- { os: windows-latest, arch: x64 }
- { os: windows-2019, arch: x64 }
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run rebuild
- run: npm test
- run: npm run coverage
env:
CI: true
- uses: codecov/codecov-action@v3
with:
directory: ./coverage/
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.2
18.17.1
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.eslintrc
.eslintrc.js
.releaserc
.github
.mocharc.js
.node-version
Expand Down
217 changes: 0 additions & 217 deletions CHANGELOG.md

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your roboti

The Bindings provide a low level interface to work with your serialport. It is possible to use them alone but it's usually easier to use them with an interface.

- [`@serialport/bindings`](https://serialport.io/docs/api-bindings) bindings for Linux, Mac and Windows
- [`@serialport/binding-abstract`](https://serialport.io/docs/api-bindings-abstract) as an abstract class to use if you're making your own bindings
- [`@serialport/bindings-cpp`](https://serialport.io/docs/api-bindings-cpp) bindings for Linux, Mac and Windows
- [`@serialport/binding-interface`](https://serialport.io/docs/api-bindings-interface) as an interface to use if you're making your own bindings
- [`@serialport/binding-mock`](https://serialport.io/docs/api-binding-mock) for a mock binding package for testing

## Developing
Expand All @@ -31,6 +31,7 @@ The Bindings provide a low level interface to work with your serialport. It is p
1. Clone this repo `git clone [email protected]:serialport/bindings-cpp.git`
1. Run `npm install` to setup local package dependencies (run this any time you depend on a package local to this repo)
1. Run `npm test` to ensure everything is working properly
1. If you have a serial loopback device (TX to RX) you can run run `TEST_PORT=/path/to/port npm test` for a more comprehensive test suite. (Defaults to 115200 baud customize with the TEST_BAUD env.) You can use an arduino with the `test/arduino-echo` sketch.

### Developing Docs

Expand Down
Loading

0 comments on commit 5469353

Please sign in to comment.