1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
|
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
|