This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
18 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 |
---|---|---|
|
@@ -3,38 +3,63 @@ on: | |
push: | ||
branches: | ||
- main | ||
- release/** | ||
- "**" | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
commit: | ||
description: If the commit you want to test isn't the head of a branch, provide its SHA here | ||
required: false | ||
jobs: | ||
artifacts: | ||
name: Upload Artifacts | ||
runs-on: ubuntu-latest | ||
precompile-bindings: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, windows-2019, ubuntu-latest] | ||
node-version: [12.x, 14.x, 16.x, 18.x] | ||
target: [x64] | ||
host: [x64] | ||
runs-on: ${{ matrix.os }} | ||
# Build artifacts are only needed for releasing workflow. | ||
if: startsWith(github.ref, 'refs/heads/release/') | ||
# if: startsWith(github.ref, 'refs/heads/release/') | ||
name: ${{ matrix.os }} (node=${{ matrix.node-version }}, host=${{ matrix.host }}, target=${{ matrix.target }}) | ||
steps: | ||
- name: Check out current commit | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.HEAD_COMMIT }} | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
architecture: ${{ matrix.host }} | ||
|
||
- name: "setup npm" | ||
run: npm install -g npm@latest | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
if: ${{ runner.os == 'Windows' }} | ||
with: | ||
msbuild-architecture: ${{ matrix.target }} | ||
|
||
- name: set msvs version | ||
run: npm config set msvs_version 2022 | ||
if: ${{ runner.os == 'Windows' }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
- name: Lint, | ||
run: npm run lint | ||
- name: Test | ||
run: npm run test | ||
|
||
- name: Configure gyp | ||
run: npm run build:configure --arch=${{ matrix.target }} | ||
|
||
- name: "Build bindings" | ||
run: npm run build:bindings --arch=${{ matrix.target }} | ||
|
||
- name: build | ||
run: npm run build:lib | ||
- name: pack | ||
run: npm pack | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.sha }} | ||
path: | | ||
${{ github.workspace }}/*.tgz | ||
|
||
- name: Test | ||
run: npm run test | ||
|
||
- name: Binary size | ||
run: du -h build/Release/cpu_profiler.node |
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