GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - d33p0st/python-rust-mix-build: Build Test for maturin based python-rust mix projects.

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
BranchesTags
Open more actions menu

Latest commit

 

History

91 Commits
91 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
codes
codes
 
 
pysrc/test_bundle
pysrc/test_bundle
 
 
src
src
 
 
.deepsource.toml
.deepsource.toml
 
 
.gitignore
.gitignore
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

Dry Run

Overview

python-rust-mix-build is a GitHub Action that checks if the Python-Rust mix project passes build or not.

Usage

Test case usage for python-rust-mix-build.

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"

Requirements

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 pyo3 crate in rust to create binaries that can be called from a python script or file. Additionaly, maturin is being used to test the build which means pyproject.toml should have an entry about it.

A demo pyproject.toml and Cargo.toml is provided here.

Inputs

python-rust-mix-build has three inputs:

  • python-version: specify the python version. Default is 3.12

  • miniconda-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.

Caution

You need to pull auto-generated commits in case of using replace input, Else your repo will mess up.

Issues

Feel free to submit any issues here.

Pull Requests

Create any relevant pull requests here.

About

Build Test for maturin based python-rust mix projects.

d33p0st.in/documentation/actions/python-rust-mix-build#/actions/

Topics

actionsbuild-testgithub-actionspythonpython-rustrust

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.