-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
118 lines (112 loc) · 3.42 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
kind: pipeline
type: docker
name: from-source-amd64
platform:
os: linux
arch: amd64
environment:
GOPROXY: direct
GOARCH: amd64
GOAMD64: v3
GOOS: linux
GOTRACEBACK: 2
GOEXPERIMENT: "cgocheck2,newinliner"
CFLAGS: "-march=native -Ofast"
LDFLAGS: "-flto"
PKG_CONFIG_PATH: "/drone/src/build_deps/lib/pkgconfig"
LD_LIBRARY_PATH: "/drone/src/build_deps/lib"
CGO_CFLAGS: "-I/drone/src/build_deps/include"
CGO_LDFLAGS: "-L/drone/src/build_deps/lib"
workspace:
path: /drone/src
steps:
- name: init-tests
image: alpine
commands:
- apk add --no-cache curl gzip bash
- ./testdata/setup.sh
- name: build-sources
image: alpine
commands:
- apk update
- apk add --no-cache git gcc g++ musl-dev bash autoconf automake cmake make libtool
- cd /tmp
- git clone --depth 1 --branch v1.2.1 https://github.com/tevador/RandomX.git && cd RandomX && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH=/drone/src/build_deps && make -j$(nproc) && make install && cd ../..
- name: go-generate
image: golang:1.22-alpine3.19
commands:
- apk update
- apk add --no-cache git
- go run github.com/valyala/quicktemplate/[email protected]
- name: test-cgo
image: golang:1.22-alpine3.19
depends_on:
- init-tests
- build-sources
- go-generate
environment:
MONEROD_RPC_URL:
from_secret: MONEROD_RPC_URL
MONEROD_ZMQ_URL:
from_secret: MONEROD_ZMQ_URL
commands:
- apk update
- apk add --no-cache git gcc g++ musl-dev pkgconfig
- go list -f '{{.Dir}}/...' -m | xargs -n 1 sh -c 'go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v $0 || exit 255'
---
kind: pipeline
type: docker
name: from-source-arm64
platform:
os: linux
arch: arm64
environment:
GOPROXY: direct
GOARCH: arm64
GOOS: linux
GOTRACEBACK: 2
GOEXPERIMENT: "cgocheck2,newinliner"
CFLAGS: "-march=native -Ofast"
LDFLAGS: "-flto"
PKG_CONFIG_PATH: "/drone/src/build_deps/lib/pkgconfig"
LD_LIBRARY_PATH: "/drone/src/build_deps/lib"
CGO_CFLAGS: "-I/drone/src/build_deps/include"
CGO_LDFLAGS: "-L/drone/src/build_deps/lib"
workspace:
path: /drone/src
steps:
- name: init-tests
image: alpine
commands:
- apk add --no-cache curl gzip bash
- ./testdata/setup.sh
- name: build-sources
image: alpine
commands:
- apk update
- apk add --no-cache git gcc g++ musl-dev bash autoconf automake cmake make libtool
- cd /tmp
- git clone --depth 1 --branch v1.2.1 https://github.com/tevador/RandomX.git && cd RandomX && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH=/drone/src/build_deps && make -j$(nproc) && make install && cd ../..
- name: go-generate
image: golang:1.22-alpine3.19
commands:
- apk update
- apk add --no-cache git
- go run github.com/valyala/quicktemplate/[email protected]
- name: test-cgo
image: golang:1.22-alpine3.19
depends_on:
- init-tests
- build-sources
- go-generate
environment:
MONEROD_RPC_URL:
from_secret: MONEROD_RPC_URL
MONEROD_ZMQ_URL:
from_secret: MONEROD_ZMQ_URL
commands:
- apk update
- apk add --no-cache git gcc g++ musl-dev pkgconfig
- go list -f '{{.Dir}}/...' -m | xargs -n 1 sh -c 'go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v $0 || exit 255'
...