-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (49 loc) · 1.39 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
DEFAULT_GOAL := "all"
.PHONY: all
all: lint test build
.PHONY: run
run: build
cargo run -- up
.PHONY: build
build: install-deps
cargo build
.PHONY: test
test:
cargo test
.PHONY: install
install:
rm -vf target/debian/innisfree*.deb
$(MAKE) deb
sudo dpkg -i target/debian/innisfree*.deb
.PHONY: lint
lint:
cargo fmt -- --check
cargo clippy
.PHONY: clean
clean:
cargo clean
git clean -fdX
.PHONY: deb
deb:
cargo deb
.PHONY: install-deps
install-deps:
sudo apt install -y musl-tools libcap2-bin lld
cargo deb --version || cargo install cargo-deb
.PHONY: ci
ci: install-deps lint test
cargo build --release
$(MAKE) deb
.PHONY: reprotest
reprotest: install-deps
reprotest \
--variations "-kernel, -user_group, -domain_host, -home" \
--min-cpus=99999 --auto-build -c ". $$HOME/.cargo/env && . ./.env && unset LD_PRELOAD && rustup default stable && cargo build --release" . "target/release/innisfree"
.PHONY: reprotest-deb
# export SOURCE_DATE_EPOCH="$(dpkg-parsechangelog -STimestamp)"
reprotest-deb:
echo "doesn't work yet, since cargo-deb has no support for 'SOURCE_DATE_EPOCH'"
echo "two variations are prominent: timestamp metadata, and ordering of the 'Depends' field values."
reprotest \
--variations "-kernel, -user_group, -domain_host, -home" \
--min-cpus=99999 --auto-build -c ". $HOME/.cargo/env && unset LD_PRELOAD && rustup default stable && make deb" . "target/debian/*.deb"