Skip to content

v7.4.0

v7.4.0 #6

Workflow file for this run

name: Release LibMultiSense
on:
release:
types: [published]
jobs:
release-assets:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-2022]
runs-on: ${{ matrix.os }}
env:
VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y nlohmann-json3-dev pybind11-dev python3-pip ninja-build
- name: Install Dependencies (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install pybind11 nlohmann-json
- name: Install Dependencies (Windows)
if: matrix.os == 'windows-2022'
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg install --triplet x64-windows
- name: Build Release
shell: bash
run: |
cmake -B build -S . \
-DBUILD_JSON_SERIALIZATION=ON \
-DBUILD_PYTHON_BINDINGS=ON \
-DBUILD_LEGACY_API=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=install-release
cmake --build build --config Release --target install -j "$(nproc || sysctl -n hw.ncpu || echo 8)"
rm -rf build
- name: Zip binaries (Windows)
if: matrix.os == 'windows-2022'
shell: pwsh
run: |
Compress-Archive -Path install-release/* -DestinationPath libmultisense-windows-2022.zip
- name: Zip binaries (Linux/macOS)
if: matrix.os != 'windows-2022'
shell: bash
run: |
cd install-release
zip -r ../libmultisense-${{ matrix.os }}.zip .
cd ..
- name: Upload binaries to Release
uses: softprops/action-gh-release@v2
with:
files: |
libmultisense-${{ matrix.os }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-wheels:
strategy:
matrix:
os: [ubuntu-24.04, macos-latest, windows-2022]
runs-on: ${{ matrix.os }}
env:
VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.23.2
with:
output-dir: wheelhouse
env:
CIBW_SKIP: "pp* *-musllinux*"
CIBW_BEFORE_ALL_LINUX: >
pip install pybind11 &&
git clone https://github.com/nlohmann/json.git &&
cd json &&
git checkout v3.11.3 &&
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DJSON_BuildTests=OFF &&
cmake --build build --target install &&
cmake --install build
CIBW_BEFORE_ALL_MACOS: >
brew install cmake ninja nlohmann-json pybind11
CIBW_BEFORE_ALL_WINDOWS: >
choco install cmake ninja &&
git clone https://github.com/microsoft/vcpkg.git &&
vcpkg\bootstrap-vcpkg.bat &&
vcpkg\vcpkg install --triplet x64-windows &&
set PATH=%PATH%;%cd%\vcpkg\installed\x64-windows\bin &&
pip install pybind11
CIBW_ENVIRONMENT_WINDOWS: PATH="$PATH;${{ github.workspace }}/vcpkg/installed/x64-windows/bin"
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.15"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
- name: Zip wheels (Windows)
if: matrix.os == 'windows-2022'
shell: pwsh
run: |
Compress-Archive -Path wheelhouse/* -DestinationPath libmultisense-windows-2022-wheels.zip
- name: Zip wheels (Linux/macOS)
if: matrix.os != 'windows-2022'
shell: bash
run: |
cd wheelhouse
zip -r ../libmultisense-${{ matrix.os }}-wheels.zip .
cd ..
- name: Upload wheels to Release
uses: softprops/action-gh-release@v2
with:
files: |
libmultisense-${{ matrix.os }}-wheels.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}