Free Motion Capture for Everyone πβ¨
TypeScript
swap old github workflows with copy-over from skcam
jonmatthis995fc63f183f
diff --git a/.github/workflows/build-installers-pyinstaller.yml b/.github/workflows/build-installers-pyinstaller.ymlnew file mode 100644index 00000000..98fed2e0--- /dev/null+++ b/.github/workflows/build-installers-pyinstaller.yml@@ -0,0 +1,528 @@+name: Build installers (Pyinstaller + Electron)++on:+ push:+ branches:+ - development+ tags:+ - 'v*'+ workflow_dispatch:++env:+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true++jobs:+ # βββββββββββββββββββββββββββββββββββββββββββββββββββββββ+ # BUILD β runs on all 5 platform/arch combos+ # βββββββββββββββββββββββββββββββββββββββββββββββββββββββ+ build:+ runs-on: ${{ matrix.os }}+ strategy:+ fail-fast: false+ matrix:+ include:+ - os: windows-latest+ platform: windows+ arch: x64+ label: windows-x64+ server-binary: freemocap_server.exe+ electron-arch: x64++ - os: macos-15-intel+ platform: macos+ arch: x64+ label: macos-x64-intel+ server-binary: freemocap_server+ electron-arch: x64++ - os: macos-latest+ platform: macos+ arch: arm64+ label: macos-arm64-apple-silicon+ server-binary: freemocap_server+ electron-arch: arm64++ - os: ubuntu-22.04+ platform: linux+ arch: x64+ label: linux-x64+ server-binary: freemocap_server+ electron-arch: x64++ - os: ubuntu-22.04-arm+ platform: linux+ arch: arm64+ label: linux-arm64+ server-binary: freemocap_server+ electron-arch: arm64++ steps:+ - name: Checkout code+ uses: actions/checkout@v6++ # ββ Windows code-signing prereqs ββ+ - name: Validate code signing prerequisites+ if: matrix.platform == 'windows'+ run: |+ $missingSecrets = @()++ if (-not "${{ secrets.AZURE_TENANT_ID }}") { $missingSecrets += "AZURE_TENANT_ID" }+ if (-not "${{ secrets.AZURE_CLIENT_ID }}") { $missingSecrets += "AZURE_CLIENT_ID" }+ if (-not "${{ secrets.AZURE_CLIENT_SECRET }}") { $missingSecrets += "AZURE_CLIENT_SECRET" }+ if (-not "${{ secrets.TRUSTED_SIGNING_ACCOUNT_NAME }}") { $missingSecrets += "TRUSTED_SIGNING_ACCOUNT_NAME" }+ if (-not "${{ secrets.CERTIFICATE_PROFILE_NAME }}") { $missingSecrets += "CERTIFICATE_PROFILE_NAME" }++ if ($missingSecrets.Count -gt 0) {+ Write-Error "Missing required secrets for code signing: $($missingSecrets -join ', ')"+ exit 1+ }++ Write-Output "All required code signing secrets are available"+ shell: pwsh++ # ββ macOS code-signing prereqs ββ+ - name: Validate macOS code signing prerequisites+ if: matrix.platform == 'macos'+ shell: bash+ run: |+ MISSING=()+ [ -z "${{ secrets.MAC_CERTIFICATE_P12 }}" ] && MISSING+=("MAC_CERTIFICATE_P12")+ [ -z "${{ secrets.MAC_CERTIFICATE_PASSWORD }}" ] && MISSING+=("MAC_CERTIFICATE_PASSWORD")+ [ -z "${{ secrets.APPLE_ID }}" ] && MISSING+=("APPLE_ID")+ [ -z "${{ secrets.APPLE_ID_PASSWORD }}" ] && MISSING+=("APPLE_ID_PASSWORD")+ [ -z "${{ secrets.APPLE_TEAM_ID }}" ] && MISSING+=("APPLE_TEAM_ID")+ if [ ${#MISSING[@]} -gt 0 ]; then+ echo "::error::Missing required secrets for macOS code signing: ${MISSING[*]}"+ exit 1+ fi+ echo "All required macOS code signing secrets are available"++ # ββ macOS certificate installation ββ+ - name: Install macOS signing certificate+ if: matrix.platform == 'macos'+ shell: bash+ env:+ MAC_CERTIFICATE_P12: ${{ secrets.MAC_CERTIFICATE_P12 }}+ MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}+ run: |+ KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain-db"+ KEYCHAIN_PASSWORD="$(openssl rand -base64 32)"++ # Create and configure a temporary keychain+ security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"+ security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"+ security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"++ # Import the .p12 certificate+ CERT_PATH="$RUNNER_TEMP/certificate.p12"+ echo "$MAC_CERTIFICATE_P12" | base64 --decode > "$CERT_PATH"+ security import "$CERT_PATH" \+ -k "$KEYCHAIN_PATH" \+ -P "$MAC_CERTIFICATE_PASSWORD" \+ -T /usr/bin/codesign \+ -T /usr/bin/security+ rm -f "$CERT_PATH"++ # Allow codesign to access the keychain without UI prompt+ security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"++ # Add the temporary keychain to the search list (prepend it)+ security list-keychains -d user -s "$KEYCHAIN_PATH" $(security list-keychains -d user | tr -d '"')++ # Verify the identity is available+ security find-identity -v -p codesigning "$KEYCHAIN_PATH"+ echo "macOS signing certificate installed successfully"++ # ββ Linux system dependencies ββ+ - name: Install Linux system dependencies+ if: matrix.platform == 'linux'+ run: |+ sudo apt-get update+ sudo apt-get install -y \+ libgl1-mesa-glx \+ libglib2.0-0 \+ libsm6 \+ libxext6 \+ libxrender1 \+ libv4l-dev \+ libfuse2 \+ upx-ucl++ # ββ macOS UPX for binary compression ββ+ - name: Install UPX (macOS)+ if: matrix.platform == 'macos'+ run: brew install upx++ # ββ Common setup ββ+ - name: Setup Node.js+ uses: actions/setup-node@v6+ with:+ node-version: '22'++ - name: Set up Python+ uses: actions/setup-python@v6+ with:+ python-version-file: ".python-version"++ - name: Install uv and enable cache+ uses: astral-sh/setup-uv@v7+ with:+ enable-cache: false++ - name: Create venv+ run: uv venv++ - name: Install the project dependencies+ run: uv sync++ - name: Verify installation 1/3+ run: uv pip show freemocap+ - name: Verify installation 2/3+ run: uv pip show pyinstaller+ - name: Verify installation 3/3+ run: uv pip show opencv-contrib-python++ # ββ Write build metadata and secrets into the Python package ββ+ - name: Write build info+ shell: bash+ run: |+ SHA_SHORT=$(echo "${{ github.sha }}" | cut -c1-8)+ TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)++ cat > freemocap/build_info.py << EOF+ """Build metadata and secrets populated by CI."""+ BUILD_GIT_SHA: str = "${{ github.sha }}"+ BUILD_GIT_SHA_SHORT: str = "${SHA_SHORT}"+ BUILD_NUMBER: str = "${{ github.run_number }}"+ BUILD_TIMESTAMP: str = "${TIMESTAMP}"+ BUILD_TAG: str = "${{ github.ref_name }}"+ SKELLYPINGS_SERVER_URL: str = "https://skellypings-401698866387.northamerica-northeast1.run.app"+ SKELLYPINGS_SECRET: str = "${{ secrets.SKELLYPINGS_SECRET }}"+ EOF++ echo "--- build_info.py (secret redacted) ---"+ sed 's/SKELLYPINGS_SECRET:.*/SKELLYPINGS_SECRET: str = "***"/' freemocap/build_info.py++ # ββ PyInstaller build ββ+ - name: Build with PyInstaller+ run: |+ uv pip install pyinstaller+ uv run pyinstaller ./freemocap.spec --clean++ # ββ Move server binary into freemocap-ui/ ββ+ - name: Move server binary into freemocap-ui (Windows)+ if: matrix.platform == 'windows'+ run: |+ Move-Item -Path ".\dist\${{ matrix.server-binary }}" -Destination ".\freemocap-ui\${{ matrix.server-binary }}"++ - name: Move server binary into freemocap-ui (macOS/Linux)+ if: matrix.platform != 'windows'+ run: |+ mv "./dist/${{ matrix.server-binary }}" "./freemocap-ui/${{ matrix.server-binary }}"+ chmod +x "./freemocap-ui/${{ matrix.server-binary }}"++ # ββ Windows code signing (server binary) ββ+ - name: Sign freemocap_server.exe with Trusted Signing+ if: matrix.platform == 'windows'+ uses: azure/trusted-signing-action@v0+ with:+ azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}+ azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}+ endpoint: https://eus.codesigning.azure.net/+ trusted-signing-account-name: ${{ secrets.TRUSTED_SIGNING_ACCOUNT_NAME }}+ certificate-profile-name: ${{ secrets.CERTIFICATE_PROFILE_NAME }}+ files: ${{ github.workspace }}\freemocap-ui\freemocap_server.exe+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256+++ # ββ macOS code signing (server binary) ββ+ - name: Sign freemocap_server with codesign+ if: matrix.platform == 'macos'+ run: |+ codesign --force --options runtime --sign "Developer ID Application" \+ --timestamp \+ "./freemocap-ui/${{ matrix.server-binary }}"+ codesign --verify --verbose "./freemocap-ui/${{ matrix.server-binary }}"+ echo "Server binary signed and verified successfully"+ # ββ Upload server-only artifact ββ+ - name: Upload server binary artifact+ uses: actions/upload-artifact@v7+ with:+ name: server-${{ matrix.label }}+ path: |+ freemocap-ui/${{ matrix.server-binary }}+ include-hidden-files: true++ # ββ Electron build ββ+ - name: Install UI dependencies+ run: |+ cd freemocap-ui+ npm install++ - name: Build UI (Windows)+ if: matrix.platform == 'windows'+ run: |+ cd freemocap-ui+ npm run build -- --publish never++ - name: Build UI (macOS)+ if: matrix.platform == 'macos'+ env:+ CSC_IDENTITY_AUTO_DISCOVERY: "true"+ APPLE_ID: ${{ secrets.APPLE_ID }}+ APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}+ run: |+ cd freemocap-ui+ for attempt in 1 2 3; do+ echo "=== Build + notarize attempt $attempt of 3 ==="+ npm run build -- --${{ matrix.electron-arch }} --publish never && break+ if [ "$attempt" -eq 3 ]; then+ echo "All 3 attempts failed"+ exit 1+ fi+ echo "Build/notarize failed on attempt $attempt. Retrying in 30s..."+ sleep 30+ done++ - name: Build UI (Linux)+ if: matrix.platform == 'linux'+ run: |+ cd freemocap-ui+ npm run build -- --${{ matrix.electron-arch }} --publish never++ # ββ Windows installer signing ββ+ - name: Sign Electron installer with Trusted Signing+ if: matrix.platform == 'windows'+ uses: azure/trusted-signing-action@v0+ with:+ azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}+ azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}+ endpoint: https://eus.codesigning.azure.net/+ trusted-signing-account-name: ${{ secrets.TRUSTED_SIGNING_ACCOUNT_NAME }}+ certificate-profile-name: ${{ secrets.CERTIFICATE_PROFILE_NAME }}+ files-folder: ${{ github.workspace }}\freemocap-ui\release+ files-folder-filter: "*.exe"+ files-folder-recurse: true+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ # ββ Upload final installer artifacts (uses label for human-readable names) ββ+ - name: Upload installer artifacts (Windows)+ if: matrix.platform == 'windows'+ uses: actions/upload-artifact@v7+ with:+ name: installer-${{ matrix.label }}+ path: |+ freemocap-ui/release/*/*.exe+ include-hidden-files: true++ - name: Upload installer artifacts (macOS)+ if: matrix.platform == 'macos'+ uses: actions/upload-artifact@v7+ with:+ name: installer-${{ matrix.label }}+ path: |+ freemocap-ui/release/*/*.dmg+ freemocap-ui/release/*/*.zip+ include-hidden-files: true++ - name: Upload installer artifacts (Linux)+ if: matrix.platform == 'linux'+ uses: actions/upload-artifact@v7+ with:+ name: installer-${{ matrix.label }}+ path: |+ freemocap-ui/release/*/*.AppImage+ freemocap-ui/release/*/*.deb+ include-hidden-files: true++ # ββ Upload auto-update metadata (latest*.yml) ββ+ - name: Upload auto-update metadata (Windows)+ if: matrix.platform == 'windows'+ uses: actions/upload-artifact@v7+ with:+ name: update-metadata-${{ matrix.label }}+ path: |+ freemocap-ui/release/**/latest.yml+ include-hidden-files: true++ - name: Upload auto-update metadata (macOS)+ if: matrix.platform == 'macos' && matrix.arch == 'x64'+ uses: actions/upload-artifact@v7+ with:+ name: update-metadata-${{ matrix.label }}+ path: |+ freemocap-ui/release/**/latest-mac.yml+ include-hidden-files: true++ - name: Upload auto-update metadata (macOS ARM)+ if: matrix.platform == 'macos' && matrix.arch == 'arm64'+ uses: actions/upload-artifact@v7+ with:+ name: update-metadata-${{ matrix.label }}+ path: |+ freemocap-ui/release/**/latest-mac.yml+ include-hidden-files: true++ - name: Upload auto-update metadata (Linux)+ if: matrix.platform == 'linux' && matrix.arch == 'x64'+ uses: actions/upload-artifact@v7+ with:+ name: update-metadata-${{ matrix.label }}+ path: |+ freemocap-ui/release/**/latest-linux.yml+ include-hidden-files: true+++ # ββ macOS keychain cleanup ββ+ - name: Clean up macOS keychain+ if: matrix.platform == 'macos' && always()+ shell: bash+ run: |+ KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain-db"+ if [ -f "$KEYCHAIN_PATH" ]; then+ security delete-keychain "$KEYCHAIN_PATH"+ fi+ # βββββββββββββββββββββββββββββββββββββββββββββββββββββββ+ # RELEASE β only runs on tag pushes (e.g. v2.0.0)+ #+ # Downloads all build artifacts and renames them with+ # human-readable platform/arch labels for the GitHub+ # Release page.+ # βββββββββββββββββββββββββββββββββββββββββββββββββββββββ+ release:+ needs: build+ if: startsWith(github.ref, 'refs/tags/v')+ runs-on: ubuntu-latest+ permissions:+ contents: write+ steps:+ - name: Download all artifacts+ uses: actions/download-artifact@v8+ with:+ path: artifacts++ - name: List downloaded artifacts+ run: find artifacts -type f | sort++ - name: Prepare release assets+ run: |+ mkdir -p release-assets++ # Extract version from tag (e.g. refs/tags/v2.0.0 β 2.0.0)+ VERSION="${GITHUB_REF#refs/tags/v}"+ echo "VERSION=$VERSION"++ # ββ Server binaries ββ+ # Artifact directories are named server-<label>, e.g.:+ # server-windows-x64, server-macos-x64-intel,+ # server-macos-arm64-apple-silicon, server-linux-x64, server-linux-arm64+ # Strip the "server-" prefix to get the human-readable suffix.+ for dir in artifacts/server-*; do+ label=$(basename "$dir" | sed 's/^server-//')++ if [ -f "$dir/freemocap_server.exe" ]; then+ cp "$dir/freemocap_server.exe" "release-assets/freemocap_server_${VERSION}_${label}.exe"+ elif [ -f "$dir/freemocap_server" ]; then+ cp "$dir/freemocap_server" "release-assets/freemocap_server_${VERSION}_${label}"+ else+ echo "::error::No server binary found in $dir"+ exit 1+ fi+ done++ # ββ App installers ββ+ # Artifact directories are named installer-<label>, e.g.:+ # installer-windows-x64, installer-macos-x64-intel, etc.+ # Electron-builder names only contain the arch (x64/arm64),+ # so we rename each file to: freemocap_<VERSION>_<label>.<ext>+ for dir in artifacts/installer-*; do+ label=$(basename "$dir" | sed 's/^installer-//')++ find "$dir" -type f \( \+ -name '*.exe' -o \+ -name '*.dmg' -o \+ -name '*.zip' -o \+ -name '*.AppImage' -o \+ -name '*.deb' \+ \) | while read -r file; do+ ext="${file##*.}"+ cp "$file" "release-assets/freemocap_${VERSION}_${label}.${ext}"+ done+ done++ echo "=== Release assets ==="+ ls -lh release-assets/++ - name: Prepare auto-update metadata+ run: |+ VERSION="${GITHUB_REF#refs/tags/v}"++ # Copy latest.yml files from update-metadata artifacts and patch+ # the file references to match the renamed release asset names.++ # Windows: latest.yml+ if [ -d "artifacts/update-metadata-windows-x64" ]; then+ YML=$(find artifacts/update-metadata-windows-x64 -name 'latest.yml' | head -1)+ if [ -n "$YML" ]; then+ # Replace the original artifact filename with the renamed one+ sed -i "s|freemocap_.*_installer\.exe|freemocap_${VERSION}_windows-x64.exe|g" "$YML"+ cp "$YML" "release-assets/latest.yml"+ echo "Copied latest.yml for Windows"+ fi+ fi++ # macOS: latest-mac.yml (combine x64 and arm64 entries)+ # electron-updater picks the right arch from a single latest-mac.yml+ MAC_YML=""+ for dir in artifacts/update-metadata-macos-*; do+ found=$(find "$dir" -name 'latest-mac.yml' 2>/dev/null | head -1)+ if [ -n "$found" ] && [ -z "$MAC_YML" ]; then+ MAC_YML="$found"+ fi+ done+ if [ -n "$MAC_YML" ]; then+ # Patch filenames to match renamed assets+ sed -i "s|freemocap_.*_installer\.zip|freemocap_${VERSION}_macos-x64-intel.zip|g" "$MAC_YML"+ cp "$MAC_YML" "release-assets/latest-mac.yml"+ echo "Copied latest-mac.yml for macOS"+ fi++ # Linux: latest-linux.yml+ if [ -d "artifacts/update-metadata-linux-x64" ]; then+ YML=$(find artifacts/update-metadata-linux-x64 -name 'latest-linux.yml' | head -1)+ if [ -n "$YML" ]; then+ sed -i "s|freemocap_.*\.AppImage|freemocap_${VERSION}_linux-x64.AppImage|g" "$YML"+ cp "$YML" "release-assets/latest-linux.yml"+ echo "Copied latest-linux.yml for Linux"+ fi+ fi++ echo "=== Final release assets ==="+ ls -lh release-assets/++ - name: Create or update GitHub Release+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ run: |+ TAG="${GITHUB_REF#refs/tags/}"++ if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" &>/dev/null; then+ echo "Release $TAG already exists β uploading new assets only"+ gh release upload "$TAG" release-assets/* \+ --repo "$GITHUB_REPOSITORY" \+ --clobber+ else+ echo "Creating new draft release for $TAG"+ gh release create "$TAG" release-assets/* \+ --repo "$GITHUB_REPOSITORY" \+ --draft \+ --generate-notes \+ --title "$TAG"+ fidiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymldeleted file mode 100644index 2d37eeb1..00000000--- a/.github/workflows/ci.yml+++ /dev/null@@ -1,16 +0,0 @@-#originally copied from https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions-name: ci-on:- push:- branches:- - icis_conference_main-jobs:- deploy:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v2- - uses: actions/setup-python@v2- with:- python-version: 3.x- - run: pip install mkdocs-material- - run: mkdocs gh-deploy --forcediff --git a/.github/workflows/coverage-testing.yml b/.github/workflows/coverage-testing.ymldeleted file mode 100644index 05e3c3d3..00000000--- a/.github/workflows/coverage-testing.yml+++ /dev/null@@ -1,31 +0,0 @@-name: Coverage with Nox--on:- workflow_dispatch:- pull_request:- branches: [ main, development ]- paths:- - 'freemocap/**'--jobs:- build:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v4- - name: Free up disk space- uses: jlumbroso/free-disk-space@main- with:- large-packages: false- docker-images: false- swap-storage: false- - name: Set up Python 3.x- uses: wntrblm/[email protected]- with:- python-versions: "3.12"- - name: Install libegl1- run: |- sudo apt-get update- sudo apt-get install libegl1-mesa- - name: Run noxfile- run: |- nox --session coveragediff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.ymlnew file mode 100644index 00000000..dca6c4b0--- /dev/null+++ b/.github/workflows/deploy-docs.yml@@ -0,0 +1,53 @@+name: Deploy docs site++on:+ push:+ branches: [development]+ paths:+ - 'freemocap-docs/**'+ - '.github/workflows/deploy-docs.yml'+ workflow_dispatch:++permissions:+ contents: read+ pages: write+ id-token: write++concurrency:+ group: pages+ cancel-in-progress: true++jobs:+ build:+ runs-on: ubuntu-latest+ defaults:+ run:+ working-directory: freemocap-docs+ steps:+ - uses: actions/checkout@v6++ - uses: actions/setup-node@v6+ with:+ node-version: 22+ cache: npm+ cache-dependency-path: freemocap-docs/package-lock.json++ - run: npm ci++ - run: npm run build+ env:+ NODE_OPTIONS: '--max-old-space-size=4096'++ - uses: actions/upload-pages-artifact@v3+ with:+ path: freemocap-docs/build++ deploy:+ needs: build+ runs-on: ubuntu-latest+ environment:+ name: github-pages+ url: ${{ steps.deployment.outputs.page_url }}+ steps:+ - id: deployment+ uses: actions/deploy-pages@v4diff --git a/.github/workflows/flit_publish_to_pypi.yml b/.github/workflows/flit_publish_to_pypi.ymldeleted file mode 100644index 9e41b53e..00000000--- a/.github/workflows/flit_publish_to_pypi.yml+++ /dev/null@@ -1,39 +0,0 @@-# This workflow will upload a Python Package using Twine when a release is created-# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries--# This workflow uses actions that are not certified by GitHub.-# They are provided by a third-party and are governed by-# separate terms of service, privacy policy, and support-# documentation.--name: Upload Python Package--on:- push:- tags: [ v* ]--permissions:- contents: read--jobs:- deploy:- runs-on: ubuntu-latest- environment: release-- steps:- - uses: actions/checkout@v3- - name: Set up Python- uses: actions/setup-python@v3- with:- python-version: '3.x'- - name: Install dependencies- run: |- python -m pip install --upgrade pip- pip install flit- - name: Build package- run: python -m flit build- - name: Publish package to pypi- uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29- with:- user: __token__- password: ${{ secrets.PYPI_TOKEN }}\ No newline at end of filediff --git a/.github/workflows/linting-flake8.yml b/.github/workflows/linting-flake8.ymldeleted file mode 100755index 45ec3749..00000000--- a/.github/workflows/linting-flake8.yml+++ /dev/null@@ -1,20 +0,0 @@-name: Linting Flake8--on:- pull_request:- branches: [ main, development ]- paths:- - 'freemocap/**'--jobs:- build:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v4- - name: Set up Python 3.x- uses: wntrblm/[email protected]- with:- python-versions: "3.12"- - name: Run noxfile- run: |- nox --session lintdiff --git a/.github/workflows/linux_installer.yml b/.github/workflows/linux_installer.ymldeleted file mode 100644index 320edf7c..00000000--- a/.github/workflows/linux_installer.yml+++ /dev/null@@ -1,61 +0,0 @@-name: Create Linux Installer--on:- workflow_dispatch:- push:- tags: [ v* ]--jobs:- build:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v4- - name: System Info- run: |- uname -a || true- lsb_release -a || true- gcc --version || true- env- - name: Set up Python 3.x- uses: actions/setup-python@v4- with:- # Semantic version range syntax or exact version of a Python version- python-version: '3.11'- # Optional - x64 or x86 architecture, defaults to x64- architecture: 'x64'- cache: 'pip'- - name: Install dependencies- run: |- python -m pip install --upgrade pip- pip install -e .- - name: Freeze dependencies to requirements.txt- run: |- pip freeze > ${{ github.workspace }}/requirements.txt- - name: Remove opencv-python dependency- run: |- sed '/opencv-python/d' requirements.txt > tmp && mv tmp requirements.txt- - name: Download PyApp- run: |- curl -L -o pyapp.zip "https://github.com/ofek/pyapp/releases/download/v0.22.0/source.zip"- - name: Unzip PyApp- run: |- unzip pyapp.zip- - name: Create Linux Installer- run: |- cd ${{ github.workspace }}/pyapp-v0.22.0- export PYAPP_PROJECT_NAME=freemocap- export PYAPP_PROJECT_VERSION=v1.4.7- export PYAPP_PYTHON_VERSION=3.11- export PYAPP_PROJECT_DEPENDENCY_FILE=${{ github.workspace }}/requirements.txt- export PYAPP_EXEC_SCRIPT=${{ github.workspace }}/freemocap/__main__.py- export PYAPP_PIP_EXTRA_ARGS=--no-deps- export PYAPP_EXPOSE_ALL_COMMANDS=true- cargo build --release- cargo install pyapp --force --root ${{ github.workspace }}- cd ${{ github.workspace }}- mv ${{ github.workspace }}/bin/pyapp freemocap_app && chmod +x freemocap_app- tar -czvf freemocap_app.tar.gz freemocap_app- - uses: actions/upload-artifact@v4- with:- name: freemocap_linux_app- path: freemocap_app.tar.gzdiff --git a/.github/workflows/mac_installer.yml b/.github/workflows/mac_installer.ymldeleted file mode 100644index 56822c6a..00000000--- a/.github/workflows/mac_installer.yml+++ /dev/null@@ -1,68 +0,0 @@-name: Create Mac Installer--on:- workflow_dispatch:- push:- tags: [ v* ]--jobs:- build:- runs-on: macos-12- steps:- - uses: actions/checkout@v4- - name: System Info- run: |- uname -a || true- gcc --version || true- env- - name: Set up Python 3.x- uses: actions/setup-python@v4- with:- # Semantic version range syntax or exact version of a Python version- python-version: '3.11'- # Optional - x64 or x86 architecture, defaults to x64- architecture: 'x64'- cache: 'pip'- - name: Install dependencies- run: |- python -m pip install --upgrade pip- pip install -e .- - name: Freeze dependencies to requirements.txt- run: |- pip freeze > ${{ github.workspace }}/requirements.txt- - name: Remove opencv-python dependency- run: |- sed '/opencv-python/d' requirements.txt > tmp && mv tmp requirements.txt- - name: Download PyApp- run: |- curl -L -o pyapp.zip "https://github.com/ofek/pyapp/releases/download/v0.22.0/source.zip"- - name: Unzip PyApp- run: |- unzip pyapp.zip- - name: Create Mac Installer- run: |- cd ${{ github.workspace }}/pyapp-v0.22.0- export PYAPP_PROJECT_NAME=freemocap- export PYAPP_PROJECT_VERSION=v1.4.7- export PYAPP_PYTHON_VERSION=3.11- export PYAPP_PROJECT_DEPENDENCY_FILE=${{ github.workspace }}/requirements.txt- export PYAPP_EXEC_SCRIPT=${{ github.workspace }}/freemocap/__main__.py- export PYAPP_PIP_EXTRA_ARGS=--no-deps- export PYAPP_EXPOSE_ALL_COMMANDS=true- cargo build --release- cargo install pyapp --force --root ${{ github.workspace }}- cd ${{ github.workspace }}- mv ${{ github.workspace }}/bin/pyapp freemocap_app- - name: Bundle Mac App- run: |- mkdir -p ${{ github.workspace }}/freemocap.app/Contents/MacOS- mkdir -p ${{ github.workspace }}/freemocap.app/Contents/Resources- mkdir -p ${{ github.workspace }}/freemocap.app/Contents/Frameworks- chmod +x freemocap_app && cp freemocap_app ${{ github.workspace }}/freemocap.app/Contents/MacOS- cp ${{ github.workspace }}/freemocap/assets/mac_app_files/freemocap.icns ${{ github.workspace }}/freemocap.app/Contents/Resources- cp ${{ github.workspace }}/freemocap/assets/mac_app_files/Info.plist ${{ github.workspace }}/freemocap.app/Contents- tar -czvf freemocap.tar.gz freemocap.app- - uses: actions/upload-artifact@v4- with:- name: freemocap_mac_app- path: freemocap.tar.gz\ No newline at end of filediff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.ymldeleted file mode 100644index d21101b8..00000000--- a/.github/workflows/publish_to_pypi.yml+++ /dev/null@@ -1,49 +0,0 @@-name: Upload Python Package--on:- push:- branches:- - missingno--jobs:- pypi-publish:- name: upload release to PyPI- runs-on: ubuntu-latest- environment: release- permissions:- # IMPORTANT: this permission is mandatory for trusted publishing - https://docs.pypi.org/trusted-publishers/using-a-publisher/- id-token: write- steps:- - uses: actions/checkout@v3- - name: Set up Python- uses: actions/setup-python@v3- with:- python-version: '3.11'-- - name: Install LLVM- run: sudo apt-get update && sudo apt-get install -y llvm--- - name: Install Poetry- run: |- curl -sSL https://install.python-poetry.org | python3 --- - name: Cache Poetry dependencies- uses: actions/cache@v2- with:- path: ~/.cache/pypoetry- key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}- restore-keys: |- ${{ runner.os }}-poetry--- - name: Update dependencies- run: poetry update-- - name: Install dependencies- run: poetry install-- - name: Build package- run: poetry build-- - name: Publish package to pypi- uses: pypa/gh-action-pypi-publish@release/v1diff --git a/.github/workflows/python-testing.yml b/.github/workflows/python-testing.ymldeleted file mode 100755index a3c4cb0a..00000000--- a/.github/workflows/python-testing.yml+++ /dev/null@@ -1,43 +0,0 @@-name: Freemocap Tests--on:- pull_request:- branches: [ main, development ]- paths:- - 'freemocap/**'--jobs:- build:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v3- - name: System Info- run: |- uname -a || true- lsb_release -a || true- gcc --version || true- env- - name: Set up Python 3.x- uses: actions/setup-python@v4- with:- # Semantic version range syntax or exact version of a Python version- python-version: '3.9'- # Optional - x64 or x86 architecture, defaults to x64- architecture: 'x64'- cache: 'pip'- - name: Install dependencies- run: |- python -m pip install --upgrade pip- pip install -e .- - name: Fix OpenCV conflict- run: |- pip uninstall -y opencv-python opencv-contrib-python- pip install opencv-contrib-python==4.8.1.78- - name: Install libegl1- run: |- sudo apt-get update- sudo apt-get install -y libegl1-mesa- - name: Run Tests with Pytest- run: |- pip install pytest- pytest freemocap/testsdiff --git a/.github/workflows/test.yml b/.github/workflows/test.ymlnew file mode 100644index 00000000..ec9f7f1f--- /dev/null+++ b/.github/workflows/test.yml@@ -0,0 +1,77 @@+name: Tests++on:+ pull_request:+ branches: [main, development]++concurrency:+ group: tests-${{ github.ref }}+ cancel-in-progress: true++permissions:+ contents: read++jobs:+ backend-tests:+ name: Backend Tests (Python ${{ matrix.python-version }}, ${{ matrix.os }})+ runs-on: ${{ matrix.os }}+ strategy:+ fail-fast: true+ matrix:+ os: [ubuntu-latest]+ python-version: ["3.11"]+ include:+ # Full matrix only on PRs to main+ - os: windows-latest+ python-version: "3.11"+ - os: macos-latest+ python-version: "3.11"+ - os: ubuntu-latest+ python-version: "3.10"+ - os: ubuntu-latest+ python-version: "3.12"++ steps:+ - uses: actions/checkout@v4++ - name: Install uv+ uses: astral-sh/setup-uv@v4+ with:+ version: "latest"+ enable-cache: true++ - name: Set up Python ${{ matrix.python-version }}+ run: uv python install ${{ matrix.python-version }}++ - name: Install dependencies+ run: uv sync --group dev++ - name: Run linter (ruff)+ run: uv run ruff check skellycam/++ - name: Run tests+ run: uv run pytest skellycam/tests/ -v --tb=short++ frontend-typecheck:+ name: Frontend Typecheck+ runs-on: ubuntu-latest++ defaults:+ run:+ working-directory: skellycam-ui++ steps:+ - uses: actions/checkout@v4++ - name: Set up Node.js+ uses: actions/setup-node@v4+ with:+ node-version: 20+ cache: npm+ cache-dependency-path: skellycam-ui/package-lock.json++ - name: Install dependencies+ run: npm ci --ignore-scripts++ - name: Typecheck+ run: npx tsc --noEmitdiff --git a/.github/workflows/version-testing-1.yml b/.github/workflows/version-testing-1.ymldeleted file mode 100755index 808269f9..00000000--- a/.github/workflows/version-testing-1.yml+++ /dev/null@@ -1,31 +0,0 @@-name: Version Testing with Nox (3.9, 3.10)--on:- workflow_dispatch:- pull_request:- branches: [ main, development ]- paths:- - '../../old_pyproject.toml'--jobs:- build:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v3- - name: Free up disk space- uses: jlumbroso/free-disk-space@main- with:- large-packages: false- docker-images: false- swap-storage: false- - name: Set up Python 3.x- uses: wntrblm/[email protected]- with:- python-versions: "3.9, 3.10"- - name: Install libegl1- run: |- sudo apt-get update- sudo apt-get install libegl1-mesa- - name: Run noxfile- run: |- nox --session test_9_10diff --git a/.github/workflows/version-testing-2.yml b/.github/workflows/version-testing-2.ymldeleted file mode 100644index f7156a23..00000000--- a/.github/workflows/version-testing-2.yml+++ /dev/null@@ -1,31 +0,0 @@-name: Version Testing with Nox (3.11, 3.12)--on:- workflow_dispatch:- pull_request:- branches: [ main, development ]- paths:- - '../../old_pyproject.toml'--jobs:- build:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v3- - name: Free up disk space- uses: jlumbroso/free-disk-space@main- with:- large-packages: false- docker-images: false- swap-storage: false- - name: Set up Python 3.x- uses: wntrblm/[email protected]- with:- python-versions: "3.11, 3.12"- - name: Install libegl1- run: |- sudo apt-get update- sudo apt-get install libegl1-mesa- - name: Run noxfile- run: |- nox --session test_11_12\ No newline at end of filediff --git a/.github/workflows/windows_installer.yml b/.github/workflows/windows_installer.ymldeleted file mode 100644index 7c0915a8..00000000--- a/.github/workflows/windows_installer.yml+++ /dev/null@@ -1,74 +0,0 @@-name: Create Windows Installer--on:- workflow_dispatch:- push:- tags: [ v* ]- branches:- - jon/development--jobs:- build:- runs-on: windows-2019- steps:- - uses: actions/checkout@v4- - name: System Info- run: |- systeminfo || true- env- - name: Set up Python 3.x- uses: actions/setup-python@v4- with:- # Semantic version range syntax or exact version of a Python version- python-version: '3.11'- # Optional - x64 or x86 architecture, defaults to x64- architecture: 'x64'- cache: 'pip'- - name: Install dependencies- run: |- python -m pip install --upgrade pip- pip install -e .- - name: Freeze dependencies to requirements.txt- run: |- pip freeze > ${{ github.workspace }}/requirements.txt- - name: Remove opencv-python dependency- run: |- sed '/opencv-python/d' requirements.txt > tmp && mv tmp requirements.txt- shell: bash- - name: Download PyApp- run: |- curl -L -o pyapp.zip "https://github.com/ofek/pyapp/releases/download/v0.22.0/source.zip"- - name: Unzip PyApp- run: |- unzip pyapp.zip- shell: bash- - name: List Directory Contents- run: |- ls -la- shell: bash- - name: Create Windows Installer- run: |- WORKSPACE=$(cygpath -u "${{ github.workspace}}")- cd $WORKSPACE/pyapp-v0.22.0- export PYAPP_PROJECT_NAME=freemocap- export PYAPP_PROJECT_VERSION=v1.4.7- export PYAPP_PYTHON_VERSION=3.11- export PYAPP_PROJECT_DEPENDENCY_FILE=$WORKSPACE/requirements.txt- export PYAPP_EXEC_SCRIPT=$WORKSPACE/freemocap/__main__.py- export PYAPP_PIP_EXTRA_ARGS=--no-deps- export PYAPP_EXPOSE_ALL_COMMANDS=true- cargo build --release- cargo install pyapp --force --root $WORKSPACE- cd $WORKSPACE- mv $WORKSPACE/bin/pyapp freemocap_app.exe- shell: bash- - name: Install Rcedit with Chocolatey- run: choco install rcedit -y- shell: bash- - name: Set Executable Icon- run: |- rcedit "freemocap_app.exe" --set-icon "${{ github.workspace }}/freemocap/assets/logo/freemocap_skelly_logo.ico"- - uses: actions/upload-artifact@v4- with:- name: freemocap_windows_exe- path: freemocap_app.exe