Files
aitbc/.gitea/workflows/contract-benchmarks.yml
aitbc eb94a69a5f
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 7s
Contract Performance Benchmarks / benchmark-gas-usage (push) Successful in 1m3s
Contract Performance Benchmarks / benchmark-execution-time (push) Successful in 1m1s
Contract Performance Benchmarks / benchmark-throughput (push) Successful in 58s
Deploy to Testnet / deploy-testnet (push) Failing after 1m7s
P2P Network Verification / p2p-verification (push) Successful in 2s
Security Scanning / security-scan (push) Successful in 29s
Contract Performance Benchmarks / compare-benchmarks (push) Successful in 1s
Deploy to Testnet / notify-deployment (push) Successful in 2s
fix: Remove schedule triggers from all workflows
- Remove cron schedules from blockchain-sync-verification.yml (every 6 hours)
- Remove cron schedule from node-failover-simulation.yml (daily at 2 AM)
- Remove cron schedule from p2p-network-verification.yml (every 4 hours)
- Remove cron schedule from security-scanning.yml (weekly on Monday)
- Remove cron schedule from contract-benchmarks.yml (weekly on Sunday)
- All workflows now only trigger on push or manual workflow_dispatch
2026-04-29 16:15:30 +02:00

222 lines
7.0 KiB
YAML

name: Contract Performance Benchmarks
on:
push:
branches: [main, develop]
paths:
- 'contracts/**'
- 'scripts/benchmarking/**'
- '.gitea/workflows/contract-benchmarks.yml'
pull_request:
branches: [main, develop]
workflow_dispatch:
inputs:
benchmark_type:
description: 'Type of benchmark to run'
required: false
default: 'all'
type: choice
options:
- all
- gas-usage
- execution-time
- throughput
concurrency:
group: contract-benchmarks-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark-gas-usage:
runs-on: debian
timeout-minutes: 30
steps:
- name: Clone repository
run: |
WORKSPACE="/var/lib/aitbc-workspaces/gas-benchmarks"
rm -rf "$WORKSPACE"
mkdir -p "$WORKSPACE"
cd "$WORKSPACE"
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
- name: Initialize job logging
run: |
cd /var/lib/aitbc-workspaces/gas-benchmarks/repo
bash scripts/ci/setup-job-logging.sh
- name: Setup Node.js environment
run: |
cd /var/lib/aitbc-workspaces/gas-benchmarks/repo/contracts
npm install
echo "✅ Node.js environment ready"
- name: Run gas usage benchmarks
run: |
cd /var/lib/aitbc-workspaces/gas-benchmarks/repo/contracts
echo "🧪 Running gas usage benchmarks"
# Run benchmarks (gas reporting will be added when tests are implemented)
npx hardhat test test/benchmarks/gas-usage.test.js
echo "✅ Gas usage benchmarks completed"
- name: Upload gas report
run: |
cd /var/lib/aitbc-workspaces/gas-benchmarks/repo
echo "📊 Gas report upload skipped (reports will be added when tests are implemented)"
# Save report to artifacts directory (placeholder)
mkdir -p /var/lib/aitbc/benchmarks
echo "Gas report placeholder - $(date)" > /var/lib/aitbc/benchmarks/gas-report-placeholder-$(date +%Y%m%d-%H%M%S).txt
echo "✅ Gas report placeholder uploaded"
- name: Cleanup
if: always()
run: rm -rf /var/lib/aitbc-workspaces/gas-benchmarks
benchmark-execution-time:
runs-on: debian
timeout-minutes: 30
steps:
- name: Clone repository
run: |
WORKSPACE="/var/lib/aitbc-workspaces/execution-benchmarks"
rm -rf "$WORKSPACE"
mkdir -p "$WORKSPACE"
cd "$WORKSPACE"
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
- name: Initialize job logging
run: |
cd /var/lib/aitbc-workspaces/execution-benchmarks/repo
bash scripts/ci/setup-job-logging.sh
- name: Setup Node.js environment
run: |
cd /var/lib/aitbc-workspaces/execution-benchmarks/repo/contracts
npm install
echo "✅ Node.js environment ready"
- name: Run execution time benchmarks
run: |
cd /var/lib/aitbc-workspaces/execution-benchmarks/repo/contracts
echo "🧪 Running execution time benchmarks"
npx hardhat test test/benchmarks/execution-time.test.js
echo "✅ Execution time benchmarks completed"
- name: Upload execution time report
run: |
cd /var/lib/aitbc-workspaces/execution-benchmarks/repo
echo "📊 Execution time report upload skipped (reports will be added when tests are implemented)"
mkdir -p /var/lib/aitbc/benchmarks
echo "Execution time report placeholder - $(date)" > /var/lib/aitbc/benchmarks/execution-time-placeholder-$(date +%Y%m%d-%H%M%S).json
echo "✅ Execution time report placeholder uploaded"
- name: Cleanup
if: always()
run: rm -rf /var/lib/aitbc-workspaces/execution-benchmarks
benchmark-throughput:
runs-on: debian
timeout-minutes: 30
steps:
- name: Clone repository
run: |
WORKSPACE="/var/lib/aitbc-workspaces/throughput-benchmarks"
rm -rf "$WORKSPACE"
mkdir -p "$WORKSPACE"
cd "$WORKSPACE"
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
- name: Initialize job logging
run: |
cd /var/lib/aitbc-workspaces/throughput-benchmarks/repo
bash scripts/ci/setup-job-logging.sh
- name: Setup Node.js environment
run: |
cd /var/lib/aitbc-workspaces/throughput-benchmarks/repo/contracts
npm install
echo "✅ Node.js environment ready"
- name: Run throughput benchmarks
run: |
cd /var/lib/aitbc-workspaces/throughput-benchmarks/repo/contracts
echo "🧪 Running throughput benchmarks"
npx hardhat test test/benchmarks/throughput.test.js
echo "✅ Throughput benchmarks completed"
- name: Upload throughput report
run: |
cd /var/lib/aitbc-workspaces/throughput-benchmarks/repo
echo "📊 Throughput report upload skipped (reports will be added when tests are implemented)"
mkdir -p /var/lib/aitbc/benchmarks
echo "Throughput report placeholder - $(date)" > /var/lib/aitbc/benchmarks/throughput-placeholder-$(date +%Y%m%d-%H%M%S).json
echo "✅ Throughput report placeholder uploaded"
- name: Cleanup
if: always()
run: rm -rf /var/lib/aitbc-workspaces/throughput-benchmarks
compare-benchmarks:
runs-on: debian
timeout-minutes: 15
needs: [benchmark-gas-usage, benchmark-execution-time, benchmark-throughput]
steps:
- name: Clone repository
run: |
WORKSPACE="/var/lib/aitbc-workspaces/benchmark-comparison"
rm -rf "$WORKSPACE"
mkdir -p "$WORKSPACE"
cd "$WORKSPACE"
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
- name: Initialize job logging
run: |
cd /var/lib/aitbc-workspaces/benchmark-comparison/repo
bash scripts/ci/setup-job-logging.sh
- name: Compare with previous benchmarks
run: |
cd /var/lib/aitbc-workspaces/benchmark-comparison/repo
echo "📊 Comparing benchmark results"
# Run comparison script
bash scripts/benchmarking/compare-benchmarks.sh
echo "✅ Benchmark comparison completed"
- name: Generate benchmark report
run: |
cd /var/lib/aitbc-workspaces/benchmark-comparison/repo
echo "📝 Generating benchmark report"
bash scripts/benchmarking/generate-report.sh
echo "✅ Benchmark report generated"
- name: Cleanup
if: always()
run: rm -rf /var/lib/aitbc-workspaces/benchmark-comparison