-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
97 lines (87 loc) · 2.44 KB
/
.drone.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
kind: pipeline
type: docker
name: default
steps:
- name: build-shared
image: arminfriedl/xwim-build:shared
commands:
- meson wrap install gtest || true
- meson target/shared
- ninja -C target/shared
- mv target/shared/src/xwim xwim-x86_64-glibc-linux-shared
- name: build-static
image: arminfriedl/xwim-build:static
commands:
- meson wrap install gtest || true
- meson --default-library=static target/static
- ninja -C target/static
- mv target/static/src/xwim xwim-x86_64-musl-linux-static
- name: publish-binaries
image: appleboy/drone-scp
settings:
host: friedl.net
username:
from_secret: deploy_user
password:
from_secret: deploy_password
port: 22
target: /var/services/dirlist/repo/cicd/xwim/${DRONE_COMMIT_SHA:0:8}/
source:
- xwim-x86_64-glibc-linux-shared
- xwim-x86_64-musl-linux-static
depends_on:
- build-shared
- build-static
trigger:
event:
exclude:
- tag
---
kind: pipeline
type: docker
name: release
steps:
- name: build-shared
image: arminfriedl/xwim-build:shared
commands:
- meson wrap install gtest || true
- meson --buildtype=release target/shared
- ninja -C target/shared
- strip target/shared/src/xwim
- mkdir xwim-${DRONE_TAG}-x86_64-glibc-linux-shared
- mv target/shared/src/xwim xwim-${DRONE_TAG}-x86_64-glibc-linux-shared
- name: build-static
image: arminfriedl/xwim-build:static
commands:
- meson wrap install gtest || true
- meson --buildtype=release --default-library=static target/static
- ninja -C target/static
- strip target/static/src/xwim
- mkdir xwim-${DRONE_TAG}-x86_64-musl-linux-static
- mv target/static/src/xwim xwim-${DRONE_TAG}-x86_64-musl-linux-static
- name: package
image: arminfriedl/xwim-build
commands:
- tar czf xwim-${DRONE_TAG}-x86_64-glibc-linux-shared.tar.gz xwim-${DRONE_TAG}-x86_64-glibc-linux-shared/xwim
- tar czf xwim-${DRONE_TAG}-x86_64-musl-linux-static.tar.gz xwim-${DRONE_TAG}-x86_64-musl-linux-static/xwim
depends_on:
- build-shared
- build-static
- name: publish
image: plugins/gitea-release
settings:
base_url: https://git.friedl.net
api_key:
from_secret: gitea_token
files:
- xwim-${DRONE_TAG}-x86_64-glibc-linux-shared.tar.gz
- xwim-${DRONE_TAG}-x86_64-musl-linux-static.tar.gz
title: xwim ${DRONE_TAG}
checksum:
- md5
- sha256
depends_on:
- package
trigger:
event:
- tag