Skip to content

Commit

Permalink
Merge branch 'devel' into r1viollet/minor_unused_var
Browse files Browse the repository at this point in the history
  • Loading branch information
P403n1x87 authored Jun 4, 2023
2 parents 5031ec1 + 369b825 commit 4ebbe10
Show file tree
Hide file tree
Showing 17 changed files with 1,192 additions and 90 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Benchmarks

on:
push:
branches:
- master
- devel
pull_request:

jobs:
Expand All @@ -15,6 +11,7 @@ jobs:

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev
- name: Install Python 3.10
Expand All @@ -41,12 +38,9 @@ jobs:
ulimit -c unlimited
source .venv/bin/activate
python scripts/benchmark.py | tee benchmarks.txt
python scripts/benchmark.py --format markdown | tee comment.txt
deactivate
# Make it a code comment
sed -e $'1i\\\n~~~' -e $'$a\\\n~~~' benchmarks.txt > comment.txt
- name: Post results on PR
uses: marocchino/sticky-pull-request-comment@v2
with:
Expand Down
45 changes: 43 additions & 2 deletions .github/workflows/build_arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
steps:
- uses: actions/checkout@v2
name: Checkout sources

- uses: uraimo/[email protected]
name: Build on ${{ matrix.arch }}
name: Build Austin on ${{ matrix.arch }}
id: build-on-arch
with:
arch: ${{ matrix.arch }}
Expand All @@ -31,6 +31,47 @@ jobs:
mkdir -p ./artifacts
run: ARCH=${{ matrix.arch }} bash scripts/build_arch.sh

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Build wheels on ${{ matrix.arch }}
run: |
python3.10 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r scripts/requirements-bw.txt
export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p");
case ${{ matrix.arch }} in
armv7)
PLATFORM=manylinux_2_17_armv7l.manylinux2014_armv7l
MUSL_PLATFORM=musllinux_1_1_armv7l
;;
aarch64)
PLATFORM=manylinux_2_17_aarch64.manylinux2014_aarch64
MUSL_PLATFORM=musllinux_1_1_aarch64
;;
ppc64le)
PLATFORM=manylinux_2_17_ppc64le.manylinux2014_ppc64le
MUSL_PLATFORM=musllinux_1_1_ppc64le
;;
esac
python scripts/build-wheel.py \
--version=$VERSION \
--platform=$PLATFORM \
--files austin:./artifacts/austin austinp:./artifacts/austinp
python scripts/build-wheel.py \
--version=$VERSION \
--platform=$MUSL_PLATFORM \
--files austin:./artifacts/austin.musl
deactivate
- name: Show artifacts
run: |
ls -al ./artifacts
9 changes: 7 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
- uses: actions/checkout@v2

- name: Install build dependencies
run: sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev help2man
run: |
sudo apt-get update
sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev help2man
- name: Compile Austin
run: |
Expand All @@ -36,7 +38,9 @@ jobs:
- uses: actions/checkout@v2

- name: Install cppcheck
run: sudo apt-get -y install cppcheck
run: |
sudo apt-get update
sudo apt-get -y install cppcheck
- name: Check soure code
run: cppcheck -q -f --error-exitcode=1 --inline-suppr src
Expand Down Expand Up @@ -103,6 +107,7 @@ jobs:
- name: Install test dependencies
run: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get -y install \
valgrind \
python2.7 \
Expand Down
90 changes: 90 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@ jobs:
- uses: actions/checkout@v2
name: Checkout Austin

- name: Install Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Generate artifacts
run: |
python3.10 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r scripts/requirements-bw.txt
sudo apt-get update
sudo apt-get -y install autoconf build-essential libunwind-dev binutils-dev libiberty-dev musl-tools zlib1g-dev
Expand All @@ -30,12 +40,26 @@ jobs:
tar -Jcf austinp-$VERSION-gnu-linux-amd64.tar.xz austinp
popd
# Build gnu wheel
python scripts/build-wheel.py \
--version=$VERSION \
--platform=manylinux_2_12_x86_64.manylinux2010_x86_64 \
--files austin:src/austin austinp:src/austinp
# Build with musl
musl-gcc -O3 -Os -s -Wall -pthread src/*.c -o src/austin -D__MUSL__
pushd src
tar -Jcf austin-$VERSION-musl-linux-amd64.tar.xz austin
popd
# Build musl wheel
python scripts/build-wheel.py \
--version=$VERSION \
--platform=musllinux_1_1_x86_64 \
--files austin:src/austin
deactivate
- name: Upload artifacts to release
uses: svenstaro/upload-release-action@v2
with:
Expand All @@ -44,6 +68,12 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true

- name: Upload Python wheels to PyPI
run: |
source .venv/bin/activate
twine upload dist/*.whl --username __token__ --password ${{ secrets.PYPI_TOKEN }}
deactivate
release-win:
runs-on: windows-latest
Expand Down Expand Up @@ -109,6 +139,29 @@ jobs:
overwrite: true
file_glob: true

- name: Install Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Build Python wheels
shell: bash
run: |
py -3.10 -m pip install --upgrade pip
py -3.10 -m pip install -r scripts/requirements-bw.txt
export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
py -3.10 scripts/build-wheel.py \
--version=$VERSION \
--platform=win_amd64 \
--files austin.exe:src/austin.exe
- name: Upload Python wheels to PyPI
shell: bash
run: |
py -3.10 -m twine upload dist/*.whl --username __token__ --password ${{ secrets.PYPI_TOKEN }}
release-osx:
runs-on: macos-latest
strategy:
Expand All @@ -118,8 +171,18 @@ jobs:
- uses: actions/checkout@v2
name: Checkout Austin

- name: Install Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Generate artifacts
run: |
python3.10 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r scripts/requirements-bw.txt
export VERSION=$(cat src/austin.h | sed -n -E "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
echo "::set-output name=version::$VERSION"
Expand All @@ -129,6 +192,26 @@ jobs:
zip -r austin-${VERSION}-mac64.zip austin
popd
# Build intel wheel
python scripts/build-wheel.py \
--version=$VERSION \
--platform=macosx_11_0_x86_64 \
--files austin:src/austin
clang -Wall -O3 -Os -o src/austin src/*.c -target arm64-apple-macos11
pushd src
zip -r austin-${VERSION}-mac-arm64.zip austin
popd
# Build arm wheel
python scripts/build-wheel.py \
--version=$VERSION \
--platform=macosx_11_0_arm64 \
--files austin:src/austin
deactivate
- name: Upload artifacts to release
uses: svenstaro/upload-release-action@v2
with:
Expand All @@ -137,3 +220,10 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true

- name: Upload Python wheels to PyPI
shell: bash
run: |
source .venv/bin/activate
twine upload dist/*.whl --username __token__ --password ${{ secrets.PYPI_TOKEN }}
deactivate
47 changes: 47 additions & 0 deletions .github/workflows/release_arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,50 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Build wheels on ${{ matrix.arch }}
run: |
python3.10 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r scripts/requirements-bw.txt
export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p");
case ${{ matrix.arch }} in
armv7)
PLATFORM=manylinux_2_17_armv7l.manylinux2014_armv7l
MUSL_PLATFORM=musllinux_1_1_armv7l
;;
aarch64)
PLATFORM=manylinux_2_17_aarch64.manylinux2014_aarch64
MUSL_PLATFORM=musllinux_1_1_aarch64
;;
ppc64le)
PLATFORM=manylinux_2_17_ppc64le.manylinux2014_ppc64le
MUSL_PLATFORM=musllinux_1_1_ppc64le
;;
esac
python scripts/build-wheel.py \
--version=$VERSION \
--platform=$PLATFORM \
--files austin:./artifacts/austin austinp:./artifacts/austinp
python scripts/build-wheel.py \
--version=$VERSION \
--platform=$MUSL_PLATFORM \
--files austin:./artifacts/austin.musl
deactivate
- name: Upload wheels
run: |
source .venv/bin/activate
twine upload dist/*.whl --username __token__ --password ${{ secrets.PYPI_TOKEN }}s
deactivate
Loading

0 comments on commit 4ebbe10

Please sign in to comment.