feat: GPU Container Batch Mode & E2E Testing (#15) #33
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: E2E Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| env: | |
| RUST_VERSION: 1.93 | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| e2e-tests: | |
| name: End-to-End Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| components: rustfmt, clippy | |
| - name: Cache Cargo dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-e2e-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-e2e- | |
| ${{ runner.os }}-cargo- | |
| - name: Install FFmpeg | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| ffmpeg -version | |
| - name: Check Docker | |
| run: | | |
| docker --version | |
| docker ps | |
| - name: Generate test videos | |
| run: | | |
| ./scripts/generate-test-videos.sh | |
| ls -lh testdata/sample_scene/ | |
| - name: Build release binaries | |
| run: cargo build --release --bin 3dgs-processor --bin 3dgs-preflight | |
| - name: Run preflight check | |
| run: ./target/release/3dgs-preflight --expect mock | |
| env: | |
| FORCE_CPU_BACKEND: "1" | |
| COLMAP_USE_CPU: "1" | |
| - name: Build Docker image (CPU target) | |
| run: | | |
| docker build --target cpu -t 3dgs-processor:test . | |
| - name: Run E2E tests | |
| run: | | |
| cargo test --test e2e -- --test-threads=1 --nocapture | |
| env: | |
| RUST_LOG: debug | |
| RUST_BACKTRACE: 1 | |
| - name: Cleanup Docker containers | |
| if: always() | |
| run: | | |
| docker ps -aq --filter "name=3dgs-e2e-test" | xargs -r docker stop | |
| docker ps -aq --filter "name=azurite-test" | xargs -r docker stop | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-test-artifacts | |
| path: | | |
| testdata/ | |
| target/debug/ | |
| retention-days: 7 | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| - name: Cache Cargo dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-integration-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install FFmpeg | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| - name: Generate test videos | |
| run: ./scripts/generate-test-videos.sh | |
| - name: Run integration tests | |
| run: cargo test --test integration | |
| env: | |
| RUST_LOG: info | |