s |
focus search bar ( enter to select, ▲ / ▼ to change selection) |
g a |
go to actions |
g c |
go to crates |
g h |
go to hackathons |
g l |
go to libraries |
g p |
go to projects |
h |
toggle this help ( esc also exits) |
python-rust-mix-build is a GitHub action that checks if the Python Rust Mix Project passes Build or not.
To use this in your own workflow,
- name: Run Build Test
uses: d33p0st/python-rust-mix-build@v1
with:
python-version: 3.9 # set python version. default: 3.12
miniconda-version: # set miniconda version. default: "latest"
Add the above snippet in your workflow.
The complete yaml file would look something like this:
name: Build Test
on: [push]
jobs:
Test:
runs-on: ubuntu-latest # multiple can be added
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run Build Test
uses: d33p0st/python-rust-mix-build@v1
with:
python-version: 3.9 # set python version. default: 3.12
miniconda-version: # set miniconda version. default: "latest"
For this action to work on your Python-Rust mix project, make sure you have Cargo.toml and pyproject.toml intact and follows the proper rules.
For Example, the following entries should be there in your Cargo.toml
[lib]
crate-type = ["cdylib"]
[build-dependencies]
cc = "1.0"
Note: This will not work in pure rust or pure python projects. Make sure you are using
pyo3crate in rust to create binaries that can be called from a python script or file. Additionally,maturinis being used to test the build which meanspyproject.tomlshould have an entry about it.
A demo
pyproject.tomlandCargo.tomlis provided here.
python-version: specify the python version. Default is 3.12miniconda-version: specify the miniconda version to use as maturin needs either venv or miniconda to work. Default is "latest"replace: Takes boolean values. Default is false. This builds and pushes that built binary back to the repository.
For this to work, add an addition line to your workflow file:
permissions: write-all
GH_TOKEN: This takes GITHUB API TOKEN as input, if permissions: write-all line is provided, The action will automatically get the GITHUB TOKEN from your account. However, If not provided, GH_TOKEN needs to be set with proper permissions.You need to pull auto-generated commits in case of using replace input, Else your repo will mess up.
Feel free to submit any issues here.
Create any relevant pull requests here.
|
Documentation
2026 d33p0st
d33p0st.in/documentation |
| © Soumyo Deep Gupta. created with GitHub Pages, written in Markdown. |
s |
focus search bar ( enter to select, ▲ / ▼ to change selection) |
g a |
go to actions |
g c |
go to crates |
g h |
go to hackathons |
g l |
go to libraries |
g p |
go to projects |
h |
toggle this help ( esc also exits) |