Skip to content

Upload wheels for tags #134

Upload wheels for tags

Upload wheels for tags #134

Workflow file for this run

on:
push:
branches: ["master"]
tags: ["*"]
pull_request:
branches: ["master"]
name: Continuous integration
jobs:
native:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: export DEBIAN_FRONTEND=noninteractive &&
sudo apt-get update &&
sudo apt-get install -y
black
ccache
cmake
g++
gcc
git
libboost-dev
libboost-python-dev
libc6-dev-i386
libcapstone-dev
libdw-dev
python3
python3-flake8
python3-pip
python3-venv
quilt
make
ninja-build
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Configure ccache
run: echo "CCACHE_DIR=$HOME/.ccache" >>"$GITHUB_ENV"
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.ccache
key: native
- name: Show ccache stats
run: ccache --show-stats --verbose
- name: Check formatting
run: ./fmt --check
- name: Build
run: PATH=/usr/lib/ccache:$PATH ./ci --skip-repair
- name: Smoke test
run: python3 -m pip install --user dist/wheelhouse/*.whl &&
memtrace record true &&
memtrace report >/dev/null
- name: Show ccache stats
run: ccache --show-stats --verbose
- name: Reset ccache stats
run: ccache --zero-stats
- uses: actions/upload-artifact@v4
with:
name: native
path: dist/wheelhouse/
cross:
strategy:
matrix:
arch: [aarch64,arm,i686,ppc64,ppc64le,s390x,x86_64]
python: [cp36-cp36m,cp37-cp37m,cp38-cp38,cp39-cp39,cp310-cp310,cp311-cp311,cp312-cp312]
runs-on: ubuntu-latest
steps:
- name: Install packages
run: export DEBIAN_FRONTEND=noninteractive &&
sudo apt-get update &&
sudo apt-get install -y
ccache
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Configure ccache
run: echo "CCACHE_DIR=$HOME/.ccache" >>"$GITHUB_ENV"
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.ccache
key: cross-${{ matrix.arch }}-${{ matrix.python }}
- name: Show ccache stats
run: ccache --show-stats --verbose
- name: Build
run: ./ci-docker
--arch=${{ matrix.arch }}
--python=${{ matrix.python }}
- name: Show ccache stats
run: ccache --show-stats --verbose
- name: Reset ccache stats
run: ccache --zero-stats
- uses: actions/upload-artifact@v4
with:
name: cross-${{ matrix.arch }}-${{ matrix.python }}
path: dist/wheelhouse/
PyPI:
runs-on: ubuntu-latest
needs:
- native
- cross
if: startsWith(github.ref, 'refs/tags/')
environment: PyPI
steps:
- name: Install packages
run: export DEBIAN_FRONTEND=noninteractive &&
sudo apt-get update &&
sudo apt-get install -y
tree
twine
unzip
- uses: actions/download-artifact@v4
with:
pattern: cross-*
- name: Show wheels
run: tree
- name: Upload wheels
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: twine upload --non-interactive --verbose */*.whl