Skip to content

Push down linux/386 check into build_rtpproxy.sh, so it's #359

Push down linux/386 check into build_rtpproxy.sh, so it's

Push down linux/386 check into build_rtpproxy.sh, so it's #359

# This is a basic workflow to help you get started with Actions
name: Build, Test & Publush
# Controls when the action will run.
on:
# Triggers the workflow on all push or pull request events
push:
pull_request:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
# added using https://github.com/step-security/secure-repo
permissions:
contents: read
# Cancels previous runs of this workflow for the same PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || startsWith(github.ref_name, 'codex/') || github.ref_name == 'wip' }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_test_python:
name: Build&Test
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
compiler: ['gcc', 'clang']
os: [ubuntu]
runs-on: ${{ matrix.os }}-latest
env:
COMPILER: ${{ matrix.compiler }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies
if: matrix.compiler == 'clang'
run: |
sudo apt-get update -y
sudo apt-get install -y clang llvm
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
shell: bash
- name: build
run: |
python setup.py sdist
CC=${COMPILER} python setup.py build
shell: bash
- name: install
run: CC=${COMPILER} pip install dist/rtp_io*.gz
shell: bash
- name: test
run: python -c "from rtp.io import rtpproxy"
shell: bash
build_wheels:
name: Build Python Wheels
permissions:
packages: write
needs: [build_test_python]
uses: sippy/cimagic/.github/workflows/BuildPythonWheels.yml@v2
with:
maximize_space: true
publish_all_wheels:
name: Publish Python Wheels
needs: [build_wheels]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/rtp.io
permissions:
actions: read
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Download all wheel artifacts
uses: actions/download-artifact@v4
with:
path: dist
pattern: 'dist-*'
merge-multiple: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: build
run: |
python setup.py sdist
- name: Show context tree
run: ls -lR dist
- name: Check release version number
if: github.event_name == 'release' && github.event.action == 'published'
run: |
GIT_BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
GIT_BRANCH="${GIT_BRANCH#refs/tags/}"
python setup.py checkversion --tag="${GIT_BRANCH}"
- name: Publish package distributions to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
roll_release:
name: Release
needs: publish_all_wheels
permissions:
contents: write
uses: sippy/cimagic/.github/workflows/RollReleaseDraft.yml@v2
with:
submodules_recursive: false