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
|
name: Pre-release
on:
push:
tags:
- 'v*-*'
jobs:
release-linux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
name: Release (Linux)
steps:
- uses: actions/checkout@v3
name: Checkout Austin
- name: Generate artifacts
run: |
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
# Compute dev version
export PREV_VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
export VERSION=${{ github.ref_name }}
sed -i "s/$PREV_VERSION/$VERSION/g" src/austin.h
pushd src
tar -Jcf austin-$VERSION-gnu-linux-amd64.tar.xz austin
tar -Jcf austinp-$VERSION-gnu-linux-amd64.tar.xz austinp
popd
# 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
- 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
prerelease: true
release_name: ${{ github.ref_name }}
file_glob: true
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"
# Compute dev version
export PREV_VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
export VERSION_DEV=${{ github.ref_name }}
export VERSION=$(echo $PREV_VERSION | sed -r -n "s/([0-9]+\.[0-9]+\.[0-9]+).*/\1/p")
sed -i "s/$PREV_VERSION/$VERSION/g" src/austin.h
gcc -s -Wall -O3 -Os -o src/austin src/*.c -lpsapi -lntdll
git checkout HEAD -- src/austin.h
git checkout "packaging/msi"
git checkout master
git checkout "packaging/msi" -- wix
export WIN_MSI="austin-$VERSION_DEV-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_DEV}-win64.zip austin.exe
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
prerelease: true
release_name: ${{ github.ref_name }}
file_glob: true
release-osx:
runs-on: macos-latest
strategy:
fail-fast: false
name: Release (macOS)
steps:
- uses: actions/checkout@v3
name: Checkout Austin
- name: Generate artifacts
run: |
# Compute dev version
export PREV_VERSION=$(cat src/austin.h | sed -n -E "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
export VERSION=${{ github.ref_name }}
sed -i "" "s/$PREV_VERSION/$VERSION/g" src/austin.h
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
- 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
prerelease: true
release_name: ${{ github.ref_name }}
body: See the changelog for details.
file_glob: true
|