Skip to content

Commit

Permalink
chore(CI.yml): remove unnecessary empty line in CI workflow file
Browse files Browse the repository at this point in the history
feat(CI.yml): add support for building aarch64-apple-darwin target on macOS

feat(CI.yml): add step to build universal macOS binary

feat(darwin-arm64): add npm package for aarch64-apple-darwin binary

feat(darwin-universal): add npm package for universal-apple-darwin binary

chore(darwin-x64): update repository URL in package.json

chore(linux-x64-gnu): update repository URL in package.json

chore(win32-x64-msvc): update repository URL in package.json

chore(package.json): update repository URL, add author information, and update description
  • Loading branch information
Daniel-Boll committed Oct 14, 2023
1 parent 2d5502b commit e86e01b
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 19 deletions.
40 changes: 39 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
else
echo "::set-output name=should_publish::false"
fi
build:
if: needs.check-version-in-commit.outputs.should_publish == 'true'
needs:
Expand All @@ -50,6 +49,11 @@ jobs:
build: |
yarn build
strip -x *.node
- host: macos-latest
target: aarch64-apple-darwin
build: |
yarn build --target aarch64-apple-darwin
strip -x *.node
- host: windows-latest
build: yarn build
target: x86_64-pc-windows-msvc
Expand Down Expand Up @@ -199,6 +203,39 @@ jobs:
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test
universal-macOS:
name: Build universal macOS binary
needs:
- build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
cache: yarn
- name: Install dependencies
run: yarn install
- name: Download macOS x64 artifact
uses: actions/download-artifact@v3
with:
name: bindings-x86_64-apple-darwin
path: artifacts
- name: Download macOS arm64 artifact
uses: actions/download-artifact@v3
with:
name: bindings-aarch64-apple-darwin
path: artifacts
- name: Combine binaries
run: yarn universal
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bindings-universal-apple-darwin
path: ${{ env.APP_NAME }}.*.node
if-no-files-found: error
publish:
if: needs.check-version-in-commit.outputs.should_publish == 'true'
name: Publish
Expand All @@ -207,6 +244,7 @@ jobs:
- check-version-in-commit
- test-macOS-windows-binding
- test-linux-x64-gnu-binding
- universal-macOS
steps:
- uses: actions/checkout@v3
- name: Setup node
Expand Down
3 changes: 3 additions & 0 deletions npm/darwin-arm64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@lambda-group/scylladb-darwin-arm64`

This is the **aarch64-apple-darwin** binary for `@lambda-group/scylladb`
20 changes: 20 additions & 0 deletions npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@lambda-group/scylladb-darwin-arm64",
"version": "0.0.4",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "scylladb.darwin-arm64.node",
"files": [
"scylladb.darwin-arm64.node"
],
"description": "🚀 JavaScript driver for ScyllaDB, harnessing Rust's power through napi-rs for top performance. Pre-release stage. 🧪🔧",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"repository": "https://github.com/Daniel-Boll/scylla-javascript-driver"
}
3 changes: 3 additions & 0 deletions npm/darwin-universal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@lambda-group/scylladb-darwin-universal`

This is the **universal-apple-darwin** binary for `@lambda-group/scylladb`
17 changes: 17 additions & 0 deletions npm/darwin-universal/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@lambda-group/scylladb-darwin-universal",
"version": "0.0.4",
"os": [
"darwin"
],
"main": "scylladb.darwin-universal.node",
"files": [
"scylladb.darwin-universal.node"
],
"description": "🚀 JavaScript driver for ScyllaDB, harnessing Rust's power through napi-rs for top performance. Pre-release stage. 🧪🔧",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"repository": "https://github.com/Daniel-Boll/scylla-javascript-driver"
}
4 changes: 2 additions & 2 deletions npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"files": [
"scylladb.darwin-x64.node"
],
"description": "A ScyllaDB Driver alternative for Nodejs, Javascript and Typescript written using Node API",
"description": "🚀 JavaScript driver for ScyllaDB, harnessing Rust's power through napi-rs for top performance. Pre-release stage. 🧪🔧",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"repository": "https://github.com/Daniel-Boll/scylladb"
"repository": "https://github.com/Daniel-Boll/scylla-javascript-driver"
}
4 changes: 2 additions & 2 deletions npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"files": [
"scylladb.linux-x64-gnu.node"
],
"description": "A ScyllaDB Driver alternative for Nodejs, Javascript and Typescript written using Node API",
"description": "🚀 JavaScript driver for ScyllaDB, harnessing Rust's power through napi-rs for top performance. Pre-release stage. 🧪🔧",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"repository": "https://github.com/Daniel-Boll/scylladb",
"repository": "https://github.com/Daniel-Boll/scylla-javascript-driver",
"libc": [
"glibc"
]
Expand Down
4 changes: 2 additions & 2 deletions npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"files": [
"scylladb.win32-x64-msvc.node"
],
"description": "A ScyllaDB Driver alternative for Nodejs, Javascript and Typescript written using Node API",
"description": "🚀 JavaScript driver for ScyllaDB, harnessing Rust's power through napi-rs for top performance. Pre-release stage. 🧪🔧",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"repository": "https://github.com/Daniel-Boll/scylladb"
"repository": "https://github.com/Daniel-Boll/scylla-javascript-driver"
}
29 changes: 17 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
{
"name": "@lambda-group/scylladb",
"version": "0.0.4",
"repository": "https://github.com/Daniel-Boll/scylla-javascript-driver",
"description": "🚀 JavaScript driver for ScyllaDB, harnessing Rust's power through napi-rs for top performance. Pre-release stage. 🧪🔧",
"author": {
"name": "Daniel Boll",
"email": "[email protected]",
"url": "https://daniel-boll.me"
},
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"artifacts": "napi artifacts",
"build": "napi build --platform --release",
"build:debug": "napi build --platform",
"prepublishOnly": "napi prepublish -t npm",
"test": "ava",
"universal": "napi universal",
"version": "napi version"
},
"napi": {
"name": "scylladb",
"triples": {}
Expand All @@ -25,16 +41,5 @@
"engines": {
"node": ">= 10"
},
"scripts": {
"artifacts": "napi artifacts",
"build": "napi build --platform --release",
"build:debug": "napi build --platform",
"prepublishOnly": "napi prepublish -t npm",
"test": "ava",
"universal": "napi universal",
"version": "napi version"
},
"packageManager": "[email protected]",
"repository": "https://github.com/Daniel-Boll/scylladb",
"description": "A ScyllaDB Driver alternative for Nodejs, Javascript and Typescript written using Node API"
"packageManager": "[email protected]"
}

0 comments on commit e86e01b

Please sign in to comment.