Skip to content

Commit

Permalink
build: upgrade artifacts actions to v4 (#13143)
Browse files Browse the repository at this point in the history
Upgrade action to artifacts v4 (previous version did some convenient
merging for us)
  • Loading branch information
JonasBa authored Aug 2, 2024
1 parent 7e1a641 commit 19bdb13
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 15 deletions.
56 changes: 41 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,11 @@ jobs:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Extract Profiling Node Prebuilt Binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiling-node-binaries-${{ github.sha }}
pattern: profiling-node-binaries-${{ github.sha }}-*
path: ${{ github.workspace }}/packages/profiling-node/lib/
merge-multiple: true

- name: Pack tarballs
run: yarn build:tarball
Expand Down Expand Up @@ -902,16 +903,15 @@ jobs:
run: yarn lerna run build:lib --scope @sentry/profiling-node

- name: Extract Profiling Node Prebuilt Binaries
# @TODO: v4 breaks convenient merging of same name artifacts
# https://github.com/actions/upload-artifact/issues/478
if: |
(needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
(needs.job_get_metadata.outputs.is_release == 'true') ||
(github.event_name != 'pull_request')
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiling-node-binaries-${{ github.sha }}
pattern: profiling-node-binaries-${{ github.sha }}-*
path: ${{ github.workspace }}/packages/profiling-node/lib/
merge-multiple: true

- name: Build Profiling tarball
run: yarn build:tarball
Expand Down Expand Up @@ -1231,11 +1231,11 @@ jobs:
- name: Build Profiling Node
run: yarn lerna run build:lib --scope @sentry/profiling-node
- name: Extract Profiling Node Prebuilt Binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiling-node-binaries-${{ github.sha }}
pattern: profiling-node-binaries-${{ github.sha }}-*
path: ${{ github.workspace }}/packages/profiling-node/lib/

merge-multiple: true
- name: Restore tarball cache
uses: actions/cache/restore@v4
with:
Expand Down Expand Up @@ -1359,104 +1359,132 @@ jobs:
# x64 glibc
- os: ubuntu-20.04
node: 16
binary: linux-x64-glibc-93
- os: ubuntu-20.04
node: 18
binary: linux-x64-glibc-108
- os: ubuntu-20.04
node: 20
binary: linux-x64-glibc-115
- os: ubuntu-20.04
node: 22
binary: linux-x64-glibc-127

# x64 musl
- os: ubuntu-20.04
container: node:16-alpine3.16
binary: linux-x64-musl-93
node: 16
- os: ubuntu-20.04
container: node:18-alpine3.17
node: 18
binary: linux-x64-musl-108
- os: ubuntu-20.04
container: node:20-alpine3.17
node: 20
binary: linux-x64-musl-115
- os: ubuntu-20.04
container: node:22-alpine3.18
node: 22
binary: linux-x64-musl-127

# arm64 glibc
- os: ubuntu-20.04
arch: arm64
node: 16
binary: linux-arm64-glibc-93
- os: ubuntu-20.04
arch: arm64
node: 18
binary: linux-arm64-glibc-108
- os: ubuntu-20.04
arch: arm64
node: 20
binary: linux-arm64-glibc-115
- os: ubuntu-20.04
arch: arm64
node: 22
binary: linux-arm64-glibc-127

# arm64 musl
- os: ubuntu-20.04
container: node:16-alpine3.16
arch: arm64
node: 16
binary: linux-arm64-musl-93
- os: ubuntu-20.04
arch: arm64
container: node:18-alpine3.17
node: 18
binary: linux-arm64-musl-108
- os: ubuntu-20.04
arch: arm64
container: node:20-alpine3.17
node: 20
binary: linux-arm64-musl-115
- os: ubuntu-20.04
arch: arm64
container: node:22-alpine3.18
node: 22
binary: linux-arm64-musl-127

# macos x64
- os: macos-13
node: 16
arch: x64
binary: darwin-x64-93
- os: macos-13
node: 18
arch: x64
binary: darwin-x64-108
- os: macos-13
node: 20
arch: x64
binary: darwin-x64-115
- os: macos-13
node: 22
arch: x64
binary: darwin-x64-127

# macos arm64
- os: macos-13
arch: arm64
node: 16
target_platform: darwin
binary: darwin-arm64-93
- os: macos-13
arch: arm64
node: 18
target_platform: darwin
binary: darwin-arm64-108
- os: macos-13
arch: arm64
node: 20
target_platform: darwin
binary: darwin-arm64-115
- os: macos-13
arch: arm64
node: 22
target_platform: darwin
binary: darwin-arm64-127

# windows x64
- os: windows-2022
node: 16
arch: x64
binary: win32-x64-93
- os: windows-2022
node: 18
arch: x64
binary: win32-x64-108
- os: windows-2022
node: 20
arch: x64
binary: win32-x64-115
- os: windows-2022
node: 22
arch: x64
binary: win32-x64-127

steps:
- name: Setup (alpine)
Expand Down Expand Up @@ -1588,10 +1616,8 @@ jobs:
yarn lerna run test --scope @sentry/profiling-node
- name: Archive Binary
# @TODO: v4 breaks convenient merging of same name artifacts
# https://github.com/actions/upload-artifact/issues/478
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: profiling-node-binaries-${{ github.sha }}
path: |
${{ github.workspace }}/packages/profiling-node/lib/*.node
name: profiling-node-binaries-${{ github.sha }}-${{ matrix.binary }}
path: ${{ github.workspace }}/packages/profiling-node/lib/sentry_cpu_profiler-${{matrix.binary}}.node
if-no-files-found: error
1 change: 1 addition & 0 deletions packages/profiling-node/bindings/cpu_profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ enum ProfileFormat {
kFormatThread = 0,
kFormatChunk = 1,
};

// Allow users to override the default logging mode via env variable. This is
// useful because sometimes the flow of the profiled program can be to execute
// many sequential transaction - in that case, it may be preferable to set eager
Expand Down

0 comments on commit 19bdb13

Please sign in to comment.