3.0 KiB
Gitea CI Setup Summary
What Was Created
1. Gitea Workflows
Created comprehensive CI workflows in .gitea/workflows/:
-
ci.yml- Main CI pipeline that runs on every push tomain/devand PRs:- Builds Rust bridge
- Builds C++ project with CMake
- Runs unit tests
- Checks code quality (formatting, linting)
- Uploads build artifacts
-
rust-quality.yml- Specialized Rust quality checks:- Code formatting validation
- Clippy linting
- Unused dependency detection (cargo-udeps)
- Security audit (cargo-audit)
- Documentation build verification
2. Local Test Script
Created ci-test.sh - A bash script that mirrors the CI pipeline for local testing:
- Cleans and rebuilds from scratch
- Runs all build steps
- Executes tests
- Provides colorized output
- Returns proper exit codes
3. Documentation
Created .gitea/CI_SETUP.md - Comprehensive CI documentation covering:
- Workflow descriptions
- Local testing instructions
- Test coverage details
- Debugging guidelines
- How to add new tests
- Future enhancement ideas
4. Updated README
Added CI status badge to README.md (update the URL with your actual Gitea instance)
Tests Updated
Fixed the protocol signature test in tests/TestHarness.cpp:
- Updated expected signature from
2977ddf4352e7264b6a45767087b45batoeb1600e798dc5e03c755a968dc16b7fc - This reflects the current state after entity rendering enhancements
- Added comment noting the update date (2025-11-08)
Current Test Coverage
C++ Tests (tests/TestHarness.cpp)
- ✅ Protocol signature stability
- ✅ Discovery JSON parsing (Vircadia format)
- ✅ Discovery JSON parsing (Overte format)
Rust Bridge
- ✅ Successful compilation
- ✅ Clean build (no warnings in release mode)
How to Use
Run CI Locally
./ci-test.sh
Run Individual Steps
# Build Rust bridge
cd bridge && cargo build
# Build C++ project
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
# Run tests
./build/starworld-tests
Check Code Quality
# Rust formatting
cd bridge && cargo fmt -- --check
# Rust linting
cd bridge && cargo clippy -- -D warnings
Next Steps
To activate CI on your Gitea repository:
-
Push these files to your Gitea repository:
git add .gitea/ ci-test.sh tests/TestHarness.cpp README.md git commit -m "Add Gitea CI/CD pipeline" git push -
Update the CI badge in README.md with your actual Gitea URL
-
Enable Actions in your Gitea repository settings (if not already enabled)
-
Monitor the Actions tab to see CI runs
Customization
Edit .gitea/workflows/ci.yml to:
- Add more build configurations (Release, different compilers)
- Add deployment steps
- Configure notifications
- Adjust caching strategies
Notes
- CI uses Ubuntu latest (20.04+)
- Requires Rust nightly toolchain
- Caches both Cargo and CMake builds for faster runs
- Artifacts retained for 7 days
- Tests run on every push and PR
Status: ✅ CI setup complete and tested locally Last Update: 2025-11-08