MacOSX Build #41
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: MacOSX Build | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'RealSense Version Tag' | |
required: false | |
default: 'master' | |
label: | |
description: 'Additional label for release' | |
required: false | |
default: '' | |
prerelease: | |
description: 'Mark Release as Pre-Release' | |
required: false | |
default: 'true' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ 'macos-12' ] | |
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | |
runs-on: ${{ matrix.os }} | |
name: ${{ github.event.inputs.tag }} python ${{ matrix.python-version }} on ${{ matrix.os }} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# install prerequisites | |
- name: Preqrequisites | |
run: | | |
brew install cmake libusb pkg-config openssl | |
brew install --cask powershell | |
pip install setuptools | |
# run build command | |
- name: Build librealsense2 | |
run: | | |
echo $GITHUB_WORKSPACE | |
cd $GITHUB_WORKSPACE | |
pwsh librealsense-python-mac.ps1 -tag ${{ github.event.inputs.tag }} | |
ls -la dist | |
# upload dist | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/* | |
tag: "macosx-${{ github.event.inputs.tag }}${{ github.event.inputs.label }}" | |
release_name: "pyrealsense2-macosx ${{ github.event.inputs.tag }}${{ github.event.inputs.label }}" | |
body: "Prebuilt pyrealsense2-macosx wheel packages for MacOS for librealsense2 version ${{ github.event.inputs.tag }}." | |
overwrite: true | |
file_glob: true | |
prerelease: ${{ github.event.inputs.prerelease }} |