-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (29 loc) · 904 Bytes
/
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
STRIP := "-C link-arg=-s"
check::
cargo clippy --workspace -- -D warnings
cargo fmt --all
check-enforce::
cargo clippy --workspace -- -D warnings
cargo fmt --all -- --check
run::
cargo run -- build --dryrun samples/qemuarm64.yml
build::
cargo build
test::
cargo test --workspace
release::
( \
RUSTFLAGS=${STRIP} cargo build --release --locked --target x86_64-unknown-linux-musl; \
mkdir -p dist; \
cp target/x86_64-unknown-linux-musl/release/thistle-yocto-build dist/thistle-yocto-build-x86_64-unknown-linux-musl; \
cd dist; \
sha256sum thistle-yocto-build-* > sha256sums.txt; \
)
ci:: check-enforce build test
echo "done"
build-scp:: check release
scp target/x86_64-unknown-linux-musl/release/thistle-yocto-build buildserver:~/
docker-prepare::
docker build -t thistlebuilder .
docker-build::
docker run -v ${PWD}/target-ubuntu:/src/target -v ${PWD}:/src -t thistlebuilder