Add github actions workflows for fork #10
Workflow file for this run
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
name: Build Debian package | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: python:3.12-bookworm | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Generate version string for tag | |
if: github.ref_type == 'tag' | |
run: | | |
REF=${{ github.ref_name }} | |
REF_STRIPPED=${REF:1} | |
echo "VERSION_DEB=${REF_STRIPPED}" >> $GITHUB_ENV | |
echo "VERSION_PY=${REF_STRIPPED/-anx.v/.}" >> $GITHUB_ENV | |
shell: bash | |
- name: Generate version string for branch | |
if: github.ref_type != 'tag' | |
run: | | |
echo "VERSION_DEB=0.0.0.${{ github.ref_name }}" >> $GITHUB_ENV | |
echo "VERSION_PY=0.0.0" >> $GITHUB_ENV | |
shell: bash | |
- name: Build | |
run: | | |
apt update && apt install -y build-essential cmake pkg-config ninja-build swig ca-certificates libssl-dev libsasl2-dev libwebsockets-dev | |
mkdir -p build out | |
cmake ./ -B build -DCMAKE_INSTALL_PREFIX=install/usr -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_CPP=OFF | |
cmake --build build -t install | |
shell: bash | |
- name: Create .deb file | |
run: | | |
cp -r ci/DEBIAN install/ | |
sed -i s/VERSION/${{ env.VERSION_DEB }}/ install/DEBIAN/control | |
dpkg-deb --build install out/libqpid-proton11-linux_x86_64.deb | |
- name: Upload .deb file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libqpid-proton11-linux_x86_64.deb | |
path: out/libqpid-proton11-linux_x86_64.deb | |
- name: Build wheel | |
run: | | |
pip wheel build/python | |
cp python_qpid_proton*.whl out/python_qpid_proton-${{ env.VERSION_PY }}-cp312-cp312-linux_x86_64.whl | |
- name: Upload wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python_qpid_proton-${{ env.VERSION_PY }}-cp312-cp312-linux_x86_64.whl | |
path: out/python_qpid_proton-${{ env.VERSION_PY }}-cp312-cp312-linux_x86_64.whl | |
- name: Create release | |
if: github.ref_type == 'tag' | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: true | |
files: out/* |