-
Notifications
You must be signed in to change notification settings - Fork 0
/
.woodpecker.yml
64 lines (61 loc) · 1.57 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
steps:
check:
group: check
image: ${IMAGE}
environment:
- CARGO_TERM_COLOR=always
- CARGO_BUILD_TARGET=${TARGET}
commands:
- ${PACKAGE_MANAGER} update
- ${PACKAGE_MANAGER} ${INSTALL_CMD} -q ${PACKAGE}
- rustup default nightly
- rustup target add ${TARGET}
- rustup component add clippy
- cargo check
- 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 nightly
- rustup target add ${TARGET}
- cargo build --profile optimized
- tar -zcvf hc-rs-${TARGET}.tar.gz target/${TARGET}/optimized/hc-rs
- target/${TARGET}/optimized/hc-rs -r -i -o hosts-$(date '+%d-%m-%Y')
publish:
group: publish
image: woodpeckerci/plugin-gitea-release
when:
event: tag
settings:
base_url: https://codeberg.org
files:
- "hc-rs-${TARGET}.tar.gz"
- "hosts-*"
file-exists: overwrite
api_key:
from_secret: CODEBERG_ACCESS_TOKEN
target: main
title: file-rs
skip_verify: true
matrix:
include:
## musl
- IMAGE: rust:alpine
TARGET: x86_64-unknown-linux-musl
PACKAGE_MANAGER: apk
INSTALL_CMD: add
PACKAGE: musl-dev
## gnu/glibc
- IMAGE: rust:latest
TARGET: x86_64-unknown-linux-gnu
PACKAGE_MANAGER: apt
INSTALL_CMD: install
PACKAGE: gcc