diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b5bf42d..08f397da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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/') @@ -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 @@ -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 @@ -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 - diff --git a/src/cpu_profiler.test.ts b/src/cpu_profiler.test.ts index 98e9bb6c..a3d91257 100644 --- a/src/cpu_profiler.test.ts +++ b/src/cpu_profiler.test.ts @@ -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'); }