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

Fix GitHub actions #187

Merged
merged 14 commits into from
Nov 22, 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
40 changes: 18 additions & 22 deletions .github/workflows/ci-ffi-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Python Package

on:
push:
branches: [ main ]
branches:
pull_request:
branches: [ main ]

Expand All @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest # TODO try using grafana runners

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build in Docker
run: make wheel/linux/amd64

Expand All @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
PYTHON_VERSION: [ '3.9', '3.10', '3.11', '3.12', '3.13']
needs: [ 'linux-build' ]
name: Linux Test
runs-on: ubuntu-latest
Expand All @@ -36,18 +36,18 @@ jobs:
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
steps:
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.PYTHON_VERSION }}
architecture: x64
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: "linux.whl"
path: "${{github.workspace}}/python"

- run: "cd ${{ github.workspace }}/python && ls -l"
- run: "cd ${{ github.workspace }}/python && pip install *.whl"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: docker run -d -p4040:4040 grafana/pyroscope
- run: python pyroscope_ffi/python/scripts/tests/test.py

Expand All @@ -56,7 +56,7 @@ jobs:
runs-on: github-hosted-ubuntu-arm64
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build in Docker
run: make wheel/linux/arm64

Expand All @@ -70,8 +70,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Upgrade pip
Expand All @@ -91,33 +91,29 @@ jobs:
fail-fast: false
matrix:
include:
- macos-version: "11.0"
- macos-version: "14"
target: x86_64-apple-darwin
py-platform: macosx-11_0_x86_64
mk-arch: amd64
- macos-version: "11.0"
- macos-version: "14"
target: aarch64-apple-darwin
py-platform: macosx-11_0_arm64
mk-arch: arm64

name: macOS - ${{ matrix.py-platform }}
name: macOS - ${{ matrix.target }}
runs-on: macos-${{ matrix.macos-version }}

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.76.0
target: ${{ matrix.target }}
profile: minimal
override: true
toolchain: 1.82.0
targets: ${{ matrix.target }}

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11

- run: make wheel/mac/${{ matrix.mk-arch }}
- uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
name: ${{ github.sha }}-python-${{ matrix.target }}
path: pyroscope_ffi/python/dist/*
27 changes: 13 additions & 14 deletions .github/workflows/ci-ffi-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Ruby Package

on:
push:
branches: [main]
branches:
pull_request:
branches: [main]

Expand All @@ -13,7 +13,7 @@ jobs:

steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: make gem/linux/amd64
- uses: actions/upload-artifact@v4
with:
Expand All @@ -24,33 +24,32 @@ jobs:
fail-fast: false
matrix:
include:
- macos-version: "11.0"
- macos-version: "14"
target: x86_64-apple-darwin
mk-arch: amd64
- macos-version: "11.0"
- 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@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.76.0
target: ${{ matrix.target }}
profile: minimal
override: true
toolchain: 1.82.0
targets: ${{ matrix.target }}
- run: make gem/mac/${{ matrix.mk-arch }}
- uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
name: ${{ github.sha }}-ruby-${{ matrix.target }}
path: pyroscope_ffi/ruby/pkg/*.gem

linux-test:
Expand All @@ -59,21 +58,21 @@ jobs:
matrix:
PYROSCOPE_DETECT_SUBPROCESSES: [1, 0]
PYROSCOPE_ONCPU: [1, 0]
RUBY_VERSION: ['2.6', '2.7', '3.0', '3.1', '3.2']
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@v2
- 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@v3
- uses: actions/checkout@v4
- name: Run Ruby Script
run: pyroscope_ffi/ruby/scripts/tests/test.rb
env:
Expand Down
43 changes: 19 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
runs-on: ubuntu-latest
if: "startsWith(github.event.release.tag_name, 'lib-')"
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
override: true
toolchain: 1.82.0
- name: publish pyroscope crate
continue-on-error: true
run: |
Expand All @@ -26,13 +25,12 @@ jobs:
# runs-on: ubuntu-latest
# if: "startsWith(github.event.release.tag_name, 'cli-')"
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# - uses: actions-rs/toolchain@v1
# - uses: dtolnay/rust-toolchain@v1
# with:
# toolchain: stable
# override: true
# toolchain: 1.82.0
# - name: install libunwind (for pprof)
# run: sudo apt install libunwind8-dev
# - name: publish pyroscope crate
Expand All @@ -45,11 +43,10 @@ jobs:
runs-on: ubuntu-latest
if: "startsWith(github.event.release.tag_name, 'pprofrs-')"
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
override: true
toolchain: 1.82.0
- name: publish pprofrs crate
continue-on-error: true
run: |
Expand All @@ -60,11 +57,10 @@ jobs:
runs-on: ubuntu-latest
if: "startsWith(github.event.release.tag_name, 'rbspy-')"
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
override: true
toolchain: 1.82.0
- name: publish rbspy crate
continue-on-error: true
run: |
Expand All @@ -75,11 +71,10 @@ jobs:
runs-on: ubuntu-latest
if: "startsWith(github.event.release.tag_name, 'pyspy-')"
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
override: true
toolchain: 1.82.0
- name: publish pyspy crate
continue-on-error: true
run: |
Expand All @@ -90,7 +85,7 @@ jobs:
runs-on: ubuntu-latest
if: "startsWith(github.event.release.tag_name, 'python-')"
steps:
- uses: robinraju/release-downloader@v1.4
- uses: robinraju/release-downloader@v1
with:
tag: ${{ github.event.release.tag_name }}
fileName: "*"
Expand All @@ -99,7 +94,7 @@ jobs:
out-file-path: "dist"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@v1.12.2
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Expand All @@ -110,7 +105,7 @@ jobs:
outputs:
files_json: ${{ steps.list-files.outputs.files_json }}
steps:
- uses: robinraju/release-downloader@v1.4
- uses: robinraju/release-downloader@v1
with:
tag: ${{ github.event.release.tag_name }}
fileName: "*"
Expand Down Expand Up @@ -138,7 +133,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- uses: robinraju/release-downloader@v1.4
- uses: robinraju/release-downloader@v1
with:
tag: ${{ github.event.release.tag_name }}
fileName: "*"
Expand Down
Loading