mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-28 07:57:01 +00:00
Return to GitHub hosting
Return to GitHub hosting Signed-off-by: loverustfs <hello@rustfs.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@@ -62,7 +62,6 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -70,7 +69,6 @@ concurrency:
|
|||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
|
||||||
CARGO_BUILD_JOBS: 4
|
CARGO_BUILD_JOBS: 4
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -95,10 +93,9 @@ jobs:
|
|||||||
|
|
||||||
typos:
|
typos:
|
||||||
name: Typos
|
name: Typos
|
||||||
|
runs-on: ubuntu-latest
|
||||||
runs-on: [self-hosted, linux, x64]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Typos check with custom config file
|
- name: Typos check with custom config file
|
||||||
uses: crate-ci/typos@master
|
uses: crate-ci/typos@master
|
||||||
@@ -107,30 +104,24 @@ jobs:
|
|||||||
name: Test and Lint
|
name: Test and Lint
|
||||||
needs: skip-check
|
needs: skip-check
|
||||||
if: needs.skip-check.outputs.should_skip != 'true'
|
if: needs.skip-check.outputs.should_skip != 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
runs-on: [self-hosted, linux, x64]
|
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Rust environment
|
- name: Setup Rust environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
rust-version: stable
|
rust-version: stable
|
||||||
|
|
||||||
cache-shared-key: ci-test-${{ hashFiles('**/Cargo.lock') }}
|
cache-shared-key: ci-test-${{ hashFiles('**/Cargo.lock') }}
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
cache-save-if: ${{ github.ref == 'refs/heads/main' }}
|
cache-save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
|
||||||
|
|
||||||
- name: Install cargo-nextest
|
- name: Install cargo-nextest
|
||||||
uses: taiki-e/install-action@nextest
|
uses: taiki-e/install-action@nextest
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
cargo nextest run --all --exclude e2e_test
|
cargo nextest run --all --exclude e2e_test
|
||||||
cargo test --all --doc
|
cargo test --all --doc
|
||||||
@@ -145,19 +136,16 @@ jobs:
|
|||||||
name: End-to-End Tests
|
name: End-to-End Tests
|
||||||
needs: skip-check
|
needs: skip-check
|
||||||
if: needs.skip-check.outputs.should_skip != 'true'
|
if: needs.skip-check.outputs.should_skip != 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
runs-on: [self-hosted, linux, x64]
|
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|
||||||
- name: Clean up previous test run
|
- name: Clean up previous test run
|
||||||
run: |
|
run: |
|
||||||
rm -rf /tmp/rustfs
|
rm -rf /tmp/rustfs
|
||||||
rm -f /tmp/rustfs.log
|
rm -f /tmp/rustfs.log
|
||||||
# 如果有 docker 容器残留,也建议清理
|
|
||||||
|
|
||||||
- name: Setup Rust environment
|
- name: Setup Rust environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
@@ -177,7 +165,7 @@ jobs:
|
|||||||
- name: Build debug binary
|
- name: Build debug binary
|
||||||
run: |
|
run: |
|
||||||
touch rustfs/build.rs
|
touch rustfs/build.rs
|
||||||
# 限制并发,防止 build --bins 导致 OOM
|
# Limit concurrency to prevent OOM
|
||||||
cargo build -p rustfs --bins --jobs 4
|
cargo build -p rustfs --bins --jobs 4
|
||||||
|
|
||||||
- name: Run end-to-end tests
|
- name: Run end-to-end tests
|
||||||
|
|||||||
Reference in New Issue
Block a user