mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-25 13:36:50 +00:00
ci: reduce setup time
This commit is contained in:
+10
-85
@@ -37,13 +37,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
|
||||||
cache-shared-key: "develop"
|
|
||||||
|
|
||||||
- name: Install s3s-e2e
|
|
||||||
run: |
|
|
||||||
cargo install s3s-e2e --git https://github.com/Nugine/s3s.git
|
|
||||||
s3s-e2e --version
|
|
||||||
|
|
||||||
- name: Format
|
- name: Format
|
||||||
run: cargo fmt --all --check
|
run: cargo fmt --all --check
|
||||||
@@ -52,40 +45,24 @@ jobs:
|
|||||||
run: cargo check --all-targets
|
run: cargo check --all-targets
|
||||||
# TODO: cargo clippy
|
# TODO: cargo clippy
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: cargo test --all --exclude e2e_test
|
||||||
|
|
||||||
- name: Build debug
|
- name: Build debug
|
||||||
run: |
|
run: |
|
||||||
touch rustfs/build.rs
|
touch rustfs/build.rs
|
||||||
cargo build -p rustfs --bins
|
cargo build -p rustfs --bins
|
||||||
|
|
||||||
# - name: Build release
|
|
||||||
# run: |
|
|
||||||
# touch rustfs/build.rs
|
|
||||||
# cargo build -p rustfs --bins --release
|
|
||||||
|
|
||||||
- run: |
|
- name: Pack artifacts
|
||||||
|
run: |
|
||||||
mkdir -p ./target/artifacts
|
mkdir -p ./target/artifacts
|
||||||
cp target/debug/rustfs ./target/artifacts/rustfs-debug
|
cp target/debug/rustfs ./target/artifacts/rustfs-debug
|
||||||
# cp target/release/rustfs ./target/artifacts/rustfs-release
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: rustfs
|
name: rustfs
|
||||||
path: ./target/artifacts/*
|
path: ./target/artifacts/*
|
||||||
|
|
||||||
test:
|
|
||||||
name: Test
|
|
||||||
needs:
|
|
||||||
- skip-check
|
|
||||||
- develop
|
|
||||||
if: needs.skip-check.outputs.should_skip != 'true'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: ./.github/actions/setup
|
|
||||||
with:
|
|
||||||
cache-shared-key: "test"
|
|
||||||
- run: cargo test --all --exclude e2e_test
|
|
||||||
|
|
||||||
s3s-e2e:
|
s3s-e2e:
|
||||||
name: E2E (s3s-e2e)
|
name: E2E (s3s-e2e)
|
||||||
needs:
|
needs:
|
||||||
@@ -95,10 +72,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/setup
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-shared-key: "develop"
|
cache-on-failure: true
|
||||||
cache-save-if: false
|
cache-all-crates: true
|
||||||
|
|
||||||
- name: Install s3s-e2e
|
- name: Install s3s-e2e
|
||||||
run: |
|
run: |
|
||||||
@@ -110,65 +88,12 @@ jobs:
|
|||||||
name: rustfs
|
name: rustfs
|
||||||
path: ./target/artifacts
|
path: ./target/artifacts
|
||||||
|
|
||||||
- name: Run rustfs
|
|
||||||
run: |
|
|
||||||
./scripts/e2e-run.sh ./target/artifacts/rustfs-debug /data/rustfs
|
|
||||||
sleep 10
|
|
||||||
|
|
||||||
- name: Run s3s-e2e
|
- name: Run s3s-e2e
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
export AWS_ACCESS_KEY_ID=rustfsadmin
|
./scripts/e2e-run.sh ./target/artifacts/rustfs-debug /tmp/rustfs
|
||||||
export AWS_SECRET_ACCESS_KEY=rustfsadmin
|
|
||||||
export AWS_REGION=us-east-1
|
|
||||||
export AWS_ENDPOINT_URL=http://localhost:9000
|
|
||||||
export RUST_LOG="s3s_e2e=debug,s3s_test=info,s3s=debug"
|
|
||||||
export RUST_BACKTRACE=full
|
|
||||||
s3s-e2e
|
|
||||||
sudo killall rustfs-debug
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: s3s-e2e.logs
|
name: s3s-e2e.logs
|
||||||
path: /tmp/rustfs.log
|
path: /tmp/rustfs.log
|
||||||
|
|
||||||
# mint:
|
|
||||||
# name: E2E (mint)
|
|
||||||
# needs:
|
|
||||||
# - skip-check
|
|
||||||
# - develop
|
|
||||||
# if: needs.skip-check.outputs.should_skip != 'true'
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v4
|
|
||||||
# - uses: ./.github/actions/setup
|
|
||||||
# with:
|
|
||||||
# cache-shared-key: "develop"
|
|
||||||
# cache-save-if: false
|
|
||||||
|
|
||||||
# - uses: actions/download-artifact@v4
|
|
||||||
# with:
|
|
||||||
# name: rustfs
|
|
||||||
# path: ./target/artifacts
|
|
||||||
|
|
||||||
# - name: Run rustfs
|
|
||||||
# run: |
|
|
||||||
# ./scripts/e2e-run.sh ./target/artifacts/rustfs-release /data/rustfs
|
|
||||||
# sleep 10
|
|
||||||
|
|
||||||
# - name: Run mint
|
|
||||||
# timeout-minutes: 10
|
|
||||||
# run: |
|
|
||||||
# docker run \
|
|
||||||
# -e "SERVER_ENDPOINT=localhost:9000" \
|
|
||||||
# -e "ACCESS_KEY=rustfsadmin" \
|
|
||||||
# -e "SECRET_KEY=rustfsadmin" \
|
|
||||||
# -e "ENABLE_HTTPS=0" \
|
|
||||||
# --network host \
|
|
||||||
# minio/mint:edge
|
|
||||||
# sudo killall rustfs-release
|
|
||||||
|
|
||||||
# - uses: actions/upload-artifact@v4
|
|
||||||
# with:
|
|
||||||
# name: mint.logs
|
|
||||||
# path: /tmp/rustfs.log
|
|
||||||
|
|||||||
+13
-2
@@ -3,9 +3,20 @@ BIN=$1
|
|||||||
VOLUME=$2
|
VOLUME=$2
|
||||||
|
|
||||||
chmod +x $BIN
|
chmod +x $BIN
|
||||||
sudo mkdir -p $VOLUME
|
mkdir -p $VOLUME
|
||||||
|
|
||||||
export RUST_LOG="rustfs=debug,ecstore=debug,s3s=debug,iam=debug"
|
export RUST_LOG="rustfs=debug,ecstore=debug,s3s=debug,iam=debug"
|
||||||
export RUST_BACKTRACE=full
|
export RUST_BACKTRACE=full
|
||||||
|
$BIN $VOLUME > /tmp/rustfs.log 2>&1 &
|
||||||
|
|
||||||
sudo nohup $BIN $VOLUME > /tmp/rustfs.log 2>&1 &
|
sleep 10
|
||||||
|
|
||||||
|
export AWS_ACCESS_KEY_ID=rustfsadmin
|
||||||
|
export AWS_SECRET_ACCESS_KEY=rustfsadmin
|
||||||
|
export AWS_REGION=us-east-1
|
||||||
|
export AWS_ENDPOINT_URL=http://localhost:9000
|
||||||
|
export RUST_LOG="s3s_e2e=debug,s3s_test=info,s3s=debug"
|
||||||
|
export RUST_BACKTRACE=full
|
||||||
|
s3s-e2e
|
||||||
|
|
||||||
|
killall $BIN
|
||||||
|
|||||||
Reference in New Issue
Block a user