mirror of
https://github.com/glomatico/gamdl.git
synced 2026-08-03 13:27:13 +03:00
Build Rust extension in CI and releases
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- rust-wrapper-support
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
|
||||
- name: Rust tests
|
||||
run: |
|
||||
PYO3_PYTHON=python cargo test --manifest-path gamdl/downloader/muxer/Cargo.toml
|
||||
|
||||
- name: Build native extension
|
||||
run: |
|
||||
uv run maturin develop
|
||||
|
||||
- name: Python tests
|
||||
run: |
|
||||
uv run pytest
|
||||
@@ -24,13 +24,14 @@ jobs:
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
python-version: "3.10"
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Build release distributions
|
||||
run: |
|
||||
# NOTE: put your own distribution build steps here.
|
||||
python -m pip install build
|
||||
python -m build
|
||||
python -m pip install maturin
|
||||
maturin build --release --sdist --out dist
|
||||
|
||||
- name: Upload distributions
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -7,6 +7,8 @@ gamdl/downloader/muxer/target/
|
||||
gamdl/downloader/**/__pycache__/
|
||||
gamdl/muxer/
|
||||
!.gitignore
|
||||
!.github
|
||||
!.github/**
|
||||
!.python-version
|
||||
!pyproject.toml
|
||||
!README.md
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
name = "gamdl-amdecrypt"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Native media decrypt and mux engine for gamdl"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/glomatico/gamdl"
|
||||
|
||||
[lib]
|
||||
name = "_amdecrypt"
|
||||
|
||||
Reference in New Issue
Block a user