Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: upgrade artifacts actions to v4 #13143

Merged
merged 22 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 41 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,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 @@ -926,16 +927,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 @@ -1254,11 +1254,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 @@ -1383,104 +1383,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 @@ -1612,10 +1640,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
Loading