Skip to content

Commit

Permalink
fix: running ruby release on arm selfhosted runnner (#87)
Browse files Browse the repository at this point in the history
- use asdf to install ruby
  • Loading branch information
korniltsev authored Feb 21, 2023
1 parent b9e8daf commit 4ec4f73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 42 deletions.
57 changes: 15 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
lib-release:
name: pyroscope-main
name: pyroscope-main
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/lib-')"
continue-on-error: true
Expand All @@ -17,7 +17,7 @@ jobs:
draft: true
prerelease: false
cli-release:
name: pyroscope-cli
name: pyroscope-cli
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/cli-')"
steps:
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
draft: true
prerelease: false
pyspy-release:
name: pyroscope-pyspy
name: pyroscope-pyspy
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/pyspy-')"
continue-on-error: true
Expand Down Expand Up @@ -348,6 +348,7 @@ jobs:

steps:
- uses: AutoModality/action-clean@v1
- run: id
- uses: actions/checkout@v3
with:
submodules: recursive
Expand All @@ -360,22 +361,6 @@ jobs:
run: bundle
working-directory: pyroscope_ffi/ruby

- name: Update lock files
run: cargo update
working-directory: pyroscope_ffi/ruby/ext/rbspy

- name: Update lock files
run: cargo update
working-directory: pyroscope_ffi/ruby/ext/thread_id

- name: Build native extensions
run: rake rbspy_install
working-directory: pyroscope_ffi/ruby

- name: Build native extensions
run: rake thread_id_install
working-directory: pyroscope_ffi/ruby

- name: Generate extra libraries
run: BUILD_ARCH=manylinux2010_x86_64 ./pyroscope_ffi/ruby/scripts/docker.sh

Expand Down Expand Up @@ -419,39 +404,27 @@ jobs:
target: arm-unknown-linux-gnueabihf

name: Linux - ${{ matrix.build-arch }}
runs-on: self-hosted
runs-on: [self-hosted, Linux, ARM64]

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

- uses: actions/checkout@v3
with:
submodules: recursive

- uses: ruby/setup-ruby@v1
env:
ImageOS: ubuntu20
with:
ruby-version: '3.1'

- name: Install bundles
run: bundle
working-directory: pyroscope_ffi/ruby

- name: Update lock files
run: cargo update
working-directory: pyroscope_ffi/ruby/ext/rbspy
- name: asdf clone
run: ~/.asdf/bin/asdf || git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.1 ;

- name: Update lock files
run: cargo update
working-directory: pyroscope_ffi/ruby/ext/thread_id
- name: asdf install
run: echo $HOME/.asdf/bin >> $GITHUB_PATH ; echo $HOME/.asdf/shims >> $GITHUB_PATH

- name: Build native extensions
run: rake rbspy_install
working-directory: pyroscope_ffi/ruby
- name: asdf install .tools-versions
run: asdf install

- name: Build native extensions
run: rake thread_id_install
- name: Install bundles
run: bundle
working-directory: pyroscope_ffi/ruby

- name: Generate extra libraries
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 3.1.3

0 comments on commit 4ec4f73

Please sign in to comment.