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

View File

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