Skip to content

ci: use corresponding rizin branch #282

ci: use corresponding rizin branch

ci: use corresponding rizin branch #282

Workflow file for this run

name: build
on:
push:
workflow_dispatch:
workflow_call:
inputs:
external_call:
description: 'To distinguish workflow_call from regular push'
type: boolean
required: false
default: true
rizin_ref:
required: false
type: string
default: 'dev'
jobs:
pypa-wheels:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019, macos-14]
steps:
- name: Install SWIG with Homebrew
if: matrix.os == 'macos-14' && matrix.enabled
run: brew install swig
- name: Checkout rz-bindgen
uses: actions/checkout@v4
# runned only from workflow_call
- name: Checkout rizin
if: ${{ inputs.external_call }}
uses: actions/checkout@v4
with:
repository: rizinorg/rizin
path: rizin
ref: ${{ inputs.rizin_ref }}
- name: Checkout rizin (stable)
if: ${{ !inputs.external_call }} && ((github.ref_name == 'stable') || (github.base_ref == 'stable'))
run: git clone -b stable https://github.com/rizinorg/rizin
- name: Checkout rizin (dev)
if: ${{ !inputs.external_call }} && ((github.ref_name != 'stable') && (github.base_ref != 'stable'))
run: git clone -b dev https://github.com/rizinorg/rizin
- name: Build rz-bindgen
uses: pypa/[email protected]
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: sdist-${{ matrix.os }}
path: dist/*.tar.gz
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
ubuntu-default-llvm:
runs-on: ubuntu-22.04
steps:
- name: Checkout rz-bindgen
uses: actions/checkout@v4
with:
path: rz-bindgen
- name: Checkout rizin
uses: actions/checkout@v4
with:
repository: rizinorg/rizin
path: rizin
- name: Install dependencies
run: |
sudo apt update
sudo apt-get --assume-yes install cmake swig pkg-config clang libclang-dev llvm wget unzip python3-wheel python3-setuptools build-essential python3-pip
pygt311=$(python3 -c 'import sys; print(0) if sys.version_info.minor > 11 else print(1)' 2>&1)
if [[ $pygt311 == '0' ]]; then
sudo pip3 --break-system-packages install meson ninja
else
sudo pip3 install meson ninja
fi
- name: Install rizin
run: |
export PATH=$PATH:/usr/local/bin
meson setup --prefix=/usr --buildtype=release build && ninja -C build && sudo ninja -C build install
working-directory: rizin
- name: Build rz-bindgen
run: |
meson setup --prefix=/usr -Dplugin=enabled build
meson compile -C build
sudo meson install -C build
working-directory: rz-bindgen
- name: Test python lang plugin
run: rizin -qc "Ll" | grep "Python SWIG"
- name: Test rizin.py
run: |
echo "import rizin" > testimport.py
python3 testimport.py