Release RTT #131
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: Release RTT | |
| on: | |
| schedule: | |
| - cron: "15 */6 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| versions: | |
| description: Space or comma separated OpenClaw versions to measure | |
| required: false | |
| default: "" | |
| type: string | |
| rss_backfill: | |
| description: Backfill RSS onto existing release rows without changing RTT values | |
| required: false | |
| default: "false" | |
| type: choice | |
| options: | |
| - "false" | |
| - "true" | |
| rss_backfill_limit: | |
| description: Maximum existing release versions to backfill in this run | |
| required: false | |
| default: "4" | |
| type: string | |
| rss_backfill_skip_versions: | |
| description: Space or comma separated release versions to skip during RSS backfill | |
| required: false | |
| default: "" | |
| type: string | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-rtt-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| NODE_VERSION: "24.x" | |
| PNPM_VERSION: "10.33.0" | |
| jobs: | |
| measure: | |
| name: Measure OpenClaw release RTT | |
| runs-on: blacksmith-32vcpu-ubuntu-2404 | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Checkout RTT tracker | |
| uses: actions/checkout@v6 | |
| with: | |
| path: openclaw-rtt | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Resolve OpenClaw packages | |
| id: release | |
| working-directory: openclaw-rtt | |
| env: | |
| INPUT_VERSIONS: ${{ github.event_name == 'workflow_dispatch' && inputs.versions || '' }} | |
| INPUT_RSS_BACKFILL: ${{ github.event_name == 'workflow_dispatch' && inputs.rss_backfill || 'false' }} | |
| INPUT_RSS_BACKFILL_LIMIT: ${{ github.event_name == 'workflow_dispatch' && inputs.rss_backfill_limit || '' }} | |
| INPUT_RSS_BACKFILL_SKIP_VERSIONS: ${{ github.event_name == 'workflow_dispatch' && inputs.rss_backfill_skip_versions || '' }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| node scripts/resolve-openclaw-package.mjs | |
| - name: Checkout OpenClaw harness | |
| if: steps.release.outputs.should_run == 'true' | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: openclaw/openclaw | |
| ref: main | |
| path: openclaw | |
| fetch-depth: 1 | |
| persist-credentials: false | |
| - name: Set up Blacksmith Docker Builder | |
| if: steps.release.outputs.should_run == 'true' | |
| uses: useblacksmith/setup-docker-builder@722e97d12b1d06a961800dd6c05d79d951ad3c80 # v1 | |
| with: | |
| max-cache-size-mb: 800000 | |
| - name: Setup pnpm | |
| if: steps.release.outputs.should_run == 'true' | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| corepack enable | |
| corepack prepare "pnpm@${PNPM_VERSION}" --activate | |
| - name: Locate pnpm store | |
| if: steps.release.outputs.should_run == 'true' | |
| id: pnpm-store | |
| working-directory: openclaw | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| echo "path=$(pnpm store path --silent)" >>"$GITHUB_OUTPUT" | |
| - name: Restore pnpm store | |
| if: steps.release.outputs.should_run == 'true' | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.pnpm-store.outputs.path }} | |
| key: openclaw-release-rtt-pnpm-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('openclaw/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| openclaw-release-rtt-pnpm-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Install OpenClaw harness dependencies | |
| if: steps.release.outputs.should_run == 'true' | |
| working-directory: openclaw | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| time pnpm install --frozen-lockfile --prefer-offline --ignore-scripts=false --config.engine-strict=false --config.enable-pre-post-scripts=true --config.side-effects-cache=true | |
| - name: Run RSS backfill | |
| if: steps.release.outputs.should_run == 'true' && steps.release.outputs.rss_backfill == 'true' | |
| working-directory: openclaw | |
| env: | |
| OPENCLAW_QA_TELEGRAM_GROUP_ID: ${{ secrets.OPENCLAW_QA_TELEGRAM_GROUP_ID }} | |
| OPENCLAW_QA_TELEGRAM_DRIVER_BOT_TOKEN: ${{ secrets.OPENCLAW_QA_TELEGRAM_DRIVER_BOT_TOKEN }} | |
| OPENCLAW_QA_TELEGRAM_SUT_BOT_TOKEN: ${{ secrets.OPENCLAW_QA_TELEGRAM_SUT_BOT_TOKEN }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| for spec in ${{ steps.release.outputs.specs }}; do | |
| output="$RUNNER_TEMP/openclaw-rtt-runs/$(printf '%s' "$spec" | tr -c 'A-Za-z0-9._-' '_')" | |
| metrics_path="${output}/resource-metrics.env" | |
| mkdir -p "$output" | |
| set +e | |
| /usr/bin/time \ | |
| -f 'max_rss_kb=%M\nelapsed_seconds=%e' \ | |
| -o "$metrics_path" \ | |
| timeout --kill-after=30s 10m \ | |
| pnpm rtt "$spec" \ | |
| --harness-root "$PWD" \ | |
| --output "$output" \ | |
| --samples 20 \ | |
| --timeout-ms 240000 \ | |
| --sample-timeout-ms 30000 | |
| status="$?" | |
| set -e | |
| echo "exit_status=${status}" >>"$metrics_path" | |
| result_path="$(find "$output" -maxdepth 3 -name result.json -type f | sort | tail -1)" | |
| if [[ -z "$result_path" ]]; then | |
| echo "Skipping RSS backfill for $spec because the rerun did not produce a result." >&2 | |
| continue | |
| fi | |
| run_status="$(node -e 'const fs = require("node:fs"); const result = JSON.parse(fs.readFileSync(process.argv[1], "utf8")); process.stdout.write(String(result.run?.status || ""));' "$result_path")" | |
| if [[ "$run_status" != "pass" ]]; then | |
| echo "Skipping RSS backfill for failed rerun ${result_path} (status=${run_status:-missing})." >&2 | |
| continue | |
| fi | |
| ( | |
| cd ../openclaw-rtt | |
| git pull --rebase origin main | |
| node scripts/backfill-release-rss.mjs \ | |
| --family telegram \ | |
| --result "$result_path" \ | |
| --resource-metrics "$metrics_path" | |
| node scripts/validate.mjs | |
| git add data/channels/telegram/ runs/telegram/ | |
| if git diff --cached --quiet --exit-code; then | |
| echo "No RSS changes to commit for $spec." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -m "data: record release rtt batch" | |
| git push || { | |
| git pull --rebase origin main | |
| git push | |
| } | |
| ) | |
| done | |
| - name: Run RTT | |
| if: steps.release.outputs.should_run == 'true' && steps.release.outputs.rss_backfill != 'true' | |
| id: rtt | |
| working-directory: openclaw | |
| env: | |
| OPENCLAW_QA_TELEGRAM_GROUP_ID: ${{ secrets.OPENCLAW_QA_TELEGRAM_GROUP_ID }} | |
| OPENCLAW_QA_TELEGRAM_DRIVER_BOT_TOKEN: ${{ secrets.OPENCLAW_QA_TELEGRAM_DRIVER_BOT_TOKEN }} | |
| OPENCLAW_QA_TELEGRAM_SUT_BOT_TOKEN: ${{ secrets.OPENCLAW_QA_TELEGRAM_SUT_BOT_TOKEN }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| result_paths="$RUNNER_TEMP/openclaw-rtt-result-paths.txt" | |
| : >"$result_paths" | |
| for spec in ${{ steps.release.outputs.specs }}; do | |
| output="$RUNNER_TEMP/openclaw-rtt-runs/$(printf '%s' "$spec" | tr -c 'A-Za-z0-9._-' '_')" | |
| metrics_path="${output}/resource-metrics.env" | |
| mkdir -p "$output" | |
| set +e | |
| /usr/bin/time \ | |
| -f 'max_rss_kb=%M\nelapsed_seconds=%e' \ | |
| -o "$metrics_path" \ | |
| pnpm rtt "$spec" \ | |
| --harness-root "$PWD" \ | |
| --output "$output" \ | |
| --samples 20 \ | |
| --timeout-ms 240000 \ | |
| --sample-timeout-ms 30000 | |
| status="$?" | |
| set -e | |
| echo "exit_status=${status}" >>"$metrics_path" | |
| result_path="$(find "$output" -maxdepth 3 -name result.json -type f | sort | tail -1)" | |
| if [[ -z "$result_path" ]]; then | |
| echo "No RTT result.json produced for $spec." >&2 | |
| if [[ "${{ steps.release.outputs.rss_backfill }}" == "true" ]]; then | |
| echo "Skipping RSS backfill for $spec because the rerun did not produce a result." >&2 | |
| continue | |
| fi | |
| if [[ "$status" -eq 0 ]]; then | |
| status=1 | |
| fi | |
| exit "$status" | |
| fi | |
| printf '%s\t%s\n' "$result_path" "$metrics_path" >>"$result_paths" | |
| done | |
| echo "result_paths=$result_paths" >>"$GITHUB_OUTPUT" | |
| - name: Import result | |
| if: steps.release.outputs.should_run == 'true' && steps.release.outputs.rss_backfill != 'true' | |
| working-directory: openclaw-rtt | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git pull --rebase origin main | |
| while IFS=$'\t' read -r result_path metrics_path; do | |
| if [[ "${{ steps.release.outputs.rss_backfill }}" == "true" ]]; then | |
| run_status="$(node -e 'const fs = require("node:fs"); const result = JSON.parse(fs.readFileSync(process.argv[1], "utf8")); process.stdout.write(String(result.run?.status || ""));' "$result_path")" | |
| if [[ "$run_status" != "pass" ]]; then | |
| echo "Skipping RSS backfill for failed rerun ${result_path} (status=${run_status:-missing})." >&2 | |
| continue | |
| fi | |
| node scripts/backfill-release-rss.mjs \ | |
| --family telegram \ | |
| --result "$result_path" \ | |
| --resource-metrics "$metrics_path" | |
| else | |
| node scripts/import-result.mjs "$result_path" --resource-metrics "$metrics_path" | |
| fi | |
| done <"${{ steps.rtt.outputs.result_paths }}" | |
| node scripts/validate.mjs | |
| node scripts/summary.mjs | |
| - name: Commit result | |
| if: steps.release.outputs.should_run == 'true' && steps.release.outputs.rss_backfill != 'true' | |
| working-directory: openclaw-rtt | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git add data/channels/telegram/ runs/telegram/ | |
| if git diff --cached --quiet --exit-code; then | |
| echo "No RTT changes to commit." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -m "data: record release rtt batch" | |
| git push || { | |
| git pull --rebase origin main | |
| git push | |
| } | |
| - name: Report skipped package | |
| if: steps.release.outputs.should_run != 'true' | |
| run: | | |
| echo "No new release versions to measure after ${{ steps.release.outputs.anchor }} (${{ steps.release.outputs.reason }})" |