67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
pipeline:
|
|
build:
|
|
image: rust
|
|
commands:
|
|
- apt-get update
|
|
- apt-get install -y libdbus-1-dev --no-install-recommends
|
|
- cargo build
|
|
when:
|
|
event: push
|
|
|
|
test:
|
|
image: rust
|
|
commands:
|
|
- apt-get update
|
|
- apt-get install -y libdbus-1-dev --no-install-recommends
|
|
- cargo test
|
|
when:
|
|
event: push
|
|
|
|
build-release-x86_64:
|
|
image: rust
|
|
commands:
|
|
- dpkg --add-architecture amd64
|
|
- apt-get update
|
|
- apt-get install -y crossbuild-essential-amd64 libdbus-1-dev:amd64 --no-install-recommends
|
|
- rustup target add x86_64-unknown-linux-gnu
|
|
- PKG_CONFIG=x86_64-linux-gnu-pkg-config CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc cargo build --release --target x86_64-unknown-linux-gnu
|
|
- mv target/x86_64-unknown-linux-gnu/release/alma alma-x86_64
|
|
when:
|
|
event: tag
|
|
|
|
build-release-arm:
|
|
image: rust
|
|
commands:
|
|
- dpkg --add-architecture armel
|
|
- apt-get update
|
|
- apt-get install -y crossbuild-essential-armel libdbus-1-dev:armel libdbus-1-3:armel --no-install-recommends
|
|
- rustup target add arm-unknown-linux-gnueabi
|
|
- PKG_CONFIG=arm-linux-gnueabi-pkg-config CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc cargo build --release --target arm-unknown-linux-gnueabi
|
|
- mv target/arm-unknown-linux-gnueabi/release/alma alma-arm
|
|
when:
|
|
event: tag
|
|
|
|
build-release-aarch64:
|
|
image: rust
|
|
commands:
|
|
- dpkg --add-architecture arm64
|
|
- apt-get update
|
|
- apt-get install -y crossbuild-essential-arm64 libdbus-1-dev:arm64 --no-install-recommends
|
|
- rustup target add aarch64-unknown-linux-gnu
|
|
- PKG_CONFIG=aarch64-linux-gnu-pkg-config CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc cargo build --release --target aarch64-unknown-linux-gnu
|
|
- mv target/aarch64-unknown-linux-gnu/release/alma alma-aarch64
|
|
when:
|
|
event: tag
|
|
|
|
publish:
|
|
image: plugins/gitea-release
|
|
settings:
|
|
api_key:
|
|
from_secret: release_token
|
|
base_url: https://git.spaeth.biz/
|
|
files:
|
|
- alma-x86_64
|
|
- alma-aarch64
|
|
- alma-arm
|
|
when:
|
|
event: tag |