Submodule commit. #438
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: Build | |
on: [push] | |
jobs: | |
build-windows: | |
name: build-windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
fetch-depth: 0 | |
- name: Get all tags | |
run: | | |
git show-ref --tags | |
git log -40 | |
git describe | |
- name: Pre-install (Windows) | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..).FullName)\3rdparty" | |
mkdir $thirdpartydir | |
- name: Install NSIS 8192-character limit override | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..\3rdparty).FullName)" | |
$zipfile="$thirdpartydir\nsis-8192-overrides.zip" | |
(New-Object System.Net.WebClient).DownloadFile( | |
"https://downloads.sourceforge.net/project/nsis/NSIS%203/3.09/nsis-3.09-strlen_8192.zip",$zipfile); | |
Write-Output "NSIS-8192-override: installing..." | |
Expand-Archive -Path $zipfile -DestinationPath "C:\Program Files (x86)\NSIS\" -Force | |
- name: Install realsense SDK | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..\3rdparty).FullName)" | |
$installer="$thirdpartydir\realsense-installer.exe" | |
(New-Object System.Net.WebClient).DownloadFile( | |
"https://github.com/IntelRealSense/librealsense/releases/download/v2.53.1/Intel.RealSense.SDK-WIN10-2.53.1.4623.exe",$installer); | |
Write-Output "intel-realsense: installing..." | |
Start-Process -FilePath $installer -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /NOCANCEL /SP-' -Wait | |
Add-Content $env:GITHUB_PATH "C:\Program Files (x86)\Intel RealSense SDK 2.0\bin\x64" | |
- name: Install opencv (Windows) | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..\3rdparty).FullName)" | |
$installer="$thirdpartydir\opencv-installer.exe" | |
(New-Object System.Net.WebClient).DownloadFile("https://github.com/opencv/opencv/releases/download/4.7.0/opencv-4.7.0-windows.exe","$installer"); | |
Start-Process "$installer" -ArgumentList '-o"C:\" -y' -Wait | |
Add-Content $env:GITHUB_PATH "C:/opencv/build/bin" | |
- name: Install libturbojpeg (Windows) | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..\3rdparty).FullName)" | |
$installer="$thirdpartydir\jpegturbo-installer.exe" | |
(New-Object System.Net.WebClient).DownloadFile("https://sourceforge.net/projects/libjpeg-turbo/files/2.1.5.1/libjpeg-turbo-2.1.5.1-vc64.exe","$installer"); | |
Start-Process "$installer" -ArgumentList "/S" -Wait | |
Add-Content $env:GITHUB_PATH "C:/libjpeg-turbo64/bin" | |
- name: Install K4A (Windows) | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..\3rdparty).FullName)" | |
$installer="$thirdpartydir\k4a-installer.exe" | |
(New-Object System.Net.WebClient).DownloadFile("https://download.microsoft.com/download/3/d/6/3d6d9e99-a251-4cf3-8c6a-8e108e960b4b/Azure%20Kinect%20SDK%201.4.1.exe","$installer"); | |
Start-Process "$installer" -ArgumentList "/S" -Wait | |
Add-Content $env:GITHUB_PATH "C:/Program Files/Azure Kinect SDK v1.4.1/sdk/windows-desktop/amd64/release/bin" | |
- name: Install K4ABT (Windows) | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..\3rdparty).FullName)" | |
$msifile="$thirdpartydir\k4abt-installer.msi" | |
(New-Object System.Net.WebClient).DownloadFile("https://download.microsoft.com/download/9/d/b/9dbe0fbe-c9c3-4228-a64c-1e0a08736ec1/Azure%20Kinect%20Body%20Tracking%20SDK%201.1.1.msi","$msifile"); | |
Start-Process "$msifile" -ArgumentList '/quiet /passive' -Wait | |
Add-Content $env:GITHUB_PATH "C:/Program Files/Azure Kinect Body Tracking SDK/tools" | |
- name: Install PCL (Windows) | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..\3rdparty).FullName)" | |
$installer="$thirdpartydir/pcl-installer.exe" | |
(New-Object System.Net.WebClient).DownloadFile("https://github.com/PointCloudLibrary/pcl/releases/download/pcl-1.13.0/PCL-1.13.0-AllInOne-msvc2022-win64.exe","$installer"); | |
& "$installer" /S | |
Start-Sleep -s 300 | |
Add-Content $env:GITHUB_PATH "C:/Program Files/PCL 1.13.0/bin" | |
Add-Content $env:GITHUB_PATH "C:/Program Files/PCL 1.13.0/3rdparty/VTK/bin" | |
Add-Content $env:GITHUB_PATH "C:/Program Files/OpenNI2/redist" | |
- name: Install OpenCV (Windows) | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..\3rdparty).FullName)" | |
$installer="$thirdpartydir\opencv-installer.exe" | |
(New-Object System.Net.WebClient).DownloadFile("https://github.com/opencv/opencv/releases/download/4.7.0/opencv-4.7.0-windows.exe",$installer); | |
Start-Process $installer -ArgumentList '-o"C:\" -y' -Wait | |
Add-Content $env:GITHUB_PATH "C:\opencv\build\bin" | |
Add-Content $env:GITHUB_PATH "C:\opencv\build\x64\vc16\bin" | |
- name: Install Python packages (Windows) | |
shell: bash | |
run: | | |
./scripts/install-3rdparty-win1064.sh | |
pythonExecutable=`which python` | |
pythonRoot=`python -c "import sys ; print(sys.prefix)"` | |
pythonExecutable=`cygpath --windows "$pythonExecutable"` | |
echo "Python_ROOT_DIR=$pythonRoot" >> $GITHUB_ENV | |
echo "Python3_EXECUTABLE=$pythonExecutable" >> $GITHUB_ENV | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
build-dir: ${{ github.workspace }}/build | |
configure-options: -Wno-dev -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/installed -DPython3_EXECUTABLE=${{ env.Python3_EXECUTABLE }} -DOpenCV_ROOT=${{ env.OPENCV_DIR }} | |
build-type: Release | |
run-test: true | |
install-build: true | |
- name: Create installer | |
shell: bash | |
run: | | |
cpack --config build/CPackSourceConfig.cmake | |
cpack --config build/CPackConfig.cmake | |
ls -l build/package | |
- name: upload CTest output in case of failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-ctest-output | |
path: build/Testing/Temporary/LastTest.log | |
- name: Capture build folder as artifact | |
if: ${{ failure() }} | |
shell: bash | |
run: tar cfz build.tgz build | |
- name: Upload build folder | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-build-folder | |
path: build.tgz | |
- name: Capture installed folder as artifact | |
shell: bash | |
run: | | |
7z a cwipc_win1064_${{ github.ref_name }}.zip installed/ | |
- name: Upload installed folder | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cwipc_win1064_${{ github.ref_name }}.zip | |
path: cwipc_win1064_${{ github.ref_name }}.zip | |
- name: Upload nsis installer | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-installer.exe | |
path: build/package/*.exe | |
- name: Check what was created and installed | |
if: always() | |
shell: bash | |
run: | | |
ls -l /c | |
ls -l /c/tools | |
ls -l "/c/Program Files" | |
ls -l "/c/Program Files (x86)" | |
ls -l | |
ls -l .. | |
build-macos: | |
name: build-macos | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
fetch-depth: 0 | |
- name: Get all tags | |
run: | | |
git show-ref --tags | |
git log -40 | |
git describe | |
- name: Install dependencies | |
shell: bash | |
run: ./scripts/install-3rdparty-osx1015.sh | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
build-dir: ${{ github.workspace }}/build | |
configure-options: -Wno-dev | |
run-test: true | |
install-build: true | |
install-options: --prefix ${{ github.workspace }}/installed | |
- name: Create installer | |
shell: bash | |
run: | | |
cpack --config build/CPackSourceConfig.cmake | |
cpack --config build/CPackConfig.cmake | |
ls -l build/package | |
- name: upload CTest output in case of failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macos-ctest-output | |
path: build/Testing/Temporary/LastTest.log | |
- name: Capture build folder as artifact | |
if: ${{ failure() }} | |
shell: bash | |
run: tar cfz build.tgz build | |
- name: Upload build folder | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macos-build-folder | |
path: build.tgz | |
- name: Capture installed folder as artifact | |
shell: bash | |
run: | | |
tar -c -v -f cwipc_osx1015_${{ github.ref_name }}.tgz -z -C installed . | |
ls -l | |
- name: Upload installed folder | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cwipc_osx1015_${{ github.ref_name }}.tgz | |
path: cwipc_osx1015_${{ github.ref_name }}.tgz | |
build-linux: | |
name: build-linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
fetch-depth: 0 | |
- name: Get all tags | |
run: | | |
git show-ref --tags | |
git log -40 | |
git describe --debug | |
git describe --tags --debug | |
- name: Install dependencies | |
shell: bash | |
run: ./scripts/install-3rdparty-ubuntu2204.sh | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
build-dir: ${{ github.workspace }}/build | |
configure-options: -Wno-dev | |
run-test: true | |
install-build: true | |
install-options: --prefix ${{ github.workspace }}/installed | |
- name: Create installer | |
shell: bash | |
run: | | |
cpack --config build/CPackSourceConfig.cmake | |
cpack --config build/CPackConfig.cmake | |
ls -l build/package | |
- name: upload CTest output in case of failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-ctest-output | |
path: build/Testing/Temporary/LastTest.log | |
- name: Capture build folder as artifact | |
if: ${{ failure() }} | |
shell: bash | |
run: tar cfz build.tgz build | |
- name: Upload build folder | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-build-folder | |
path: build.tgz | |
- name: Capture installed folder as artifact | |
shell: bash | |
run: | | |
tar -c -v -f cwipc_ubuntu2204_${{ github.ref_name }}.tgz -z -C installed . | |
ls -l | |
- name: Upload installed folder | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cwipc_ubuntu2204_${{ github.ref_name }}.tgz | |
path: cwipc_ubuntu2204_${{ github.ref_name }}.tgz | |
- name: Upload debian package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debian-package.deb | |
path: build/package/*.deb | |
- name: Upload cached git version | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cached-git-version | |
path: .cachedgitversion.txt | |
create-release: | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
name: create-release | |
runs-on: ubuntu-latest | |
needs: | |
- build-windows | |
- build-macos | |
- build-linux | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
fetch-depth: 0 | |
- name: Get all tags | |
run: | | |
git show-ref --tags | |
git log -40 | |
git describe | |
- name: Download cached git version | |
uses: actions/download-artifact@v3 | |
with: | |
name: cached-git-version | |
path: . | |
- name: Create Assets and full sourcecode assets | |
shell: bash | |
run: | | |
mkdir ../Assets | |
tar -c -f ../Assets/${{ github.ref_name }}-complete.tar.gz --exclude-vcs . | |
zip -x '*.git*' -r ../Assets/${{ github.ref_name }}-complete.zip . | |
awk '/^## /{if(flag){exit}; flag=1} flag' CHANGELOG.md > ../Assets/changes.md | |
- name: Download Windows installed folder | |
uses: actions/download-artifact@v3 | |
with: | |
name: cwipc_win1064_${{ github.ref_name }}.zip | |
path: ../Assets/ | |
- name: Download MacOS installed folder | |
uses: actions/download-artifact@v3 | |
with: | |
name: cwipc_osx1015_${{ github.ref_name }}.tgz | |
path: ../Assets/ | |
- name: Download Linux installed folder | |
uses: actions/download-artifact@v3 | |
with: | |
name: cwipc_ubuntu2204_${{ github.ref_name }}.tgz | |
path: ../Assets/ | |
- name: Download debian package | |
uses: actions/download-artifact@v3 | |
with: | |
name: debian-package.deb | |
path: ../Assets/ | |
- name: Download Windows installer | |
uses: actions/download-artifact@v3 | |
with: | |
name: windows-installer.exe | |
path: ../Assets/ | |
- name: Find Artefact names | |
run: | | |
windows_exe_path=$(ls ../Assets/*.exe | head -n 1) | |
linux_deb_path=$(ls ../Assets/*.deb | head -n 1) | |
echo "windows_exe_path=${windows_exe_path}" >> $GITHUB_ENV | |
echo "linux_deb_path=${linux_deb_path}" >> $GITHUB_ENV | |
- name: Check what is there | |
shell: bash | |
run: ls -l . ../Assets | |
- name: Create Release | |
uses: actions/create-release@v1 | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
draft: false | |
prerelease: true | |
release_name: ${{ github.ref }} | |
tag_name: ${{ github.ref }} | |
body_path: ../Assets/changes.md | |
- name: Upload Windows installer | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ env.windows_exe_path }} | |
asset_name: cwipc-win1064-${{ github.ref_name }}.exe | |
asset_content_type: application/gzip | |
- name: Upload Debian package | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ env.linux_deb_path }} | |
asset_name: cwipc-ubuntu2204-${{ github.ref_name }}.deb | |
asset_content_type: application/gzip | |
- name: Upload complete source (gzipped tar) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ../Assets/${{ github.ref_name }}-complete.tar.gz | |
asset_name: cwipc-${{ github.ref_name }}-source-including-submodules.tar.gz | |
asset_content_type: application/zip | |
- name: Upload complete source (zip) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ../Assets/${{ github.ref_name }}-complete.zip | |
asset_name: cwipc-${{ github.ref_name }}-source-including-submodules.zip | |
asset_content_type: application/zip | |
- name: Upload Windows installed folder | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ../Assets/cwipc_win1064_${{ github.ref_name }}.zip | |
asset_name: cwipc-win10-${{ github.ref_name }}-built.zip | |
asset_content_type: application/zip | |
- name: Upload MacOS installed folder | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ../Assets/cwipc_osx1015_${{ github.ref_name }}.tgz | |
asset_name: cwipc-macos1014-intel-${{ github.ref_name }}-built.tgz | |
asset_content_type: application/gzip | |
- name: Upload Linux installed folder | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ../Assets/cwipc_ubuntu2204_${{ github.ref_name }}.tgz | |
asset_name: cwipc-ubuntu2204-${{ github.ref_name }}-built.tgz | |
asset_content_type: application/gzip |