Fix CI workflow YAML syntax errors

Co-authored-by: MayaTheShy <117858929+MayaTheShy@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-16 23:22:19 +00:00
parent 3d53937d5d
commit b75723bff9
2 changed files with 143 additions and 143 deletions

View File

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