Added Python packaging #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Package | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: clippy, rustfmt | |
- name: Install uniffi-bindgen-cs | |
run: | | |
cargo install uniffi-bindgen-cs --git https://github.com/NordSecurity/uniffi-bindgen-cs --tag v0.2.0 | |
- name: Build Rust Library | |
run: | | |
cargo build --release --manifest-path ${{ github.workspace }}/Cargo.toml | |
- name: Run Rust Tests | |
run: | | |
cargo test --release --manifest-path ${{ github.workspace }}/Cargo.toml | |
- name: Build Python Package | |
working-directory: platforms/python/qsharp-bridge | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python setup.py sdist bdist_wheel | |
- name: Upload Python Package Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: qsharp-bridge-wheel-${{ matrix.os }} | |
path: platforms/python/qsharp-bridge/dist/*.whl |