Skip to content

Release v3.7.0

Release v3.7.0 #26

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
release-linux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
name: Release (Linux)
steps:
- uses: actions/checkout@v3
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
# Build austin
autoreconf --install
./configure
make
export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p");
pushd src
tar -Jcf austin-$VERSION-gnu-linux-amd64.tar.xz austin
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:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/austin*.tar.xz
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
strategy:
fail-fast: false
name: Release (Windows)
steps:
- uses: actions/checkout@v3
name: Checkout Austin
with:
fetch-depth: 0
- name: Generate artifacts
shell: bash
run: |
echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" >> $GITHUB_PATH
export PATH="/c/Program Files (x86)/`ls /c/Program\ Files\ \(x86\) | grep \"[wW]i[xX] [tT]oolset\"`/bin:$PATH"
export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
gcc -static -s -Wall -O3 -Os -o src/austin src/*.c -lpsapi -lntdll
git checkout "packaging/msi"
git checkout master
git checkout "packaging/msi" -- wix
export WIN_MSI="austin-$VERSION-win64.msi"
sed -i "s/%VERSION%/$VERSION/g" wix/Austin.wxs
pushd wix
candle Austin.wxs -out Austin.wixobj
light -ext WixUIExtension Austin.wixobj -out $WIN_MSI
popd
mv wix/$WIN_MSI src/$WIN_MSI;
test -f src/$WIN_MSI && echo ">> Windows MSI installer at src/$WIN_MSI" || echo ">> ERROR No Windows MSI installer generated."
pushd src
7z a -tzip austin-${VERSION}-win64.zip austin.exe
popd
- name: Upload to choco
shell: bash
run: |
export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
export WIN_MSI="austin-$VERSION-win64.msi"
export WIN_MSI_HASH=$( sha256sum src/$WIN_MSI | head -c 64 )
git checkout "packaging/msi" -- choco
pushd choco
sed -i "s/%WIN_MSI_HASH%/$WIN_MSI_HASH/g" tools/chocolateyinstall.ps1
/bin/find . -type f -exec sed -i "s/%VERSION%/$VERSION/g" {} \; ;
choco apikey --key ${{ secrets.CHOCO_APIKEY }} --source https://push.chocolatey.org/
choco pack
choco push --source https://push.chocolatey.org/
popd
- name: Upload artifacts to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/austin-*
tag: ${{ github.ref }}
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:
fail-fast: false
name: Release (macOS)
steps:
- uses: actions/checkout@v3
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"
gcc-12 -Wall -O3 -Os -o src/austin src/*.c
pushd src
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:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/austin-*
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