-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #522 from zeromq/build [skip ci]
- Loading branch information
Showing
12 changed files
with
1,203 additions
and
526 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 |
---|---|---|
|
@@ -14,40 +14,58 @@ jobs: | |
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
- macos-11 | ||
- windows-2022 | ||
node_version: | ||
- 18 | ||
node_arch: | ||
- x64 | ||
cpp_arch: | ||
- x64 | ||
ARCH: | ||
- x64 | ||
zmq_draft: | ||
- false | ||
zmq_shared: | ||
- false | ||
zmq_version: | ||
- 4.3.4 | ||
skip_gc_finalizer_tests: | ||
- true | ||
|
||
# include: | ||
# - os: windows-latest | ||
# node_version: 18 | ||
# node_arch: x86 | ||
# zmq_draft: false | ||
# zmq_shared: false | ||
# skip_gc_finalizer_tests: true | ||
|
||
# - os: macos-11.0 | ||
# node_version: 15 | ||
# node_arch: arm64 | ||
# zmq_draft: false | ||
# zmq_shared: false | ||
|
||
include: | ||
- os: windows-2022 | ||
node_version: 18 | ||
node_arch: x86 | ||
ARCH: x86 | ||
cpp_arch: amd64_x86 | ||
zmq_draft: false | ||
zmq_version: 4.3.4 | ||
|
||
# - os: windows-2022 | ||
# node_version: 18 | ||
# node_arch: x64 | ||
# ARCH: arm64 | ||
# cpp_arch: amd64_arm64 | ||
# zmq_draft: false | ||
# zmq_version: 4.3.4 | ||
|
||
- os: macos-11 | ||
node_version: 18 | ||
node_arch: x64 | ||
ARCH: x86_64 | ||
cpp_arch: x64 | ||
zmq_draft: false | ||
zmq_version: 4.3.4 | ||
|
||
- os: macos-11 | ||
node_version: 18 | ||
node_arch: x64 | ||
ARCH: arm64 | ||
cpp_arch: amd64_arm64 | ||
zmq_draft: false | ||
zmq_version: 4.3.4 | ||
|
||
env: | ||
ZMQ_VERSION: ${{ matrix.zmq_version }} | ||
ZMQ_DRAFT: ${{ matrix.zmq_draft }} | ||
ZMQ_SHARED: ${{ matrix.zmq_shared }} | ||
SKIP_GC_FINALIZER_TESTS: ${{ matrix.skip_gc_finalizer_tests }} | ||
ZMQ_SHARED: false | ||
ARCH: ${{ matrix.ARCH }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -56,42 +74,40 @@ jobs: | |
with: | ||
path: | | ||
./node_modules/ | ||
~/.npm | ||
~/AppData/Roaming/npm-cache | ||
./build/zeromq-${{ matrix.zmq_version }}.tar.gz | ||
./zeromq-${{ matrix.zmq_version }}.tar.gz | ||
./libzmq | ||
./build/libzmq | ||
./build/ | ||
key: "cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-ZMQ_VERSION:${{ matrix.zmq_version }}-Node:${{ matrix.node_version }}-${{ hashFiles('./package.json') }}" | ||
restore-keys: | | ||
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-ZMQ_VERSION:${{ matrix.zmq_version }}-Node:${{ matrix.node_version }}" | ||
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-ZMQ_VERSION:${{ matrix.zmq_version }}-Node:${{ matrix.node_version }}-" | ||
- name: Setup Cpp | ||
uses: aminya/setup-cpp@v1 | ||
with: | ||
vcvarsall: ${{ contains(matrix.os, 'windows') }} | ||
cmake: true | ||
ninja: true | ||
architecture: ${{ matrix.node_arch }} | ||
architecture: ${{ matrix.cpp_arch }} | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
architecture: ${{ matrix.node_arch }} | ||
cache: "pnpm" | ||
|
||
- name: Install Mac-OS Dependencies | ||
if: contains(matrix.os, 'macos') | ||
run: | | ||
brew install libsodium | ||
brew install libsodium gnutls | ||
- name: Install Dependencies and Build | ||
run: npm install | ||
run: pnpm install | ||
|
||
- name: Prebuild | ||
run: npm run prebuild | ||
env: | ||
ARCH: ${{ matrix.node_arch }} | ||
run: pnpm run prebuild | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
|
@@ -100,12 +116,16 @@ jobs: | |
|
||
- name: Lint | ||
if: contains(matrix.os, 'ubuntu') | ||
run: npm run lint-test | ||
run: pnpm run lint-test | ||
|
||
- name: Test (Debug) | ||
run: | | ||
npm run test.skip_gc_tests | ||
uses: nick-fields/retry@v2 | ||
with: | ||
timeout_minutes: 15 | ||
max_attempts: 1 | ||
command: | | ||
pnpm run test.skip_gc_tests | ||
- name: Tests + GC Tests (Release) | ||
run: | | ||
npm run test | ||
pnpm run test |
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
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
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
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 |
---|---|---|
|
@@ -20,8 +20,8 @@ | |
"@types/node": "^18.11.9", | ||
"@types/shelljs": "^0.8.11", | ||
"cross-env": "^7.0.3", | ||
"node-gyp-build": "^4.5.0", | ||
"node-addon-api": "^5.0.0", | ||
"node-gyp-build": "^4.5.0", | ||
"shelljs": "^0.8.5", | ||
"ts-node": "10.9" | ||
}, | ||
|
@@ -34,7 +34,6 @@ | |
"@types/weak-napi": "^2.0.1", | ||
"benchmark": ">=2", | ||
"chai": ">=4.3", | ||
"choma": ">= 1.2", | ||
"deasync": "^0.1.28", | ||
"eslint-config-atomic": "^1.18.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
|
@@ -46,11 +45,12 @@ | |
"npm-run-all2": "^6.0.4", | ||
"prebuildify": "^5.0.1", | ||
"prettier": "^2.7.1", | ||
"rocha": "^2.5.10", | ||
"semver": ">=7", | ||
"shx": "^0.3.4", | ||
"tar-fs": "^2.1.1", | ||
"ts-morph": "^16.0.0", | ||
"typescript": "4.8", | ||
"typescript": "4.9", | ||
"weak-napi": "^2.0.2" | ||
}, | ||
"engines": { | ||
|
@@ -88,10 +88,11 @@ | |
"test.skip_gc_tests": "run-s build.debug && cross-env SKIP_GC_TESTS=true mocha", | ||
"lint.clang-format": "clang-format -i -style=file ./src/*.cc ./src/*.h ./src/util/*.h", | ||
"lint-test.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/", | ||
"lint.eslint": "pnpm run lint-test.eslint -- --fix", | ||
"lint.eslint": "pnpm run lint-test.eslint --fix", | ||
"lint": "run-p lint.eslint lint.clang-format", | ||
"lint-test": "run-s lint-test.eslint", | ||
"bench": "node --expose-gc test/bench" | ||
"bench": "node --expose-gc test/bench", | ||
"prepublishOnly": "pnpm run build.js" | ||
}, | ||
"keywords": [ | ||
"zeromq", | ||
|
@@ -111,32 +112,5 @@ | |
"napi" | ||
], | ||
"license": "MIT", | ||
"author": "Rolf Timmermans <[email protected]>", | ||
"greenkeeper": { | ||
"ignore": [ | ||
"@gnd/typedoc", | ||
"@types/chai", | ||
"@types/mocha", | ||
"@types/node", | ||
"@types/semver", | ||
"@typescript-eslint/eslint-plugin", | ||
"@typescript-eslint/parser", | ||
"benchmark", | ||
"chai", | ||
"choma", | ||
"eslint", | ||
"eslint-config-prettier", | ||
"eslint-plugin-prettier", | ||
"gunzip-maybe", | ||
"mocha", | ||
"node-addon-api", | ||
"node-fetch", | ||
"prebuildify", | ||
"prettier", | ||
"semver", | ||
"tar-fs", | ||
"ts-node", | ||
"weak-napi" | ||
] | ||
} | ||
"author": "Rolf Timmermans <[email protected]>" | ||
} |
Oops, something went wrong.