Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
feat(build): add arm build
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Nov 4, 2022
1 parent 638e589 commit 5d609fa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ jobs:
node-version: [12.x, 14.x, 16.x, 18.x]
target: [x64]
host: [x64]
# arm64 is not supported by gh runners yet
# include:
# - os: macos-latest
# node-version: 18.x
# target: arm64
# host: arm64

runs-on: ${{ matrix.os }}
# Build artifacts are only needed for releasing workflow.
# if: startsWith(github.ref, 'refs/heads/release/')
Expand Down Expand Up @@ -54,16 +61,22 @@ jobs:

- name: Copy Binary
run: node scripts/copy-target.js

- name: Log binary
run: du -sh binaries/*

- name: Archive binary
uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
name: binaries-${{ github.sha }}
path: |
${{ github.workspace }}/binaries/
build-library:
build-and-pack:
runs-on: ubuntu-latest
needs: [precompile-bindings]
# Build artifacts are only needed for releasing workflow.
# if: startsWith(github.ref, 'refs/heads/release/')
steps:
- uses: actions/checkout@v2

Expand All @@ -75,6 +88,11 @@ jobs:

- run: npm run build:lib

- uses: actions/download-artifact@v3
with:
name: binaries-${{ github.sha }}
path: binaries
- run: ls -l binaries
- run: npm pack

- name: Archive artifacts
Expand All @@ -84,20 +102,3 @@ jobs:
path: |
${{ github.workspace }}/*.tgz
prepare-repository:
runs-on: ubuntu-latest
needs: [precompile-bindings, build-library]

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 18

- uses: actions/download-artifact@v1
with:
name: ${{ github.sha }}

- run: ls -R

4 changes: 2 additions & 2 deletions src/cpu_profiler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ describe('Profiler bindings', () => {

if (!profile) fail('Profile is null');

// Exception for macos - we seem to get way less samples there, but I'm not sure if that's due to poor
// Exception for macos and windows - we seem to get way less samples there, but I'm not sure if that's due to poor
// performance of the actions runner, machine or something else. This needs more investigation to determine
// the cause of low sample count. https://github.com/actions/runner-images/issues/1336 seems relevant.
if (process.platform === 'darwin') {
if (process.platform === 'darwin' || process.platform === 'win32') {
if (profile.samples.length < 2) {
fail('Only ' + profile.samples.length + ' samples obtained on ' + process.platform + ', expected at least 2');
}
Expand Down

0 comments on commit 5d609fa

Please sign in to comment.