Skip to content

Python bindings using scikit build core #1169

Python bindings using scikit build core

Python bindings using scikit build core #1169

Workflow file for this run

name: Rust
on:
push:
branches: [ master, release-* ]
paths-ignore:
- '.github/workflows/docs.yml'
- '.github/workflows/keyvi.yml'
- '.github/workflows/python**.yml'
- 'docker/**'
- 'doc/**'
- 'python/**'
pull_request:
branches: [master]
paths-ignore:
- '.github/workflows/docs.yml'
- '.github/workflows/keyvi.yml'
- '.github/workflows/python**.yml'
- 'docker/**'
- 'doc/**'
- 'python/**'
release:
types: [published]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: swatinem/rust-cache@v2
with:
workspaces: |
rust
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install -y libsnappy-dev libzzip-dev zlib1g-dev libboost-all-dev
- name: Code fomatting
run: cargo fmt --manifest-path rust/Cargo.toml -- --check
- name: Build
run: cargo build --verbose --manifest-path rust/Cargo.toml
- name: Run tests
run: cargo test --verbose --manifest-path rust/Cargo.toml
build_latest_deps:
name: Latest Dependencies
runs-on: ubuntu-latest
continue-on-error: true
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: allow
steps:
- uses: actions/checkout@v6
- uses: swatinem/rust-cache@v2
with:
workspaces: |
rust
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install -y libsnappy-dev libzzip-dev zlib1g-dev libboost-all-dev
- run: rustup update stable && rustup default stable
- run: cargo update --verbose --manifest-path rust/Cargo.toml
- run: cargo build --verbose --manifest-path rust/Cargo.toml
- run: cargo test --verbose --manifest-path rust/Cargo.toml
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
if: github.event_name == 'release'
needs: build
environment:
name: crates.io
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- uses: swatinem/rust-cache@v2
with:
workspaces: |
rust
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install -y libsnappy-dev libzzip-dev zlib1g-dev libboost-all-dev
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: Publish
run: >
cargo publish
--verbose
--manifest-path rust/Cargo.toml
--locked
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}