Skip to content

libbtrace

libbtrace #13

Workflow file for this run

name: libbtrace
run-name: libbtrace
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
# Use container for a newer version of clang-format
container: debian:trixie
steps:
- run: |
apt-get -qqy update
apt-get -qqy install pre-commit git clang-format
- uses: actions/checkout@v4
- name: Run pre-commit
run: |
git config --global --add safe.directory $(pwd)
pre-commit run --show-diff-on-failure --all-files
cibuildwheel:
runs-on: ${{ matrix.os }}
name: Build wheels (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Prepare environment script
run: |
echo '#!/bin/bash\necho "Preparing environment\n"' > ./prepare-env.sh
chmod +x ./prepare-env.sh
- name: Install dependencies
if: matrix.os == 'macos-latest'
run: |
brew install swig libtool bison automake autoconf flex glib pkgconf
echo 'export PATH="$(brew --prefix bison)/bin:$PATH"' >> ./prepare-env.sh
echo 'export MACOSX_DEPLOYMENT_TARGET=14.0' >> ./prepare-env.sh
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install pipx
run: python3 -m pip install pipx
- name: Build wheels
run: |
source ./prepare-env.sh
python3 -m pipx run cibuildwheel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
publish-python-packages:
if: github.event_name == 'push' && github.repository == 'antmicro/libbtrace'
runs-on: ubuntu-latest
name: Publish Python packages
needs: [cibuildwheel]
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ github.token }}
files: ./*.whl