Files
rustfs/.github/workflows/build.yml
2024-11-09 15:23:51 +08:00

45 lines
1.0 KiB
YAML

name: Build
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # at midnight of each sunday
push:
branches:
- main
jobs:
build-rustfs:
runs-on: ubuntu-latest
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"
- name: Build binaries
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
- uses: actions/upload-artifact@v4
with:
name: rustfs
path: ./target/artifacts/*