-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat/upstream_gzip_co…
…mpression
- Loading branch information
Showing
33 changed files
with
1,374 additions
and
736 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
name: Python Package | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'pyroscope_ffi/python/**' | ||
- '.github/workflows/ci-ffi-python.yml' | ||
branches: | ||
- '**' | ||
pull_request: | ||
paths: | ||
- 'pyroscope_ffi/python/**' | ||
- '.github/workflows/ci-ffi-python.yml' | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
linux-build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build-arch: | ||
- manylinux2010_x86_64 | ||
|
||
name: Linux - ${{ matrix.build-arch }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: AutoModality/action-clean@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- if: matrix.build-arch == 'manylinux2014_aarch64' | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Build in Docker | ||
run: pyroscope_ffi/python/scripts/docker.sh | ||
env: | ||
BUILD_ARCH: ${{ matrix.build-arch }} | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: "linux.whl" | ||
path: pyroscope_ffi/python/dist/* | ||
|
||
linux-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
PYROSCOPE_DETECT_SUBPROCESSES: [1, 0] | ||
PYROSCOPE_ONCPU: [1, 0] | ||
PYROSCOPE_GIL_ONLY: [1, 0] | ||
PYROSCOPE_NATIVE: [1, 0] | ||
PYTHON_VERSION: ['2.7', '3.7', '3.8', '3.9', '3.10'] | ||
needs: ['linux-build'] | ||
name: Linux Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.PYTHON_VERSION }} | ||
architecture: x64 | ||
- uses: actions/download-artifact@master | ||
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@v2 | ||
with: | ||
submodules: recursive | ||
- name: Run Python Script | ||
run: pyroscope_ffi/python/scripts/tests/test.py | ||
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 }} | ||
PYROSCOPE_GIL_ONLY: ${{ matrix.PYROSCOPE_GIL_ONLY }} | ||
PYROSCOPE_NATIVE: ${{ matrix.PYROSCOPE_NATIVE }} | ||
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} | ||
|
||
linux-arm-build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build-arch: | ||
- manylinux2014_aarch64 | ||
|
||
name: Linux - ${{ matrix.build-arch }} | ||
runs-on: [self-hosted, Linux, ARM64] | ||
|
||
steps: | ||
- uses: AutoModality/action-clean@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build in Docker | ||
run: pyroscope_ffi/python/scripts/docker.sh | ||
env: | ||
BUILD_ARCH: ${{ matrix.build-arch }} | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: "linux-arm.whl" | ||
path: pyroscope_ffi/python/dist/* | ||
|
||
macos-build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- macos-version: "11.0" | ||
target: x86_64-apple-darwin | ||
py-platform: macosx-11_0_x86_64 | ||
- macos-version: "11.0" | ||
target: aarch64-apple-darwin | ||
py-platform: macosx-11_0_arm64 | ||
|
||
name: macOS - ${{ matrix.py-platform }} | ||
runs-on: macos-${{ matrix.macos-version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
override: true | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
|
||
- name: Build Wheel | ||
run: | | ||
pip install wheel | ||
python3 setup.py bdist_wheel -p ${{ matrix.py-platform }} | ||
working-directory: pyroscope_ffi/python | ||
env: | ||
CARGO_BUILD_TARGET: ${{ matrix.target }} | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.target }} | ||
path: pyroscope_ffi/python/dist/* | ||
|
||
macos-intel-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
PYROSCOPE_DETECT_SUBPROCESSES: [1, 0] | ||
PYROSCOPE_ONCPU: [1, 0] | ||
PYROSCOPE_GIL_ONLY: [1, 0] | ||
PYROSCOPE_NATIVE: [1, 0] | ||
PYTHON_VERSION: ['2.7', '3.7', '3.8', '3.9', '3.10'] | ||
needs: ['macos-build'] | ||
name: Macos Test | ||
runs-on: macos-11.0 | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.PYTHON_VERSION }} | ||
architecture: x64 | ||
- uses: actions/download-artifact@master | ||
with: | ||
name: x86_64-apple-darwin | ||
path: "${{github.workspace}}/python" | ||
|
||
- run: "python --version" | ||
- run: "python3 --version" | ||
- run: "cd ${{ github.workspace }}/python && ls -l" | ||
- run: "cd ${{ github.workspace }}/python && pip3 install *.whl" | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Run Python Script | ||
run: pyroscope_ffi/python/scripts/tests/test.py | ||
env: | ||
PYROSCOPE_RUN_ID: ${{ github.run_id }} | ||
PYROSCOPE_ARCH: x86-64-apple-darwin | ||
PYROSCOPE_API_TOKEN: ${{ secrets.PYROSCOPE_API_TOKEN }} | ||
PYROSCOPE_DETECT_SUBPROCESSES: ${{ matrix.PYROSCOPE_DETECT_SUBPROCESSES }} | ||
PYROSCOPE_ONCPU: ${{ matrix.PYROSCOPE_ONCPU }} | ||
PYROSCOPE_GIL_ONLY: ${{ matrix.PYROSCOPE_GIL_ONLY }} | ||
PYROSCOPE_NATIVE: ${{ matrix.PYROSCOPE_NATIVE }} | ||
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} | ||
|
||
sdist-build: | ||
name: sdist | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: AutoModality/action-clean@v1 | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Build sdist | ||
run: python setup.py sdist | ||
working-directory: pyroscope_ffi/python | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: "sdist.whl" | ||
path: pyroscope_ffi/python/dist/* |
Oops, something went wrong.