Skip to content

Commit

Permalink
fix: ci failed on windows with vs2022
Browse files Browse the repository at this point in the history
PR-URL: #142
Reviewed-BY: hyj1991 <[email protected]>
  • Loading branch information
hyj1991 authored Feb 20, 2022
1 parent b0b65d5 commit 93e4dce
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .autod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
dep: [
'moment',
'nan',
'@mapbox/node-pre-gyp',
'@xprofiler/node-pre-gyp',
'uuid',
'yargs',
],
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Continuous integration
on:
push:
branches: [ '**' ]
tags: v*.*.*
tags: [ 'v*.*.*' ]
pull_request:
branches: [ '**' ]
schedule:
Expand All @@ -18,7 +18,7 @@ jobs:
{os: "macos-latest", arch: "x64"},
{os: "ubuntu-latest", arch: "x64"},
]
node-version: [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ]
node-version: [ 8, 10, 12, 14, 16, 17 ]
steps:
- name: Checkout Git Source
uses: actions/checkout@master
Expand All @@ -37,6 +37,7 @@ jobs:

- name: Continuous Integration
run: npm run ci || (sleep 60 && npm run ci) || (sleep 60 && npm run ci)
if: ${{ matrix.ci-type.os != 'windows-latest' || matrix.node-version != 8 }}

# - name: Package Binary
# run: npm run pack
Expand All @@ -47,4 +48,4 @@ jobs:
# with:
# files: release/**
# fail_on_unmatched_files: true
# draft: true
# draft: true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ npm i xprofiler --save --xprofiler_binary_host_mirror=https://npm.taobao.org/mir
npm i xprofiler --save --xprofiler_binary_host_mirror=http://devtoolx.com/xprofiler
```

> 这里使用了 `node-pre-gyp` 帮助开发者无需进行本地编译即可使用此插件,默认插件位于 [Github Release](https://github.com/X-Profiler/xprofiler/releases) 页面,国内访问可能较慢,你也可以自行镜像到其它位置加速安装。
> 这里使用了 `@xprofiler/node-pre-gyp` 帮助开发者无需进行本地编译即可使用此插件,默认插件位于 [Github Release](https://github.com/X-Profiler/xprofiler/releases) 页面,国内访问可能较慢,你也可以自行镜像到其它位置加速安装。
### 嵌入项目

Expand Down Expand Up @@ -226,4 +226,4 @@ master 分支的代码覆盖率情况可以参见 [codecov badge](https://codeco

## VII. License

[BSD-2-Clause](LICENSE)
[BSD-2-Clause](LICENSE)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"homepage": "https://github.com/X-Profiler/xprofiler#readme",
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.8",
"@xprofiler/node-pre-gyp": "^1.0.9",
"moment": "^2.29.1",
"nan": "^2.15.0",
"uuid": "^8.3.2",
Expand Down
4 changes: 2 additions & 2 deletions scripts/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { promisify } = require('util');
const exists = promisify(fs.exists);
const mkdir = promisify(fs.mkdir);
const copyFile = promisify(fs.copyFile);
const versioning = require('@mapbox/node-pre-gyp/lib/util/versioning.js');
const versioning = require('@xprofiler/node-pre-gyp/lib/util/versioning.js');
const { staged_tarball: packagePath } = versioning.evaluate(require('../package.json'));

async function copy() {
Expand All @@ -24,4 +24,4 @@ async function copy() {
await copyFile(packagePath, target);
}

copy();
copy();
2 changes: 1 addition & 1 deletion xprofiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const moment = require('moment');
const pkg = require('./package.json');

// xprofiler.node
const binary = require('@mapbox/node-pre-gyp');
const binary = require('@xprofiler/node-pre-gyp');
const bindingPath = binary.find(path.resolve(path.join(__dirname, './package.json')));
const xprofiler = require(bindingPath);

Expand Down

0 comments on commit 93e4dce

Please sign in to comment.