mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-04 11:15:39 +00:00
feat: add remote file download, extraction, and packaging process in build.yml (#245)
* fix * update README.md
This commit is contained in:
@@ -32,10 +32,70 @@ jobs:
|
|||||||
--target ${{ matrix.variant.target }} \
|
--target ${{ matrix.variant.target }} \
|
||||||
--glibc ${{ matrix.variant.glibc }}
|
--glibc ${{ matrix.variant.glibc }}
|
||||||
|
|
||||||
|
# Download the zip file(Linux/macOS used bash)
|
||||||
|
- name: Download Static Assets (Linux/macOS)
|
||||||
|
run: |
|
||||||
|
url="https://dl.rustfs.com/console/rustfs-console-latest.zip"
|
||||||
|
file=$(basename "$url")
|
||||||
|
curl -L -o "$file" "$url"
|
||||||
|
if [ ! -f "$file" ]; then
|
||||||
|
echo "Error: Failed to download $file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Downloaded $file successfully"
|
||||||
|
ls -l "$file"
|
||||||
|
ls -la
|
||||||
|
|
||||||
|
# Unzip the zip file(Linux/macOS used bash)
|
||||||
|
- name: Extract Static Assets (Linux/macOS)
|
||||||
|
run: |
|
||||||
|
ls -la
|
||||||
|
# Find the first .zip or .tar.gz file
|
||||||
|
file=""
|
||||||
|
for f in *.zip *.tar.gz; do
|
||||||
|
if [ -f "$f" ]; then
|
||||||
|
file="$f"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -z "$file" ]; then
|
||||||
|
echo "Error: No .zip or .tar.gz file found in the current directory"
|
||||||
|
ls -la # Displays the contents of the current directory for debugging
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Outputs the name of the file found
|
||||||
|
echo "Found file: $file"
|
||||||
|
mkdir -p static
|
||||||
|
if [[ "$file" == *.zip ]]; then
|
||||||
|
echo "Unzipping $file to static/"
|
||||||
|
unzip "$file" -d static || { echo "Error: Failed to unzip $file"; exit 1; }
|
||||||
|
elif [[ "$file" == *.tar.gz ]]; then
|
||||||
|
echo "Extracting $file to static/"
|
||||||
|
tar -xzf "$file" -C static || { echo "Error: Failed to extract $file"; exit 1; }
|
||||||
|
else
|
||||||
|
echo "Error: Unsupported file format: $file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Check whether the decompression is successful
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error: Failed to extract $file"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
rm "$file"
|
||||||
|
ls -la static
|
||||||
|
# Packing binaries and static directory(Linux/macOS used bash)
|
||||||
|
- name: Package Binary and Static Assets (Linux/macOS)
|
||||||
|
run: |
|
||||||
|
mkdir -p release-package
|
||||||
|
cp target/artifacts/rustfs.${{ matrix.variant.profile }}.${{ matrix.variant.target }}.${{ matrix.variant.glibc }} release-package/
|
||||||
|
cp -r static release-package/
|
||||||
|
zip -r rustfs${{ matrix.variant.profile }}-${{ matrix.variant.target }}-${{ matrix.variant.glibc }}.zip release-package/*
|
||||||
|
ls -la
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: rustfs.${{ matrix.variant.profile }}.${{ matrix.variant.target }}.${{ matrix.variant.glibc }}
|
name: rustfs.${{ matrix.variant.profile }}.${{ matrix.variant.target }}.${{ matrix.variant.glibc }}
|
||||||
path: ./target/artifacts/*
|
path: ./release-package/rustfs.${{ matrix.variant.profile }}.${{ matrix.variant.target }}.${{ matrix.variant.glibc }}.zip
|
||||||
|
|
||||||
merge:
|
merge:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
# How to compile RustFS
|
# How to compile RustFS
|
||||||
|
|
||||||
| Must package | Version |
|
| Must package | Version |
|
||||||
| - | - |
|
|--------------|---------|
|
||||||
| Rust | 1.8.5 |
|
| Rust | 1.8.5 |
|
||||||
| protoc | 27.0 |
|
| protoc | 27.0 |
|
||||||
| flatc | 24.0+ |
|
| flatc | 24.0+ |
|
||||||
|
|
||||||
|
|
||||||
Download Links:
|
Download Links:
|
||||||
|
|
||||||
https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.g++-13.zip
|
https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.g++-13.zip
|
||||||
|
|
||||||
https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-x86_64.zip
|
https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-x86_64.zip
|
||||||
|
|
||||||
Or use Docker:
|
Or use Docker:
|
||||||
@@ -21,8 +22,6 @@ Or use Docker:
|
|||||||
with:
|
with:
|
||||||
version: "24.3.25"
|
version: "24.3.25"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# How to add Console web
|
# How to add Console web
|
||||||
|
|
||||||
1. wget [http://dl.rustfs.com/console/console.latest.tar.gz](https://dl.rustfs.com/console/rustfs-console-latest.zip)
|
1. wget [http://dl.rustfs.com/console/console.latest.tar.gz](https://dl.rustfs.com/console/rustfs-console-latest.zip)
|
||||||
@@ -31,7 +30,6 @@ Or use Docker:
|
|||||||
|
|
||||||
3. Compile RustFS
|
3. Compile RustFS
|
||||||
|
|
||||||
|
|
||||||
# Star RustFS
|
# Star RustFS
|
||||||
|
|
||||||
Add Env infomation:
|
Add Env infomation:
|
||||||
@@ -46,6 +44,7 @@ export RUSTFS_SERVER_ENDPOINT="http://127.0.0.1:9000"
|
|||||||
```
|
```
|
||||||
|
|
||||||
You need replace your real data folder:
|
You need replace your real data folder:
|
||||||
|
|
||||||
```
|
```
|
||||||
./rustfs /data/rustfs
|
./rustfs /data/rustfs
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user