From df0fb73ea4e9f8ba20b37fb50136eaed35da5af7 Mon Sep 17 00:00:00 2001 From: mirschao <119988085+mirschao@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:03:48 +0800 Subject: [PATCH] Update mint.yml --- .github/workflows/mint.yml | 75 +++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/.github/workflows/mint.yml b/.github/workflows/mint.yml index 49cecbb6..75e45666 100644 --- a/.github/workflows/mint.yml +++ b/.github/workflows/mint.yml @@ -15,49 +15,48 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 30 steps: - - name: get hostip - run: ifconfig - # - name: install protoc - # run: | - # wget https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-x86_64.zip - # unzip protoc-27.0-linux-x86_64.zip -d protoc3 - # mv protoc3/bin/* /usr/local/bin/ - # chmod +x /usr/local/bin/protoc - # rm -rf protoc-27.0-linux-x86_64.zip protoc3 + - name: install protoc + run: | + wget https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-x86_64.zip + unzip protoc-27.0-linux-x86_64.zip -d protoc3 + mv protoc3/bin/* /usr/local/bin/ + chmod +x /usr/local/bin/protoc + rm -rf protoc-27.0-linux-x86_64.zip protoc3 - # - name: install flatc - # run: | - # wget https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.g++-13.zip - # unzip Linux.flatc.binary.g++-13.zip - # mv flatc /usr/local/bin/ - # chmod +x /usr/local/bin/flatc - # rm -rf Linux.flatc.binary.g++-13.zip + - name: install flatc + run: | + wget https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.g++-13.zip + unzip Linux.flatc.binary.g++-13.zip + mv flatc /usr/local/bin/ + chmod +x /usr/local/bin/flatc + rm -rf Linux.flatc.binary.g++-13.zip - # - name: checkout source code - # uses: actions/checkout@v4 + - name: checkout source code + uses: actions/checkout@v4 - # - name: rust-toolchain - # uses: actions-rs/toolchain@v1.0.6 - # with: - # toolchain: stable + - name: rust-toolchain + uses: actions-rs/toolchain@v1.0.6 + with: + toolchain: stable - # - name: cache rust dependencies - # uses: Swatinem/rust-cache@v2 + - name: cache rust dependencies + uses: Swatinem/rust-cache@v2 - # - name: cargo build & release - # run: cargo build --release + - name: cargo build & release + run: cargo build --release - # - name: run this rustfs server - # run: | - # sudo mkdir -p /data/rustfs - # sudo nohup ./target/release/rustfs /data/rustfs & + - name: run this rustfs server + run: | + sudo mkdir -p /data/rustfs + sudo nohup ./target/release/rustfs /data/rustfs & - # - name: run mint test task - # run: | - # ps aux | grep rustfs - # docker run -e SERVER_ENDPOINT=localhost:9000 \ - # -e ACCESS_KEY=rustfsadmin \ - # -e SECRET_KEY=rustfsadmin \ - # -e ENABLE_HTTPS=0 \ - # minio/mint + - name: run mint test task + run: | + ps aux | grep rustfs + SERVER_ADDRESS=$(ifconfig eth0 | awk 'NR==2 { print $2 }') + docker run -e SERVER_ENDPOINT=${SERVER_ADDRESS}:9000 \ + -e ACCESS_KEY=rustfsadmin \ + -e SECRET_KEY=rustfsadmin \ + -e ENABLE_HTTPS=0 \ + minio/mint