Merge main branch and resolve CI workflow conflict

Co-authored-by: MayaTheShy <117858929+MayaTheShy@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-17 00:11:43 +00:00
parent 3e2c03c5dc
commit fcfd60b6e5
2 changed files with 141 additions and 143 deletions

View File

@@ -2,102 +2,100 @@ name: CI
on: on:
push: push:
branches: [ main, dev ] branches: [main, dev]
pull_request: pull_request:
branches: [ main ] branches: [main]
jobs: jobs:
build-and-test: build-and-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
submodules: recursive - name: Install system dependencies
run: |
- name: Install system dependencies sudo apt-get update
run: | sudo apt-get install -y \
sudo apt-get update build-essential \
sudo apt-get install -y \ cmake \
build-essential \ libglm-dev \
cmake \ libssl-dev \
libglm-dev \ zlib1g-dev \
libssl-dev \ libcurl4-openssl-dev \
zlib1g-dev \ curl
libcurl4-openssl-dev \
curl - name: Install Rust
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust with:
uses: dtolnay/rust-toolchain@nightly components: rustfmt, clippy
with:
components: rustfmt, clippy - name: Cache CMake build
uses: actions/cache@v4
- name: Cache CMake build with:
uses: actions/cache@v4 path: build
with: key: ${{ runner.os }}-cmake-${{ hashFiles('**/CMakeLists.txt') }}
path: build restore-keys: |
key: ${{ runner.os }}-cmake-${{ hashFiles('**/CMakeLists.txt') }} ${{ runner.os }}-cmake-
restore-keys: |
${{ runner.os }}-cmake- - name: Cache Rust dependencies
uses: actions/cache@v4
- name: Cache Rust dependencies with:
uses: actions/cache@v4 path: |
with: ~/.cargo/bin/
path: | ~/.cargo/registry/index/
~/.cargo/bin/ ~/.cargo/registry/cache/
~/.cargo/registry/index/ ~/.cargo/git/db/
~/.cargo/registry/cache/ bridge/target/
~/.cargo/git/db/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
bridge/target/ restore-keys: |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} ${{ runner.os }}-cargo-
restore-keys: |
${{ runner.os }}-cargo- - name: Build Rust bridge
run: |
- name: Build Rust bridge cd bridge
run: | cargo build --verbose
cd bridge cd ..
cargo build --verbose
cd .. - name: Configure CMake
run: |
- name: Configure CMake mkdir -p build
run: | cd build
mkdir -p build cmake .. -DCMAKE_BUILD_TYPE=Release
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release - name: Build C++ project
run: |
- name: Build C++ project cd build
run: | make -j$(nproc)
cd build
make -j$(nproc) - name: Run tests
run: |
- name: Run tests cd build
run: | ./stardust-tests
cd build
./stardust-tests - name: Check Rust formatting
run: |
- name: Check Rust formatting cd bridge
run: | cargo fmt -- --check
cd bridge
cargo fmt -- --check - name: Run Rust clippy
run: |
- name: Run Rust clippy cd bridge
run: | cargo clippy -- -D warnings
cd bridge
cargo clippy -- -D warnings - name: Verify client binary exists
run: |
- name: Verify client binary exists test -f build/stardust-overte-client
run: | echo "Client binary built successfully"
test -f build/stardust-overte-client
echo "Client binary built successfully" - name: Upload artifacts
uses: actions/upload-artifact@v4
- name: Upload artifacts if: success()
uses: actions/upload-artifact@v4 with:
if: success() name: binaries
with: path: |
name: binaries build/stardust-overte-client
path: | build/stardust-tests
build/stardust-overte-client build/starworld
build/stardust-tests build/starworld-tests
build/starworld
build/starworld-tests

View File

@@ -2,64 +2,64 @@ name: Rust Quality Checks
on: on:
push: push:
branches: [ main, dev ] branches: [main, dev]
paths: paths:
- 'bridge/**' - 'bridge/**'
- '.github/workflows/rust-quality.yml' - '.github/workflows/rust-quality.yml'
pull_request: pull_request:
branches: [ main ] branches: [main]
paths: paths:
- 'bridge/**' - 'bridge/**'
jobs: jobs:
rust-checks: rust-checks:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install Rust nightly - name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly uses: dtolnay/rust-toolchain@nightly
with: with:
components: rustfmt, clippy components: rustfmt, clippy
- name: Cache Rust dependencies - name: Cache Rust dependencies
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
~/.cargo/bin/ ~/.cargo/bin/
~/.cargo/registry/index/ ~/.cargo/registry/index/
~/.cargo/registry/cache/ ~/.cargo/registry/cache/
~/.cargo/git/db/ ~/.cargo/git/db/
bridge/target/ bridge/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('bridge/Cargo.lock', 'bridge/Cargo.toml') }} key: ${{ runner.os }}-cargo-${{ hashFiles('bridge/Cargo.lock', 'bridge/Cargo.toml') }}
restore-keys: | restore-keys: |
${{ runner.os }}-cargo- ${{ runner.os }}-cargo-
- name: Check formatting - name: Check formatting
run: | run: |
cd bridge cd bridge
cargo fmt -- --check cargo fmt -- --check
- name: Run clippy - name: Run clippy
run: | run: |
cd bridge cd bridge
cargo clippy --all-targets --all-features -- -D warnings cargo clippy --all-targets --all-features -- -D warnings
- name: Check for unused dependencies - name: Check for unused dependencies
run: | run: |
cd bridge cd bridge
cargo install cargo-udeps --locked || true cargo install cargo-udeps --locked || true
cargo +nightly udeps || true cargo +nightly udeps || true
- name: Security audit - name: Security audit
run: | run: |
cd bridge cd bridge
cargo install cargo-audit --locked || true cargo install cargo-audit --locked || true
cargo audit || true cargo audit || true
- name: Build documentation - name: Build documentation
run: | run: |
cd bridge cd bridge
cargo doc --no-deps --document-private-items cargo doc --no-deps --document-private-items