Skip to content

Commit

Permalink
chore(build): Node.js 14 prebuild support (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl authored Apr 25, 2020
1 parent 2934006 commit 5e535d8
Show file tree
Hide file tree
Showing 8 changed files with 3,382 additions and 1,472 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node: [12, 13]
node: [12, 13, 14]
fail-fast: true
steps:
- name: Checkout repository
Expand All @@ -19,4 +19,7 @@ jobs:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: yarn install
run: npm install

- name: Package prebuild
run: npm run build
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node: [12, 13]
node: [12, 13, 14]
fail-fast: true
steps:
- name: Checkout repository
Expand All @@ -21,10 +21,10 @@ jobs:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: yarn install
run: npm install

- name: Package prebuild
run: yarn build
run: npm run build

- name: Upload prebuild asset
uses: icrawl/action-artifact@v1
Expand Down
88 changes: 39 additions & 49 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,51 +1,41 @@
{
"targets": [
{
"target_name": "<(module_name)",
"product_dir": "<(module_path)",
"dependencies": [
"deps/binding.gyp:libopus",
],
"cflags!": [
"-fno-exceptions",
],
"cflags_cc!": [
"-fno-exceptions",
],
"cflags": [
"-pthread",
"-fno-strict-aliasing",
"-Wall",
"-Wno-unused-parameter",
"-Wno-missing-field-initializers",
"-Wextra",
"-pipe",
"-fno-ident",
"-fdata-sections",
"-ffunction-sections",
"-fPIC",
],
"defines": [
"LARGEFILE_SOURCE",
"_FILE_OFFSET_BITS=64",
"WEBRTC_TARGET_PC",
"WEBRTC_LINUX",
"WEBRTC_THREAD_RR",
"EXPAT_RELATIVE_PATH",
"GTEST_RELATIVE_PATH",
"JSONCPP_RELATIVE_PATH",
"WEBRTC_RELATIVE_PATH",
"POSIX,"
"__STDC_FORMAT_MACROS",
"DYNAMIC_ANNOTATIONS_ENABLED=0",
"NAPI_DISABLE_CPP_EXCEPTIONS",
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
],
"sources": [
"src/node-opus.cc",
],
},
],
"targets": [
{
"target_name": "<(module_name)",
"product_dir": "<(module_path)",
"dependencies": ["deps/binding.gyp:libopus"],
"cflags!": ["-fno-exceptions"],
"cflags_cc!": ["-fno-exceptions"],
"cflags": [
"-pthread",
"-fno-strict-aliasing",
"-Wall",
"-Wno-unused-parameter",
"-Wno-missing-field-initializers",
"-Wextra",
"-pipe",
"-fno-ident",
"-fdata-sections",
"-ffunction-sections",
"-fPIC",
],
"defines": [
"LARGEFILE_SOURCE",
"_FILE_OFFSET_BITS=64",
"WEBRTC_TARGET_PC",
"WEBRTC_LINUX",
"WEBRTC_THREAD_RR",
"EXPAT_RELATIVE_PATH",
"GTEST_RELATIVE_PATH",
"JSONCPP_RELATIVE_PATH",
"WEBRTC_RELATIVE_PATH",
"POSIX," "__STDC_FORMAT_MACROS",
"DYNAMIC_ANNOTATIONS_ENABLED=0",
"NAPI_DISABLE_CPP_EXCEPTIONS",
"NAPI_VERSION=3",
],
"include_dirs": ["<!@(node -p \"require('node-addon-api').include\")"],
"sources": ["src/node-opus.cc"],
},
],
}
Loading

0 comments on commit 5e535d8

Please sign in to comment.