Skip to content

Merge pull request #26 from qsharp-community/bugfix/pythonn-packaging #63

Merge pull request #26 from qsharp-community/bugfix/pythonn-packaging

Merge pull request #26 from qsharp-community/bugfix/pythonn-packaging #63

Workflow file for this run

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: 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
env:
PACKAGE_VERSION: 0.99.0
- name: Upload Python Package Artifact
uses: actions/upload-artifact@v4
with:
name: qsharp-bridge-wheel-${{ matrix.os }}
path: platforms/python/qsharp-bridge/dist/*.whl
build-swift:
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust targets
run: |
rustup target add aarch64-apple-ios
rustup target add aarch64-apple-ios-sim
rustup target add aarch64-apple-darwin
- name: Build Swift Package
run: ./build_swift.sh
- name: Clean temporary build files from Swift Package
if: github.event_name != 'pull_request'
run: rm -rf platforms/swift/Qsharp.Bridge/.build
- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: Qsharp.Bridge-SwiftPackage
path: platforms/swift/Qsharp.Bridge