-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
91 lines (83 loc) · 4.3 KB
/
Makefile
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
build:
docker build -t probes/ubuntu_2204 -f docker/ubuntu_2204/Dockerfile .
build-all:
docker build -t probes/centos_8 -f docker/centos_8/Dockerfile .
docker build -t probes/fedora_31 -f docker/fedora_31/Dockerfile .
docker build -t probes/ubuntu_1404 -f docker/ubuntu_1404/Dockerfile .
docker build -t probes/ubuntu_1604 -f docker/ubuntu_1604/Dockerfile .
docker build -t probes/ubuntu_1804 -f docker/ubuntu_1804/Dockerfile .
docker build -t probes/ubuntu_2004 -f docker/ubuntu_2004/Dockerfile .
docker build -t probes/ubuntu_2204 -f docker/ubuntu_2204/Dockerfile .
check:
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/ubuntu_2204:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/ubuntu_2204 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo check"
test:
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/ubuntu_2204:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/ubuntu_2204 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo test"
publish:
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/ubuntu_2204:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -it probes/ubuntu_2204 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo login; cargo publish"
test-all:
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/centos_8:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/centos_8 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo test"
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/fedora_31:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/fedora_31 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo test"
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/ubuntu_1404:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/ubuntu_1404 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo test"
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/ubuntu_1604:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/ubuntu_1604 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo test"
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/ubuntu_1804:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/ubuntu_1804 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo test"
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/ubuntu_2004:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/ubuntu_2004 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo test"
docker run --rm \
-v $(PWD)/tmp/.cargo/registry/cache/ubuntu_2204:/root/.cargo/registry/cache \
-v $(PWD)/tmp/.cargo/registry/index:/root/.cargo/registry/index \
-v $(PWD)/tmp/.cargo/registry/src:/root/.cargo/registry/src \
-v $(PWD):/probes -t probes/ubuntu_2204 \
/bin/bash -c "source /root/.cargo/env; cd /probes; cargo test"
test-cgroups-v1:
vagrant up cgroups_v1
vagrant ssh cgroups_v1 -c "cd /vagrant; sudo -E make build test"
test-cgroups-v2:
vagrant up cgroups_v2
vagrant ssh cgroups_v2 -c "cd /vagrant; sudo -E make build test"
test-cgroups: test-cgroups-v1 test-cgroups-v2
@echo ''
@echo 'Done! If desired, run `vagrant halt` to stop the machines, or `vagrant destroy -f` to destroy them.'