Files
rustfs/.github/workflows/ci.yml
houseme d66525a22f refactor(deps): centralize crate versions in root Cargo.toml (#448)
* chore(ci): upgrade protoc from 30.2 to 31.1

- Update protoc version in GitHub Actions setup workflow
- Use arduino/setup-protoc@v3 to install the latest protoc version
- Ensure compatibility with current project requirements
- Improve proto file compilation performance and stability

This upgrade aligns our development environment with the latest protobuf standards.

* modify package version

* refactor(deps): centralize crate versions in root Cargo.toml

- Move all dependency versions to workspace.dependencies section
- Standardize AWS SDK and related crates versions
- Update tokio, bytes, and futures crates to latest stable versions
- Ensure consistent version use across all workspace members
- Implement workspace inheritance for common dependencies

This change simplifies dependency management and ensures version consistency across the project.

* fix

* modify
2025-06-07 21:52:59 +08:00

123 lines
2.8 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * 0' # at midnight of each sunday
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
skip-check:
permissions:
actions: write
contents: read
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
cancel_others: true
paths_ignore: '["*.md"]'
# Quality checks for pull requests
pr-checks:
name: Pull Request Quality Checks
if: github.event_name == 'pull_request'
runs-on: self-hosted
steps:
- uses: actions/checkout@v4.2.2
- uses: ./.github/actions/setup
- name: Format Check
run: cargo fmt --all --check
- name: Lint Check
run: cargo check --all-targets
- name: Clippy Check
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Unit Tests
run: cargo test --all --exclude e2e_test
develop:
needs: skip-check
if: needs.skip-check.outputs.should_skip != 'true'
runs-on: self-hosted
steps:
- uses: actions/checkout@v4.2.2
- uses: ./.github/actions/setup
- name: Format
run: cargo fmt --all --check
- name: Lint
run: cargo check --all-targets
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test
run: cargo test --all --exclude e2e_test
- name: Build debug
run: |
touch rustfs/build.rs
cargo build -p rustfs --bins
- name: Pack artifacts
run: |
mkdir -p ./target/artifacts
cp target/debug/rustfs ./target/artifacts/rustfs-debug
- uses: actions/upload-artifact@v4
with:
name: rustfs
path: ./target/artifacts/*
s3s-e2e:
name: E2E (s3s-e2e)
needs:
- skip-check
- develop
if: needs.skip-check.outputs.should_skip != 'true'
runs-on: self-hosted
steps:
- uses: actions/checkout@v4.2.2
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
cache-all-crates: true
- name: Install s3s-e2e
run: |
cargo install s3s-e2e --git https://github.com/Nugine/s3s.git
s3s-e2e --version
- uses: actions/download-artifact@v4
with:
name: rustfs
path: ./target/artifacts
- name: Run s3s-e2e
timeout-minutes: 10
run: |
./scripts/e2e-run.sh ./target/artifacts/rustfs-debug /tmp/rustfs
- uses: actions/upload-artifact@v4
with:
name: s3s-e2e.logs
path: /tmp/rustfs.log