-
Notifications
You must be signed in to change notification settings - Fork 0
/
.woodpecker.yml
81 lines (78 loc) · 2.27 KB
/
.woodpecker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
steps:
test:
group: test
image: ${IMAGE}
environment:
- CARGO_TERM_COLOR=always
- CARGO_BUILD_TARGET=${TARGET}
commands:
- ${PACKAGE_MANAGER} update
- ${PACKAGE_MANAGER} ${INSTALL_CMD} -q ${PACKAGE}
- rustup default stable
- rustup target add ${TARGET}
- rustup component add clippy
- cargo test --bin file-rs
- cargo clippy
build:
group: build
image: ${IMAGE}
when:
event: tag
environment:
- CARGO_TERM_COLOR=always
- CARGO_BUILD_TARGET=${TARGET}
commands:
- ${PACKAGE_MANAGER} update
- ${PACKAGE_MANAGER} ${INSTALL_CMD} -q ${PACKAGE}
- rustup default stable
- rustup target add ${TARGET}
- cargo build --profile optimized
- tar -zcvf file-rs-${TARGET}.tar.gz target/${TARGET}/optimized/file-rs
publish:
group: publish
image: woodpeckerci/plugin-gitea-release
when:
event: tag
settings:
base_url: https://codeberg.org
files:
- "file-rs-${TARGET}.tar.gz"
file-exists: overwrite
api_key:
from_secret: CODEBERG_ACCESS_TOKEN
target: main
title: file-rs
skip_verify: true
## only x86_64-unknown-linux-{musl, gnu} is enable for now
matrix:
include:
## musl
- IMAGE: rust:alpine
TARGET: x86_64-unknown-linux-musl
PACKAGE_MANAGER: apk
INSTALL_CMD: add
PACKAGE: musl-dev
# - IMAGE: rust:alpine
# TARGET: aarch64-unknown-linux-musl
# PACKAGE_MANAGER: apk
# INSTALL_CMD: add
# PACKAGE: "gcc-aarch64-none-elf musl-dev binutils-aarch64"
# CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-none-elf-gcc
## gnu/glibc
- IMAGE: rust:latest
TARGET: x86_64-unknown-linux-gnu
PACKAGE_MANAGER: apt
INSTALL_CMD: install
PACKAGE: gcc
# - IMAGE: rust:latest
# TARGET: aarch64-unknown-linux-gnu
# PACKAGE_MANAGER: apt
# INSTALL_CMD: "install -y"
# PACKAGE: "gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu"
# CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
# - TARGET: x86_64-pc-windows-gnu
# IMAGE: rust:latest
# PACKAGE: windows/amd64
# - TARGET: x86_64-pc-windows-msvc
# IMAGE: rust:latest
# PACKAGE: windows/amd64