ci: open source, align MSRV, and consolidate consumer checks #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SILO CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: silo-ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_TOOLCHAIN: 1.94.1 | |
| jobs: | |
| quality: | |
| name: Format, lint, test, package, and conformance | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@1.94.1 | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: silo-quality-rust-1.94.1 | |
| - name: Toolchain | |
| run: rustup show active-toolchain && cargo --version | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| - name: Strict Clippy | |
| run: cargo clippy --locked --workspace --all-targets --all-features -- -D warnings | |
| - name: Tests | |
| run: cargo test --locked --workspace --all-features | |
| - name: Package crates | |
| run: cargo package --locked --workspace --all-features | |
| - name: Protocol conformance | |
| run: python3 spec/prolly-s3/conformance/verify.py | |
| - name: Dependency advisories | |
| run: | | |
| cargo install cargo-deny --version 0.20.2 --locked | |
| scripts/check_dependency_security.sh | |
| msrv: | |
| name: Declared MSRV and clean downstream | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| env: | |
| SILO_RUST_TOOLCHAIN: 1.94.1 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@1.94.1 | |
| - name: Toolchain | |
| run: rustup show active-toolchain && cargo --version | |
| - name: Workspace check at declared MSRV | |
| run: cargo check --locked --workspace --all-features | |
| - name: Client minimal feature set | |
| run: cargo check --locked -p silo-s3-client --no-default-features | |
| - name: Clean downstream consumers | |
| env: | |
| SILO_S3_CARGO_TARGET_DIR: ${{ runner.temp }}/silo-downstream-target | |
| run: scripts/check_clean_downstream.sh | |
| rustfs: | |
| name: RustFS provider qualification | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| env: | |
| SILO_S3_RUSTFS: "1" | |
| SILO_RUSTFS_ACCESS_KEY: siloadmin | |
| SILO_RUSTFS_SECRET_KEY: silo-local-secret-change-me | |
| SILO_RUSTFS_RPC_SECRET: silo-local-rpc-secret-change-me | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@1.94.1 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: silo-rustfs-rust-1.94.1 | |
| - name: Toolchain | |
| run: rustup show active-toolchain && cargo --version | |
| - name: Configure RustFS data path | |
| run: echo "SILO_RUSTFS_DATA_DIR=$RUNNER_TEMP/silo-rustfs-data" >> "$GITHUB_ENV" | |
| - name: Prepare RustFS data directory | |
| run: sudo install -d -o 10001 -g 10001 -m 0750 "$SILO_RUSTFS_DATA_DIR" | |
| - name: Start pinned RustFS | |
| run: | | |
| docker compose -f docker-compose.rustfs.yml up -d | |
| for attempt in $(seq 1 60); do | |
| if curl -fsS http://127.0.0.1:9000/health >/dev/null; then exit 0; fi | |
| sleep 2 | |
| done | |
| docker compose -f docker-compose.rustfs.yml logs --no-color | |
| exit 1 | |
| - name: RustFS integration suite | |
| run: cargo test --locked -p silo-s3-client --test rustfs_repository -- --nocapture | |
| - name: RustFS diagnostics | |
| if: failure() | |
| run: docker compose -f docker-compose.rustfs.yml logs --no-color | |
| - name: Stop RustFS | |
| if: always() | |
| run: docker compose -f docker-compose.rustfs.yml down --volumes --remove-orphans |