Skip to content

Main RTT

Main RTT #105

Workflow file for this run

name: Main RTT
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
inputs:
samples:
description: Number of Telegram RTT samples
required: false
default: "20"
type: string
permissions:
contents: write
concurrency:
group: main-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 main 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: Checkout OpenClaw main
uses: actions/checkout@v6
with:
repository: openclaw/openclaw
ref: main
path: openclaw
fetch-depth: 1
persist-credentials: false
- name: Set up Blacksmith Docker Builder
uses: useblacksmith/setup-docker-builder@722e97d12b1d06a961800dd6c05d79d951ad3c80 # v1
with:
max-cache-size-mb: 800000
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
shell: bash
run: |
set -euo pipefail
corepack enable
corepack prepare "pnpm@${PNPM_VERSION}" --activate
- name: Locate pnpm store
id: pnpm-store
working-directory: openclaw
shell: bash
run: |
set -euo pipefail
echo "path=$(pnpm store path --silent)" >>"$GITHUB_OUTPUT"
- name: Restore pnpm store
uses: actions/cache@v5
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: openclaw-main-rtt-pnpm-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('openclaw/pnpm-lock.yaml') }}
restore-keys: |
openclaw-main-rtt-pnpm-${{ runner.os }}-${{ runner.arch }}-
- name: Build OpenClaw package
id: pack
working-directory: openclaw
shell: bash
run: |
set -euo pipefail
echo "::group::pnpm install"
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
echo "::endgroup::"
echo "::group::pnpm build"
time pnpm build
echo "::endgroup::"
mkdir -p .artifacts/rtt-package
echo "::group::npm pack"
time npm pack --ignore-scripts --silent --pack-destination .artifacts/rtt-package
echo "::endgroup::"
package_tgz="$(find .artifacts/rtt-package -maxdepth 1 -name '*.tgz' -type f | sort | tail -1)"
if [[ -z "$package_tgz" ]]; then
echo "No package tgz produced." >&2
exit 1
fi
echo "package_tgz=${PWD}/${package_tgz}" >>"$GITHUB_OUTPUT"
- name: Run RTT
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 }}
INPUT_SAMPLES: ${{ github.event_name == 'workflow_dispatch' && inputs.samples || '20' }}
shell: bash
run: |
samples="${INPUT_SAMPLES:-20}"
if ! [[ "$samples" =~ ^[1-9][0-9]*$ ]]; then
echo "samples must be a positive integer, got: $samples" >&2
exit 1
fi
metrics_path="$RUNNER_TEMP/openclaw-rtt-resource-metrics.env"
set +e
/usr/bin/time \
-f 'max_rss_kb=%M\nelapsed_seconds=%e' \
-o "$metrics_path" \
pnpm rtt openclaw@main \
--package-tgz "${{ steps.pack.outputs.package_tgz }}" \
--harness-root "$PWD" \
--output "$RUNNER_TEMP/openclaw-rtt-runs" \
--samples "$samples" \
--timeout-ms 240000 \
--sample-timeout-ms 30000
status="$?"
set -e
result_path="$(find "$RUNNER_TEMP/openclaw-rtt-runs" -maxdepth 3 -name result.json -type f | sort | tail -1)"
if [[ -z "$result_path" ]]; then
echo "No RTT result.json produced." >&2
exit "$status"
fi
echo "result_path=$result_path" >>"$GITHUB_OUTPUT"
echo "resource_metrics_path=$metrics_path" >>"$GITHUB_OUTPUT"
- name: Import result
working-directory: openclaw-rtt
shell: bash
run: |
set -euo pipefail
git pull --rebase origin main
node scripts/import-result.mjs "${{ steps.rtt.outputs.result_path }}" \
--resource-metrics "${{ steps.rtt.outputs.resource_metrics_path }}"
node scripts/validate.mjs
node scripts/summary.mjs
- name: Commit result
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 main rtt"
git push || {
git pull --rebase origin main
git push
}