-
Notifications
You must be signed in to change notification settings - Fork 32
/
.drone.yml
77 lines (75 loc) · 2.04 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
kind: pipeline
type: docker
name: NickelMenu
trigger:
event: [push, pull_request, tag]
steps:
- name: submodules
image: ghcr.io/pgaskin/nickeltc:1.0
when:
event: [push, pull_request, tag]
command: ["git", "submodule", "update", "--init", "--recursive"]
- name: build
image: ghcr.io/pgaskin/nickeltc:1.0
when:
event: [push, pull_request, tag]
commands:
- make clean
- make all koboroot
- mkdir out && mv KoboRoot.tgz src/libnm.so out/
depends_on: [submodules]
- name: build-NM_UNINSTALL_CONFIGDIR
image: ghcr.io/pgaskin/nickeltc:1.0
when:
event: [push, pull_request, tag]
commands:
- make clean
- make all koboroot NM_UNINSTALL_CONFIGDIR=1
- mkdir out/with-NM_UNINSTALL_CONFIGDIR && mv KoboRoot.tgz src/libnm.so out/with-NM_UNINSTALL_CONFIGDIR/
depends_on: [build]
- name: test-syms
image: golang:1.14
when:
event: [push, pull_request, tag]
commands:
- cd test/syms && go build -o ../../test.syms . && cd ../..
- cd src && ../test.syms && cd ..
- name: upload-build
image: plugins/s3
when:
event: [push]
settings:
endpoint: https://s3.geek1011.net
bucket: nickelmenu
access_key: nickelmenu
secret_key: {from_secret: S3_SECRET_NICKELMENU}
target: artifacts/build/${DRONE_BUILD_NUMBER}
source: out/**/*
strip_prefix: out/
depends_on: [build, build-NM_UNINSTALL_CONFIGDIR]
- name: upload-tag
image: plugins/s3
when:
event: [tag]
settings:
endpoint: https://s3.geek1011.net
bucket: nickelmenu
access_key: nickelmenu
secret_key: {from_secret: S3_SECRET_NICKELMENU}
target: artifacts/tag/${DRONE_TAG}
source: out/**/*
strip_prefix: out/
depends_on: [build, build-NM_UNINSTALL_CONFIGDIR]
- name: upload-commit
image: plugins/s3
when:
event: [push]
settings:
endpoint: https://s3.geek1011.net
bucket: nickelmenu
access_key: nickelmenu
secret_key: {from_secret: S3_SECRET_NICKELMENU}
target: artifacts/commit/${DRONE_COMMIT}
source: out/**/*
strip_prefix: out/
depends_on: [build, build-NM_UNINSTALL_CONFIGDIR]