feat(engine): add shared animation mixer and glTF animation foundation #4773
This file contains hidden or 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: test | |
| # On every pull request, but only on push to master | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| browser_coverage: | |
| name: Browser coverage (${{ matrix.shard }}/3) | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2, 3] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Setup Node (with Corepack) | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Enable Corepack / Yarn 4 | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.13.0 --activate | |
| yarn -v | |
| - name: Restore Yarn Berry artifacts | |
| id: yarn-cache | |
| uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: | | |
| ~/.yarn/berry/cache | |
| .yarn/install-state.gz | |
| key: ${{ runner.os }}-yarn4-${{ hashFiles('yarn.lock', '.yarnrc.yml', 'package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn4- | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Save Yarn Berry artifacts before reclaiming disk space | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: | | |
| ~/.yarn/berry/cache | |
| .yarn/install-state.gz | |
| key: ${{ steps.yarn-cache.outputs.cache-primary-key }} | |
| - name: Cache Playwright Chromium | |
| id: playwright-cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-ms-playwright-${{ hashFiles('yarn.lock', 'package.json') }} | |
| - name: Install Playwright Chromium | |
| run: yarn playwright:install | |
| - name: Reclaim install cache and report disk usage | |
| run: | | |
| rm -rf "${HOME}/.yarn/berry/cache" | |
| df -h . | |
| du -sh . "${HOME}/.yarn" "${HOME}/.cache/ms-playwright" "${RUNNER_TEMP}" 2>/dev/null || true | |
| # Run the standalone WebGPU smoke before the coverage suite so its SwiftShader device starts | |
| # from a clean runner state instead of inheriting resource pressure from prior browser tests. | |
| - name: Install Spatial Atlas Playwright Chromium | |
| if: ${{ matrix.shard == 3 }} | |
| run: yarn workspace luma.gl-examples-showcase-billion-point-spatial-atlas exec playwright install chromium | |
| - name: Run Billion-Point Spatial Atlas visual smoke | |
| if: ${{ matrix.shard == 3 }} | |
| env: | |
| SPATIAL_ATLAS_SCREENSHOT: ${{ runner.temp }}/billion-point-spatial-atlas.png | |
| run: yarn workspace luma.gl-examples-showcase-billion-point-spatial-atlas test:visual | |
| - name: Upload Billion-Point Spatial Atlas visual smoke screenshot | |
| if: ${{ always() && matrix.shard == 3 }} | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: billion-point-spatial-atlas-visual-smoke | |
| path: ${{ runner.temp }}/billion-point-spatial-atlas*.png | |
| if-no-files-found: warn | |
| retention-days: 7 | |
| - name: Run headless tests and generate coverage | |
| run: | | |
| yarn test-coverage --shard=${{ matrix.shard }}/3 | |
| - name: Report disk usage after coverage | |
| if: always() | |
| run: | | |
| df -h . | |
| du -sh . coverage "${HOME}/.yarn" "${HOME}/.cache/ms-playwright" "${RUNNER_TEMP}" 2>/dev/null || true | |
| - name: Run node tests | |
| if: ${{ matrix.shard == 3 }} | |
| run: | | |
| yarn test-node | |
| - name: Sanitize lcov for Coveralls | |
| run: | | |
| node - <<'NODE' | |
| const fs = require('fs'); | |
| const coveragePath = 'coverage/lcov.info'; | |
| const lines = fs.readFileSync(coveragePath, 'utf8').split(/\r?\n/); | |
| const records = []; | |
| let currentRecord = []; | |
| for (const line of lines) { | |
| currentRecord.push(line); | |
| if (line === 'end_of_record') { | |
| const sourceFileLine = currentRecord.find(recordLine => recordLine.startsWith('SF:')); | |
| const sourceFile = sourceFileLine ? sourceFileLine.slice(3).trim() : ''; | |
| if (sourceFile) { | |
| records.push(currentRecord.join('\n')); | |
| } | |
| currentRecord = []; | |
| } | |
| } | |
| if (currentRecord.length) { | |
| const sourceFileLine = currentRecord.find(recordLine => recordLine.startsWith('SF:')); | |
| const sourceFile = sourceFileLine ? sourceFileLine.slice(3).trim() : ''; | |
| if (sourceFile) { | |
| records.push(currentRecord.join('\n')); | |
| } | |
| } | |
| fs.writeFileSync(coveragePath, `${records.join('\n')}\n`); | |
| NODE | |
| - name: Upload browser coverage artifact | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: browser-coverage-lcov-${{ matrix.shard }} | |
| path: coverage/lcov.info | |
| if-no-files-found: error | |
| retention-days: 1 | |
| bundle-size: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Setup Node (with Corepack) | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Enable Corepack / Yarn 4 | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.13.0 --activate | |
| yarn -v | |
| - name: Cache Yarn Berry artifacts | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: | | |
| ~/.yarn/berry/cache | |
| .yarn/install-state.gz | |
| key: ${{ runner.os }}-yarn4-${{ hashFiles('yarn.lock', '.yarnrc.yml', 'package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn4- | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Check bundle-size budgets | |
| run: | | |
| bundleSizeStatus=0 | |
| yarn bundle-size --output .bundle-size || bundleSizeStatus=$? | |
| cat .bundle-size/report.md >> "$GITHUB_STEP_SUMMARY" | |
| exit "$bundleSizeStatus" | |
| - name: Upload bundle-size report | |
| if: always() | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: bundle-size-report | |
| path: .bundle-size | |
| if-no-files-found: error | |
| include-hidden-files: true | |
| test: | |
| needs: browser_coverage | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout code for coverage reporting | |
| if: ${{ needs.browser_coverage.result == 'success' }} | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Download browser coverage artifacts | |
| if: ${{ needs.browser_coverage.result == 'success' }} | |
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5 | |
| with: | |
| pattern: browser-coverage-lcov-* | |
| path: coverage/shards | |
| - name: Merge browser coverage reports | |
| if: ${{ needs.browser_coverage.result == 'success' }} | |
| run: | | |
| node ./test/utils/merge-lcov.mjs \ | |
| --output coverage/lcov.info \ | |
| coverage/shards/browser-coverage-lcov-1/lcov.info \ | |
| coverage/shards/browser-coverage-lcov-2/lcov.info \ | |
| coverage/shards/browser-coverage-lcov-3/lcov.info | |
| - name: Upload combined coverage to Coveralls | |
| if: ${{ needs.browser_coverage.result == 'success' }} | |
| uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| file: coverage/lcov.info | |
| - name: Verify all browser coverage shards passed | |
| if: always() | |
| env: | |
| SHARD_RESULT: ${{ needs.browser_coverage.result }} | |
| run: | | |
| if [ "$SHARD_RESULT" != "success" ]; then | |
| echo "::error::Browser coverage shards finished with status: $SHARD_RESULT" | |
| exit 1 | |
| fi | |
| examples: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Setup Node (with Corepack) | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Enable Corepack / Yarn 4 | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.13.0 --activate | |
| yarn -v | |
| - name: Cache Yarn Berry artifacts | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: | | |
| ~/.yarn/berry/cache | |
| .yarn/install-state.gz | |
| key: ${{ runner.os }}-yarn4-${{ hashFiles('yarn.lock', '.yarnrc.yml', 'package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn4- | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Build packages for example type declarations | |
| run: | | |
| yarn build | |
| - name: Verify experimental geospatial package imports | |
| run: yarn test-geospatial-package | |
| - name: Run lint | |
| run: | | |
| yarn lint | |
| - name: Typecheck examples | |
| run: | | |
| yarn examples:typecheck | |
| website: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Setup Node (with Corepack) | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Enable Corepack / Yarn 4 | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.13.0 --activate | |
| yarn -v | |
| - name: Cache Yarn Berry artifacts | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: | | |
| ~/.yarn/berry/cache | |
| .yarn/install-state.gz | |
| key: ${{ runner.os }}-yarn4-${{ hashFiles('yarn.lock', '.yarnrc.yml', 'package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn4- | |
| - name: Install website dependencies | |
| run: yarn install --immutable | |
| - name: Synchronize website example assets | |
| run: node website/scripts/sync-example-assets.mjs | |
| - name: Build standalone website examples | |
| run: yarn workspace website-docusaurus build:standalone-examples | |
| - name: Build Docusaurus website | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=6144 | |
| run: yarn workspace website-docusaurus docusaurus build | |
| - name: Normalize LLM documentation output | |
| run: node website/scripts/normalize-llm-output.mjs | |
| - name: Validate LLM documentation output | |
| run: node website/scripts/check-llm-output.mjs |