Merge pull request #558 from anchapin/feature/issue-539 #230
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: Performance Tests CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| # Cancel in-progress runs for the same branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Performance validation tests (issue #373) | |
| performance-tests: | |
| name: Performance Validation Tests | |
| runs-on: ubuntu-latest | |
| # Only run on ubuntu - performance tests are platform-specific | |
| # and Firecracker is Linux-only | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 | |
| with: | |
| toolchain: stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v5 | |
| with: | |
| path: orchestrator/target | |
| key: ${{ runner.os }}-cargo-perf-build-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run performance validation tests | |
| working-directory: orchestrator | |
| run: | | |
| echo "Running performance validation tests for issue #373..." | |
| cargo test --lib vm::performance_tests -- --nocapture | |
| - name: Run performance benchmarks | |
| working-directory: orchestrator | |
| run: | | |
| echo "Running performance benchmarks..." | |
| cargo bench --no-run 2>/dev/null || echo "Benchmarks not run (may require setup)" | |
| # Run the performance benchmark binary if available | |
| if [ -f target/release/performance_benchmark ]; then | |
| ./target/release/performance_benchmark | |
| else | |
| echo "Performance benchmark binary not found - skipping" | |
| fi | |
| - name: Upload performance test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: performance-test-results | |
| path: | | |
| orchestrator/target/**/perf/*.json | |
| orchestrator/target/**/benchmark/*.json | |
| retention-days: 7 | |
| if-no-files-found: ignore |