-
Notifications
You must be signed in to change notification settings - Fork 17
/
Taskfile.yml
96 lines (82 loc) · 2.21 KB
/
Taskfile.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
# https://taskfile.dev
# to install `go install github.com/go-task/task/v3/cmd/task@latest`
version: "3"
interval: 200ms
vars:
NAME: "nex"
tasks:
agent:
dir: agent/cmd/nex-agent
sources:
- "*.go"
cmds:
- go build -tags netgo -ldflags '-extldflags "-static"'
clean:
cmds:
- rm -f nex/nex
- rm -f rootfs.ext4.gz
- sudo killall -9 nex || true
- sudo killall -9 nex-agent || true
- sudo killall -9 firecracker || true
- sudo rm -rf /opt/cni/bin/*
- sudo rm -rf /var/lib/cni/*
- sudo rm -rf /etc/cni/conf.d/*
- sudo rm -f /tmp/rootfs-*
- sudo rm -f /tmp/.firecracker.*
- sudo rm -rf /tmp/pnats
- sudo rm -f /tmp/*.js
- sudo rm -rf /tmp/*-spec
- sudo rm -rf /tmp/*-spec-nex-conf.json
- sudo rm -rf /tmp/*-spec-nex-wd
- sudo rm -rf /tmp/rootfs-*.ext4
- sudo rm -rf /tmp/*-rootfs.ext4
- sudo rm -rf /tmp/workload-*
- sudo rm -rf /tmp/*-non-existent-nex-resource-dir
nex:
dir: nex
sources:
- "*.go"
cmds:
- go build -tags netgo,debug -ldflags '-extldflags "-static"'
rootfs:
dir: nex
sources:
- "*.go"
cmds:
- sudo ./nex fs --agent ../agent/cmd/nex-agent/nex-agent
- gunzip rootfs.ext4.gz
deps:
[agent, nex]
noop-workload-provider:
dir: examples/workload_provider_plugins/noop
sources:
- "*.go"
cmds:
- go build -buildmode=plugin
echo-service:
dir: examples/echoservice
sources:
- "*.go"
cmds:
- go build -tags netgo -ldflags '-extldflags "-static"'
unit-test:
deps: [clean]
cmds:
- go test $(go list ./... | grep -v spec)
test:
deps: [clean, agent]
cmds:
- sudo go run github.com/onsi/ginkgo/v2/ginkgo -r --randomize-all --randomize-suites --vv --trace --keep-going ./spec #--cover --coverprofile=.coverage-report.out
- mv spec _spec
- go test -tags netgo -ldflags '-extldflags "-static"'-v -race ./...
- mv _spec spec
otel_start:
dir: _scripts/otel
cmds:
- docker compose up -d
otel_stop:
dir: _scripts/otel
cmds:
- docker compose down
build:
deps: [agent, nex, echo-service]