Skip to content

Fix Color Stream Crash #159

Fix Color Stream Crash

Fix Color Stream Crash #159

Workflow file for this run

name: MultiSense Viewer Pull request workflow
on:
pull_request:
types: [opened, synchronize, reopened]
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
VersionJob:
name: "Set Version"
runs-on: ubuntu-latest
outputs:
install_path: ${{ steps.install_path_id.outputs.install_path }}
install_path_ubuntu: ${{ steps.install_path_id_ubuntu.outputs.install_path_ubuntu }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history to access tags
fetch-tags: true
- name: Fetch tags explicitly
run: git fetch --tags
- name: Extract version from tag
id: extract_version
run: |
# Get the latest tag (e.g., v1.1.5) and remove the 'v' prefix if needed
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
VERSION=${TAG#v}
# Split VERSION into MAJOR, MINOR, and PATCH
MAJOR=$(echo "$VERSION" | cut -d. -f1)
MINOR=$(echo "$VERSION" | cut -d. -f2)
PATCH=$(echo "$VERSION" | cut -d. -f3)
# Export the version numbers as environment variables
echo "MAJOR=$MAJOR" >> $GITHUB_ENV
echo "MINOR=$MINOR" >> $GITHUB_ENV
echo "PATCH=$PATCH" >> $GITHUB_ENV
- name: Print version
run: echo "The version is ${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}"
- name: Set Output
id: install_path_id
run: echo "install_path=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64" >> $GITHUB_OUTPUT
- name: Set Output Ubuntu
id: install_path_id_ubuntu
run: echo "install_path_ubuntu=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64/opt/multisense" >> $GITHUB_OUTPUT
BuildWindows:
name: Compile Check for Windows
needs: [VersionJob]
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGIT_SUBMODULE=OFF -DWARNINGS_AS_ERRORS=FALSE
- name: Build project
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install -- /m:10
# - name: Prepare Installer Files
# shell: powershell
# run: |
# # Move Inno Setup script and necessary tools into the build directory
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\Windows\inno_setup_script.iss" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\Windows\build_installer.ps1" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\compile.sh" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\install_spirv_compiler.sh" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\monitor_memory_usage.py" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\how_to_release" -Destination "$($env.GITHUB_WORKSPACE)\build"
#
# # Clean up unnecessary directories
# Remove-Item -Recurse -Force "$($env.GITHUB_WORKSPACE)\build\Assets\Tools\Ubuntu"
# Remove-Item -Recurse -Force "$($env.GITHUB_WORKSPACE)\build\bin"
# Remove-Item -Recurse -Force "$($env.GITHUB_WORKSPACE)\build\include"
# Remove-Item -Recurse -Force "$($env.GITHUB_WORKSPACE)\build\lib"
#
# - name: Building the installer
# run: |
# "%programfiles(x86)%\Inno Setup 6\iscc.exe" "$env.GITHUB_WORKSPACE\build\inno_setup_script.iss"
# shell: cmd
BuildUbuntu20:
name: Build and package for Ubuntu 20_04
needs: [VersionJob]
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-20.04
steps:
- name: print install location
run: echo "My output is ${{ needs.VersionJob.outputs.install_path }}"
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.2.198.1
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Install dependencies
run: sudo apt-get install -y cmake libx11-dev build-essential xorg-dev libtbb-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libssl-dev libgtk-3-dev libsystemd-dev
#- name: update gcc11
# run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGIT_SUBMODULE=OFF -DWARNINGS_AS_ERRORS=FALSE #-D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build -- -j3
- name: Install
working-directory: ${{github.workspace}}/build
run: cmake --install . --config ${{env.BUILD_TYPE}}
- name: Prepare package step
working-directory: ${{github.workspace}}/build
run: |
mkdir ${{ needs.VersionJob.outputs.install_path }}/DEBIAN && cp ${{github.workspace}}/Assets/Tools/Ubuntu/control ${{ needs.VersionJob.outputs.install_path }}/DEBIAN/
mkdir -p ${{ needs.VersionJob.outputs.install_path }}/usr/share/applications && cp ${{github.workspace}}/Assets/Tools/Ubuntu/multisense.desktop ${{ needs.VersionJob.outputs.install_path }}/usr/share/applications/
cp ${{github.workspace}}/Assets/Tools/Ubuntu/start.sh ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/include
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/lib
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/share
- name: Package
working-directory: ${{github.workspace}}/build
run: dpkg-deb --build --root-owner-group ${{ needs.VersionJob.outputs.install_path }}
BuildUbuntu22:
name: Build and package for Ubuntu 22_04
needs: [VersionJob]
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
steps:
- name: print install location
run: echo "My output is ${{ needs.VersionJob.outputs.install_path }}"
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Install dependencies
run: sudo apt-get install -y cmake libx11-dev build-essential xorg-dev libtbb-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libssl-dev libgtk-3-dev libsystemd-dev libwebp-dev
#- name: update gcc11
#run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGIT_SUBMODULE=OFF -DWARNINGS_AS_ERRORS=FALSE #-D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build -- -j3
- name: Install
working-directory: ${{github.workspace}}/build
run: cmake --install . --config ${{env.BUILD_TYPE}}
- name: Prepare package step
working-directory: ${{github.workspace}}/build
run: |
mkdir ${{ needs.VersionJob.outputs.install_path }}/DEBIAN && cp ${{github.workspace}}/Assets/Tools/Ubuntu/control ${{ needs.VersionJob.outputs.install_path }}/DEBIAN/
mkdir -p ${{ needs.VersionJob.outputs.install_path }}/usr/share/applications && cp ${{github.workspace}}/Assets/Tools/Ubuntu/multisense.desktop ${{ needs.VersionJob.outputs.install_path }}/usr/share/applications/
cp ${{github.workspace}}/Assets/Tools/Ubuntu/start.sh ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/include
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/lib
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/share
- name: Package
working-directory: ${{github.workspace}}/build
run: dpkg-deb --build --root-owner-group ${{ needs.VersionJob.outputs.install_path }}
BuildUbuntu24:
name: Build and package for Ubuntu 24_04
needs: [VersionJob]
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-24.04
steps:
- name: print install location
run: echo "My output is ${{ needs.VersionJob.outputs.install_path }}"
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Install dependencies
run: sudo apt-get install -y cmake libx11-dev build-essential xorg-dev libtbb-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libssl-dev libgtk-3-dev libsystemd-dev libwebp-dev
#- name: update gcc11
#run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGIT_SUBMODULE=OFF -DWARNINGS_AS_ERRORS=FALSE #-D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build -- -j3
- name: Install
working-directory: ${{github.workspace}}/build
run: cmake --install . --config ${{env.BUILD_TYPE}}
- name: Prepare package step
working-directory: ${{github.workspace}}/build
run: |
mkdir ${{ needs.VersionJob.outputs.install_path }}/DEBIAN && cp ${{github.workspace}}/Assets/Tools/Ubuntu/control ${{ needs.VersionJob.outputs.install_path }}/DEBIAN/
mkdir -p ${{ needs.VersionJob.outputs.install_path }}/usr/share/applications && cp ${{github.workspace}}/Assets/Tools/Ubuntu/multisense.desktop ${{ needs.VersionJob.outputs.install_path }}/usr/share/applications/
cp ${{github.workspace}}/Assets/Tools/Ubuntu/start.sh ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/include
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/lib
rm -rf ${{ needs.VersionJob.outputs.install_path }}/opt/multisense/share
- name: Package
working-directory: ${{github.workspace}}/build
run: dpkg-deb --build --root-owner-group ${{ needs.VersionJob.outputs.install_path }}