Skip to content

Fix GitHub actions #313

Fix GitHub actions

Fix GitHub actions #313

Workflow file for this run

name: Ruby Package
on:
push:
branches:
pull_request:
branches: [main]
jobs:
linux-build:
name: Build linux gem amd64
runs-on: ubuntu-latest
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v4
- run: make gem/linux/amd64
- uses: actions/upload-artifact@v4
with:
name: "linux.gem"
path: pyroscope_ffi/ruby/pkg/*.gem
macos-build:
strategy:
fail-fast: false
matrix:
include:
- macos-version: "14"
target: x86_64-apple-darwin
mk-arch: amd64
- macos-version: "14"
target: aarch64-apple-darwin
mk-arch: arm64
name: macOS - ${{ matrix.target }}
runs-on: macos-${{ matrix.macos-version }}
env:
RUST_TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.82.0
targets: ${{ matrix.target }}
- run: make gem/mac/${{ matrix.mk-arch }}
- uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-ruby-${{ matrix.target }}
path: pyroscope_ffi/ruby/pkg/*.gem
linux-test:
strategy:
fail-fast: false
matrix:
PYROSCOPE_DETECT_SUBPROCESSES: [1, 0]
PYROSCOPE_ONCPU: [1, 0]
RUBY_VERSION: ['3.1', '3.2', '3.3']
needs: ['linux-build']
name: Linux Test
runs-on: ubuntu-latest
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.RUBY_VERSION }}
- uses: actions/download-artifact@v4
with:
name: "linux.gem"
path: "${{github.workspace}}/ruby"
- run: "cd ${{ github.workspace }}/ruby && ls -l"
- run: "cd ${{ github.workspace }}/ruby && gem install *.gem"
- uses: actions/checkout@v4
- name: Run Ruby Script
run: pyroscope_ffi/ruby/scripts/tests/test.rb
env:
PYROSCOPE_RUN_ID: ${{ github.run_id }}
PYROSCOPE_ARCH: x86-64-linux
PYROSCOPE_API_TOKEN: ${{ secrets.PYROSCOPE_API_TOKEN }}
PYROSCOPE_DETECT_SUBPROCESSES: ${{ matrix.PYROSCOPE_DETECT_SUBPROCESSES }}
PYROSCOPE_ONCPU: ${{ matrix.PYROSCOPE_ONCPU }}
RUBY_VERSION: ${{ matrix.RUBY_VERSION }}