Skip to content

Commit 4ec4f73

Browse files
authored
fix: running ruby release on arm selfhosted runnner (#87)
- use asdf to install ruby
1 parent b9e8daf commit 4ec4f73

File tree

2 files changed

+16
-42
lines changed

2 files changed

+16
-42
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push]
44

55
jobs:
66
lib-release:
7-
name: pyroscope-main
7+
name: pyroscope-main
88
runs-on: ubuntu-latest
99
if: "startsWith(github.ref, 'refs/tags/lib-')"
1010
continue-on-error: true
@@ -17,7 +17,7 @@ jobs:
1717
draft: true
1818
prerelease: false
1919
cli-release:
20-
name: pyroscope-cli
20+
name: pyroscope-cli
2121
runs-on: ubuntu-latest
2222
if: "startsWith(github.ref, 'refs/tags/cli-')"
2323
steps:
@@ -148,7 +148,7 @@ jobs:
148148
draft: true
149149
prerelease: false
150150
pyspy-release:
151-
name: pyroscope-pyspy
151+
name: pyroscope-pyspy
152152
runs-on: ubuntu-latest
153153
if: "startsWith(github.ref, 'refs/tags/pyspy-')"
154154
continue-on-error: true
@@ -348,6 +348,7 @@ jobs:
348348

349349
steps:
350350
- uses: AutoModality/action-clean@v1
351+
- run: id
351352
- uses: actions/checkout@v3
352353
with:
353354
submodules: recursive
@@ -360,22 +361,6 @@ jobs:
360361
run: bundle
361362
working-directory: pyroscope_ffi/ruby
362363

363-
- name: Update lock files
364-
run: cargo update
365-
working-directory: pyroscope_ffi/ruby/ext/rbspy
366-
367-
- name: Update lock files
368-
run: cargo update
369-
working-directory: pyroscope_ffi/ruby/ext/thread_id
370-
371-
- name: Build native extensions
372-
run: rake rbspy_install
373-
working-directory: pyroscope_ffi/ruby
374-
375-
- name: Build native extensions
376-
run: rake thread_id_install
377-
working-directory: pyroscope_ffi/ruby
378-
379364
- name: Generate extra libraries
380365
run: BUILD_ARCH=manylinux2010_x86_64 ./pyroscope_ffi/ruby/scripts/docker.sh
381366

@@ -419,39 +404,27 @@ jobs:
419404
target: arm-unknown-linux-gnueabihf
420405

421406
name: Linux - ${{ matrix.build-arch }}
422-
runs-on: self-hosted
407+
runs-on: [self-hosted, Linux, ARM64]
423408

424409
steps:
425-
- uses: AutoModality/action-clean@v1
410+
- name: rm -rf * - custom script instead of AutoModality/action-clean@v1 to run as sudo to remove root owned directories created by docker.sh
411+
run: bash -c "set -e ; shopt -s dotglob; sudo rm -rf *"
426412

427413
- uses: actions/checkout@v3
428414
with:
429415
submodules: recursive
430416

431-
- uses: ruby/setup-ruby@v1
432-
env:
433-
ImageOS: ubuntu20
434-
with:
435-
ruby-version: '3.1'
436-
437-
- name: Install bundles
438-
run: bundle
439-
working-directory: pyroscope_ffi/ruby
440-
441-
- name: Update lock files
442-
run: cargo update
443-
working-directory: pyroscope_ffi/ruby/ext/rbspy
417+
- name: asdf clone
418+
run: ~/.asdf/bin/asdf || git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.1 ;
444419

445-
- name: Update lock files
446-
run: cargo update
447-
working-directory: pyroscope_ffi/ruby/ext/thread_id
420+
- name: asdf install
421+
run: echo $HOME/.asdf/bin >> $GITHUB_PATH ; echo $HOME/.asdf/shims >> $GITHUB_PATH
448422

449-
- name: Build native extensions
450-
run: rake rbspy_install
451-
working-directory: pyroscope_ffi/ruby
423+
- name: asdf install .tools-versions
424+
run: asdf install
452425

453-
- name: Build native extensions
454-
run: rake thread_id_install
426+
- name: Install bundles
427+
run: bundle
455428
working-directory: pyroscope_ffi/ruby
456429

457430
- name: Generate extra libraries

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby 3.1.3

0 commit comments

Comments
 (0)