cwipc_timing implemented. Closes #144. #782
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: Install correct Python version | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Pre-install (Windows) | |
shell: pwsh | |
run: | | |
$thirdpartydir="$((Get-Item ..).FullName)\3rdparty" | |
mkdir $thirdpartydir | |
- name: Export GitHub Actions cache environment variables for vcpkg | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- 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 thirdparty packages | |
shell: pwsh | |
run: scripts\install-3rdparty-full-win1064.ps1 | |
- name: Bootstrap vcpkg | |
shell: pwsh | |
run: vcpkg\bootstrap-vcpkg.bat | |
- name: Install vcpkg packages | |
shell: pwsh | |
run: vcpkg\vcpkg.exe install | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
- 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: Print Path | |
shell: pwsh | |
run: | | |
$env:path -split ";" | |
# Works around https://github.com/actions/runner-images/issues/10055 | |
- name: Remove conflicting libraries | |
shell: bash -l {0} | |
run: | | |
find "C:/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk" -name "msvcp140.dll" -exec rm {} \; | |
find "C:/Program Files/ImageMagick-7.1.1-Q16-HDRI" -name "msvcp140.dll" -exec rm {} \; | |
- name: Find where MSVC Redist comes from | |
if: always() | |
shell: bash | |
run: which msvcp140.dll | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
with: | |
build-dir: ${{ github.workspace }}/build | |
configure-options: --preset windows-production -Wno-dev | |
build-options: --preset windows-production | |
build-type: Release | |
run-test: true | |
install-build: true | |
ctest-options: -E cwipc_(codec|kinect)_python_tests | |
# - name: Remove preloading of wrong msvcp140 by matplotlib | |
# if: always() | |
# shell: bash | |
# run: | |
# find "build/venv" -name ".load-order-matplotlib*" -exec rm {} \; | |
# - name: Rerun failed tests verbosely | |
# if: failure() | |
# shell: bash | |
# run: | | |
# ctest --test-dir build -C Release --rerun-failed --output-on-failure | |
- name: Show Python and Python module versions used | |
if: always() | |
shell: bash | |
run: | | |
./build/venv/Scripts/python --version | |
./build/venv/Scripts/python -m pip freeze | |
- name: Create installer | |
shell: bash | |
run: | | |
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 | |
if: false | |
shell: bash | |
run: | | |
7z a cwipc_win1064_${{ github.ref_name }}.zip ../installed/ | |
- name: Upload installed folder | |
if: false | |
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 | |
env: | |
HOMEBREW_NO_VERIFY_ATTESTATIONS: "1" | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
build-dir: ${{ github.workspace }}/build | |
configure-options: --preset mac-production -Wno-dev | |
build-options: --preset mac-production | |
run-test: true | |
install-build: true | |
install-options: --prefix ${{ github.workspace }}/installed | |
- name: Show Python and Python module versions used | |
if: always() | |
shell: bash | |
run: | | |
./build/venv/bin/python --version | |
./build/venv/bin/python -m pip freeze | |
- name: Create installer | |
shell: bash | |
run: | | |
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-ubuntu2204: | |
name: build-ubuntu2204 | |
runs-on: ubuntu-22.04 | |
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: --preset linux-production -Wno-dev | |
build-options: --preset linux-production | |
run-test: true | |
install-build: true | |
install-options: --prefix ${{ github.workspace }}/installed | |
- name: Show Python and Python module versions used | |
if: always() | |
shell: bash | |
run: | | |
./build/venv/bin/python --version | |
./build/venv/bin/python -m pip freeze | |
- name: Create installer | |
shell: bash | |
run: | | |
cpack --config build/CPackConfig.cmake -D CPACK_DEBIAN_FILE_NAME="cwipc_${{ github.ref_name }}_ubuntu2204_amd64.deb" | |
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 -la | |
- 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-2204.deb | |
path: build/package/*.deb | |
- name: Upload cached git version | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cached-git-version | |
path: .cachedgitversion.txt | |
if-no-files-found: error | |
include-hidden-files: true | |
build-android: | |
name: build-android | |
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: Free some space | |
run: | | |
df -h | |
# Remove software and language runtimes we're not using | |
sudo rm -rf \ | |
"$AGENT_TOOLSDIRECTORY" \ | |
/opt/google/chrome \ | |
/opt/microsoft/msedge \ | |
/opt/microsoft/powershell \ | |
/opt/pipx \ | |
/usr/lib/mono \ | |
/usr/local/julia* \ | |
/usr/local/lib/android \ | |
/usr/local/lib/node_modules \ | |
/usr/local/share/chromium \ | |
/usr/local/share/powershell \ | |
/usr/share/dotnet \ | |
/usr/share/swift | |
df -h | |
- name: Install Android NDK | |
uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r27b | |
add-to-path: true | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
build-dir: ${{ github.workspace }}/build | |
configure-options: --preset android-production -Wno-dev | |
build-options: --preset android-production | |
run-test: false | |
install-build: false | |
install-options: --prefix ${{ github.workspace }}/installed | |
env: | |
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
- name: Create installer | |
shell: bash | |
run: | | |
cpack --config build/CPackConfig.cmake -D CPACK_PACKAGE_FILE_NAME="cwipc_${{ github.ref_name }}_android_arm64" | |
ls -l build/package | |
- 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: android-build-folder | |
path: build.tgz | |
- name: Upload installer package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: android-arm64-package | |
path: build/package/*.tar.gz | |
build-ubuntu2404: | |
name: build-ubuntu2404 | |
runs-on: ubuntu-24.04 | |
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-ubuntu2404.sh | |
- name: Build & Test | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
build-dir: ${{ github.workspace }}/build | |
configure-options: --preset linux-production -Wno-dev | |
build-options: --preset linux-production | |
run-test: true | |
install-build: true | |
install-options: --prefix ${{ github.workspace }}/installed | |
- name: Show Python and Python module versions used | |
if: always() | |
shell: bash | |
run: | | |
./build/venv/bin/python --version | |
./build/venv/bin/python -m pip freeze | |
- name: Create installer | |
shell: bash | |
run: | | |
cpack --config build/CPackConfig.cmake -D CPACK_DEBIAN_FILE_NAME="cwipc_${{ github.ref_name }}_ubuntu2404_amd64.deb" | |
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_ubuntu2404_${{ github.ref_name }}.tgz -z -C installed . | |
ls -la | |
- name: Upload installed folder | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cwipc_ubuntu2404_${{ github.ref_name }}.tgz | |
path: cwipc_ubuntu2404_${{ github.ref_name }}.tgz | |
- name: Upload debian package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debian-package-2404.deb | |
path: build/package/*.deb | |
- name: Upload cached git version | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cached-git-version | |
path: .cachedgitversion.txt | |
if-no-files-found: error | |
include-hidden-files: true | |
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-ubuntu2204 | |
- build-ubuntu2404 | |
- build-android | |
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 | |
if: false | |
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 Ubuntu 22.04 installed folder | |
uses: actions/download-artifact@v3 | |
with: | |
name: cwipc_ubuntu2204_${{ github.ref_name }}.tgz | |
path: ../Assets/ | |
- name: Download debian package for 22.04 | |
uses: actions/download-artifact@v3 | |
with: | |
name: debian-package-2204.deb | |
path: ../Assets/ | |
- name: Download Ubuntu 24.04 installed folder | |
uses: actions/download-artifact@v3 | |
with: | |
name: cwipc_ubuntu2404_${{ github.ref_name }}.tgz | |
path: ../Assets/ | |
- name: Download debian package for 24.04 | |
uses: actions/download-artifact@v3 | |
with: | |
name: debian-package-2404.deb | |
path: ../Assets/ | |
- name: Download Windows installer | |
uses: actions/download-artifact@v3 | |
with: | |
name: windows-installer.exe | |
path: ../Assets/ | |
- name: Download Android installer | |
uses: actions/download-artifact@v3 | |
with: | |
name: android-arm64-package | |
path: ../Assets/ | |
- name: Find Artefact names | |
run: | | |
windows_exe_path=$(ls ../Assets/*.exe | head -n 1) | |
ubuntu2204_deb_path=$(ls ../Assets/*2204*.deb | head -n 1) | |
ubuntu2404_deb_path=$(ls ../Assets/*2404*.deb | head -n 1) | |
echo "windows_exe_path=${windows_exe_path}" >> $GITHUB_ENV | |
echo "ubuntu2204_deb_path=${ubuntu2204_deb_path}" >> $GITHUB_ENV | |
echo "ubuntu2404_deb_path=${ubuntu2404_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 Ubuntu 22.04 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.ubuntu2204_deb_path }} | |
asset_name: cwipc-ubuntu2204-${{ github.ref_name }}.deb | |
asset_content_type: application/gzip | |
- name: Upload Ubuntu 24.04 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.ubuntu2404_deb_path }} | |
asset_name: cwipc-ubuntu2404-${{ 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 Android package | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ../Assets/cwipc_${{ github.ref_name }}_android_arm64.tar.gz | |
asset_name: cwipc_${{ github.ref_name }}_android_arm64.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 | |
if: false | |
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 Ubuntu 22.04 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 | |
- name: Upload Ubuntu 24.04 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_ubuntu2404_${{ github.ref_name }}.tgz | |
asset_name: cwipc-ubuntu2404-${{ github.ref_name }}-built.tgz | |
asset_content_type: application/gzip |