Merge branch 'main' of https://github.com/qsharp-community/qsharp-bri… #72
This file contains hidden or 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, windows-11-arm ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Rust on Windows ARM | |
| if: matrix.os == 'windows-11-arm' | |
| shell: powershell | |
| run: | | |
| Invoke-WebRequest -Uri https://win.rustup.rs/aarch64 -OutFile rustup-init.exe | |
| ./rustup-init.exe -y | |
| $env:Path += ";$env:USERPROFILE\.cargo\bin" | |
| echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - uses: actions/setup-python@v5 | |
| if: matrix.os == 'windows-11-arm' | |
| with: | |
| python-version: '3.13' | |
| - name: Install uniffi-bindgen-cs | |
| run: | | |
| cargo install uniffi-bindgen-cs --git https://github.com/NordSecurity/uniffi-bindgen-cs --tag v0.9.1+v0.28.3 | |
| - 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 |