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
99 changes: 21 additions & 78 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,22 @@
name: Release to to PyPi and GitHub

on:
push:
tags:
- "*"
workflow_dispatch:
release:
types: [published]

jobs:
build_manylinux:
name: Build manylinux wheels
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout@v2
- name: Install libopus-dev
run: |
sudo apt update
sudo apt -y install libopus-dev
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: messense/maturin-action@v1
with:
maturin-version: latest
command: build
args: --release -o dist
- uses: actions/upload-artifact@v2
with:
path: dist/*.whl

build_wheels:
name: Build wheels on ${{ matrix.os }} - ${{ matrix.vers }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# - vers: i686
# os: ubuntu-20.04
# - vers: aarch64
# os: ubuntu-20.04
# - vers: auto64
# os: ubuntu-20.04
- vers: arm64
os: macos-10.15
- vers: auto64
os: macos-10.15
- vers: auto64
os: windows-2019
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: [38, 39, 310, 311]

env:
SCCACHE_VERSION: 0.2.13
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y"
CIBW_BUILD_VERBOSITY: "1" # Make some more noise to not stall, and extra debugging.
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"'
CIBW_SKIP: "cp27-* cp34-* cp35-* pp* *-win32"
# env:
# SCCACHE_VERSION: 0.2.13

steps:
- uses: actions/checkout@v2
Expand All @@ -78,23 +34,10 @@ jobs:
with:
platforms: all

- name: wheels Linux ${{ matrix.vers }}
if: runner.os == 'Linux'
uses: joerick/[email protected]
env:
CIBW_ARCHS_LINUX: ${{ matrix.vers }}

- name: wheels Macos ${{ matrix.vers }}
if: runner.os == 'Macos'
- name: wheels ${{ matrix.os }} ${{ matrix.vers }}
uses: joerick/[email protected]
env:
CIBW_ARCHS_MACOS: ${{ matrix.vers }}

- name: wheels Windows ${{ matrix.vers }}
if: runner.os == 'Windows'
uses: joerick/[email protected]
env:
CIBW_ARCHS_WINDOWS: ${{ matrix.vers }}
CIBW_BUILD: "cp${{ matrix.python-version}}-*"

- uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -123,22 +66,22 @@ jobs:
path: dist/*.tar.gz

release:
needs: [build_manylinux, build_wheels, build_sdist]
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Release
uses: softprops/action-gh-release@v1
with:
files: target/wheels/lavasnek_rs*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# files: target/wheels/lavasnek_rs*.whl
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - uses: pypa/gh-action-pypi-publish@master
# with:
# user: __token__
# password: ${{ secrets.PYPI_TOKEN }}
21 changes: 21 additions & 0 deletions install_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!bin/sh

#https://signes.pl/update-cmake-to-version-3-in-centos/

sudo set -ex \
&& for key in C6C265324BBEBDC350B513D02D2CEF1034921684; do \
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done

ENV CMAKE_VERSION 3.6.2

sudo set -ex \
&& curl -fsSLO --compressed https://cmake.org/files/v3.6/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \
&& curl -fsSLO --compressed https://cmake.org/files/v3.6/cmake-${CMAKE_VERSION}-SHA-256.txt.asc \
&& curl -fsSLO --compressed https://cmake.org/files/v3.6/cmake-${CMAKE_VERSION}-SHA-256.txt \
&& gpg --verify cmake-${CMAKE_VERSION}-SHA-256.txt.asc cmake-${CMAKE_VERSION}-SHA-256.txt \
&& grep "cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \
&& tar xzf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz -C /usr/local --strip-components=1 --no-same-owner \
&& rm -rf cmake-${CMAKE_VERSION}*
20 changes: 18 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ build-backend = "maturin"
requires = ["maturin>=0.12,<0.13"]

[project]
version = "0.1.8"
description = "A Discord voice library using Python Songbird bindings."
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
Expand All @@ -13,8 +11,10 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = ["yt-dlp>=2021.12.1"]
description = "A Discord voice library using Python Songbird bindings."
name = "songbird-py"
requires-python = ">=3.8"
version = "0.1.8"

[project.optional-dependencies]
hikari = ["hikari"]
Expand All @@ -27,3 +27,19 @@ GitHub = "https://github.com/magpie-dev/Songbird-Py"

[tool.maturin]
sdist-include = ["songbird/*.pyi"]

[tool.cibuildwheel]
build-verbosity = "1"

[tool.cibuildwheel.linux]
archs = ["auto", "aarch64"]
before-build = """
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y &&
yum install -y opus
"""

[tool.cibuildwheel.macos]
archs = ["auto", "arm64"]

[tool.cibuildwheel.windows]
archs = ["auto", "arm64"]
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

33 changes: 0 additions & 33 deletions setup.py

This file was deleted.