ci: build for old glibc (#232)

* build(deps): shadow_rs

* ci(build): build for old glibc

* ci: simplify all
This commit is contained in:
Nugine
2025-02-22 20:25:16 +08:00
committed by GitHub
parent 2030ad946e
commit e87cc87cbf
10 changed files with 184 additions and 204 deletions

View File

@@ -21,7 +21,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-audit
- uses: taiki-e/install-action@cargo-audit
- run: cargo audit -D warnings

View File

@@ -12,33 +12,36 @@ jobs:
build-rustfs:
runs-on: ubuntu-latest
strategy:
matrix:
variant:
- { profile: dev, target: x86_64-unknown-linux-gnu, glibc: "default" }
- { profile: release, target: x86_64-unknown-linux-gnu, glibc: "default" }
- { profile: release, target: x86_64-unknown-linux-gnu, glibc: "2.31" }
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: arduino/setup-protoc@v3
- uses: ./.github/actions/setup
with:
version: "27.0"
cache-shared-key: rustfs.${{ matrix.variant.profile }}.${{ matrix.variant.target }}.${{ matrix.variant.glibc }}
- uses: Nugine/setup-flatc@v1
with:
version: "24.3.25"
- name: Build binaries
- name: Build
run: |
touch rustfs/build.rs
cargo build -p rustfs --bins
touch rustfs/build.rs
cargo build -p rustfs --bins --release
mkdir -p target/artifacts
mv ./target/debug/rustfs ./target/artifacts/rustfs.debug.x86_64-unknown-linux-gnu
mv ./target/release/rustfs ./target/artifacts/rustfs.release.x86_64-unknown-linux-gnu
./scripts/build.py \
--profile ${{ matrix.variant.profile }} \
--target ${{ matrix.variant.target }} \
--glibc ${{ matrix.variant.glibc }}
- uses: actions/upload-artifact@v4
with:
name: rustfs
name: rustfs.${{ matrix.variant.profile }}.${{ matrix.variant.target }}.${{ matrix.variant.glibc }}
path: ./target/artifacts/*
merge:
runs-on: ubuntu-latest
needs: build-rustfs
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: rustfs
delete-merged: true

View File

@@ -37,33 +37,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y \
libdbus-1-dev \
libwayland-dev \
libwebkit2gtk-4.1-dev \
libxdo-dev
- uses: arduino/setup-protoc@v3
with:
version: "27.0"
- uses: Nugine/setup-flatc@v1
with:
version: "24.3.25"
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: "develop"
- uses: ./.github/actions/setup
- name: Format
run: cargo fmt --all --check

View File

@@ -37,14 +37,7 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: arduino/setup-protoc@v3
with:
version: "27.0"
- uses: Nugine/setup-flatc@v1
with:
version: "24.3.25"
- uses: ./.github/actions/setup
- name: Build binaries
run: |
@@ -53,7 +46,11 @@ jobs:
- name: Install s3s-e2e
run: |
cargo install s3s-e2e --git https://github.com/Nugine/s3s.git
mkdir -p target/s3s-e2e
cargo install s3s-e2e \
--git https://github.com/Nugine/s3s.git \
--target-dir target/s3s-e2e \
--force
s3s-e2e --version
- name: Run tests
@@ -70,7 +67,35 @@ jobs:
export RUST_BACKTRACE=full
s3s-e2e
killall rustfs
mint:
needs: skip-check
if: needs.skip-check.outputs.should_skip != 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Build binaries
run: |
touch rustfs/build.rs
cargo build -p rustfs --bins --release
- 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
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
### Temporarily disabled because it is not working
# e2e:
# # See this url if required matrix jobs are hanging

View File

@@ -1,62 +0,0 @@
name: mint-test
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
mintest:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- 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: checkout source code
uses: actions/checkout@v4
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
- name: cache rust dependencies
uses: Swatinem/rust-cache@v2
- 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 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