-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node-plugin: Install uses precompiled binaries hosted on GitHub releases
- Restructure crate directories - Add GitHub Actions workflow for pre-compiling the Node add-on module on various machines and binaries and pushing to the GitHub releases page - Update install process to download precompiled binary,if that fails fallback to the current behavior and compile directly on user's machine
- Loading branch information
Showing
29 changed files
with
778 additions
and
8,602 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,52 @@ | ||
# Creates and publishes assets for a new release. | ||
# To manually trigger this workflow, create a release in the GitHub UI. | ||
|
||
name: "Publish binaries" | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish-github: | ||
strategy: | ||
# Allowing jobs to fail until 'node-pre-gyp-github' supports failing gracefully if file already exists | ||
# (https://github.com/bchr02/node-pre-gyp-github/issues/42) | ||
fail-fast: false | ||
matrix: | ||
node_version: [12, 14, 16, 17] | ||
system: | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
include: | ||
- node_version: 16 | ||
system: | ||
os: macos-latest | ||
target: aarch64-apple-darwin | ||
runs-on: ${{ matrix.system.os }} | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v2 | ||
- name: Set up Node.js ${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: ${{ matrix.system.target }} | ||
override: true | ||
- name: Install dependencies | ||
working-directory: ./node-plugin | ||
run: yarn install --ignore-scripts | ||
- name: Compile binary, test, package, and publish to Github release page | ||
env: | ||
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_BUILD_TARGET: ${{ matrix.system.target }} | ||
working-directory: ./node-plugin | ||
run: yarn build-test-pack-publish |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[workspace] | ||
|
||
members = [ | ||
"node-plugin/lang", | ||
"lang", | ||
"agora", | ||
"node-plugin/native", | ||
"node-plugin", | ||
] |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -3,9 +3,9 @@ name = "cost-model-node-plugin" | |
version = "0.1.0" | ||
authors = ["Zac Burns <[email protected]>"] | ||
license = "MIT" | ||
build = "build.rs" | ||
build = "src/build.rs" | ||
edition = "2018" | ||
exclude = ["artifacts.json", "index.node"] | ||
exclude = ["/lib"] | ||
|
||
[lib] | ||
name = "node_plugin" | ||
|
Oops, something went wrong.