From 4ec4f7376edbe937b404ab5c203b44be6f9b8636 Mon Sep 17 00:00:00 2001 From: Tolya Korniltsev Date: Tue, 21 Feb 2023 15:09:32 +0700 Subject: [PATCH] fix: running ruby release on arm selfhosted runnner (#87) - use asdf to install ruby --- .github/workflows/release.yml | 57 +++++++++-------------------------- .tool-versions | 1 + 2 files changed, 16 insertions(+), 42 deletions(-) create mode 100644 .tool-versions diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 465438c9..ee851e97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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: @@ -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 @@ -348,6 +348,7 @@ jobs: steps: - uses: AutoModality/action-clean@v1 + - run: id - uses: actions/checkout@v3 with: submodules: recursive @@ -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 @@ -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 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..519156f9 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.1.3 \ No newline at end of file