-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
67 lines (55 loc) · 1.64 KB
/
Copy pathjustfile
File metadata and controls
67 lines (55 loc) · 1.64 KB
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
# SPDX-FileCopyrightText: © 2026 PrivKey LLC
# SPDX-License-Identifier: MIT
set dotenv-load := false
default:
@just --list
build:
cargo build --release
build-reproducible:
docker build -f Dockerfile.reproducible -o type=local,dest=./dist .
build-reproducible-hash:
#!/usr/bin/env bash
set -euo pipefail
just build-reproducible
sha256sum dist/keep | tee dist/keep.sha256
verify-reproducible:
#!/usr/bin/env bash
set -euo pipefail
rm -rf dist dist-verify
just build-reproducible
mv dist dist-verify
just build-reproducible
HASH1=$(sha256sum dist-verify/keep | cut -d' ' -f1)
HASH2=$(sha256sum dist/keep | cut -d' ' -f1)
echo "Build 1: $HASH1"
echo "Build 2: $HASH2"
if [ "$HASH1" != "$HASH2" ]; then
echo "Build mismatch"
exit 1
fi
echo "Reproducible build verified"
verify-sha expected_hash:
#!/usr/bin/env bash
set -euo pipefail
just build-reproducible
ACTUAL=$(sha256sum dist/keep | cut -d' ' -f1)
if [ "$ACTUAL" != "{{expected_hash}}" ]; then
echo "Expected: {{expected_hash}}"
echo "Actual: $ACTUAL"
exit 1
fi
echo "Hash verified: $ACTUAL"
clean:
rm -rf dist dist-verify target
test:
cargo test --workspace --lib --bins
cargo test -p keep-core --features testing --test integration_tests
cargo test -p keep-frost-net --features testing --test multinode_test
cargo test -p keep-enclave-host --test integration_tests
test-property:
cargo test -p keep-core --test property_tests
cargo test -p keep-frost-net --test property_tests
fmt:
cargo fmt
clippy:
cargo clippy -- -D warnings