Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ jobs:
- run: gcc -v
- run: make test

install-python-linux:
runs-on: ubuntu-latest
test-python:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand All @@ -107,4 +111,9 @@ jobs:
with:
python-version: '3.10'
cache: 'pip'
- run: pip install .
- uses: TheMrMilchmann/setup-msvc-dev@ced9887c29958f18f71b18c99d9eb0837859434c # v3.0.2
if: runner.os == 'Windows'
with:
arch: x64
- run: pip install . pytest
- run: pytest python/tests
52 changes: 17 additions & 35 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,37 @@
name: pypi

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ published ]
workflow_dispatch:

permissions:
contents: read

jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: '3.10'
cache: 'pip'
- run: |
pip install auditwheel patchelf
pip wheel . -w wheel
auditwheel repair -w dist --plat=manylinux_2_17_x86_64 wheel/*.whl
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: python-package-linux
path: dist/*.whl

build-macos:
runs-on: macos-latest
build-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
- uses: TheMrMilchmann/setup-msvc-dev@ced9887c29958f18f71b18c99d9eb0837859434c # v3.0.2
if: runner.os == 'Windows'
with:
python-version: '3.10'
cache: 'pip'
- run: |
pip wheel . -w dist
arch: x64
- name: Build wheels
uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: python-package-macos
path: dist/*.whl
name: python-package-${{ matrix.os }}
path: ./wheelhouse/*.whl

publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [build-linux, build-macos]
needs: [build-wheels]
permissions:
id-token: write
environment:
Expand All @@ -59,5 +41,5 @@ jobs:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
merge-multiple: true
path: dist/
path: wheelhouse/
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ bin
build
test/build
*__pycache__
wheelhouse
12 changes: 11 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ authors = [
description = "LC3 Codec library wrapper"
requires-python = ">=3.10"

[project.optional-dependencies]
[dependency-groups]
dev = ["pytest"]

[project.urls]
Homepage = "https://github.com/google/liblc3"

[tool.meson-python]
allow-windows-internal-shared-libs = true

[tool.meson-python.args]
setup = ['-Dpython=true']

[tool.cibuildwheel]
skip = "pp* cp36-* cp37-* cp38-* cp39-*"
archs = ["auto64"]

[tool.cibuildwheel.windows]
config-settings = { "setup-args" = "--vsenv" }
Loading
Loading