-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (50 loc) · 1.87 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
CONFIG = debug
PLATFORM_IOS = iOS Simulator,id=$(call udid_for,iOS 17.5,iPhone \d\+ Pro [^M])
build:
# GitHub CodeQL is automatically calling `make build` on PRs
# This Makefile is deprecated, but we need to keep this make target for CodeQL to work
cargo build
build-swift-apple-platforms:
export USE_LOCAL_RUST_XCFRAMEWORK=1; \
for platform in "iOS"; do \
xcodebuild \
-skipMacroValidation \
-configuration $(CONFIG) \
-workspace .github/package.xcworkspace \
-scheme yttrium \
-destination generic/platform="$$platform" || exit 1; \
done;
test-swift-apple-platforms:
for platform in "$(PLATFORM_IOS)" ; do \
xcodebuild test \
-skipMacroValidation \
-configuration $(CONFIG) \
-workspace .github/package.xcworkspace \
-scheme yttrium \
-destination platform="$$platform" || exit 1; \
done;
build-xcframework:
sh scripts/build-xcframework.sh
set-up-local-swift-package:
sh scripts/set-up-local-package.sh
clean:
cd crates/account/src/contracts && yarn clean && cd ../../../../
cargo clean
local-infra:
cd test/scripts/local_infra && sh local-infra.sh
local-infra-forked:
cd test/scripts/forked_state && sh local-infra.sh
local-infra-7702:
cd test/scripts/7702 && sh local-infra.sh
.PHONY: compute-rust-checksum
compute-rust-checksum:
swift package compute-checksum Output/RustXcframework.xcframework.zip > rust_checksum.txt
echo "Rust XCFramework checksum: $$(cat rust_checksum.txt)"
.PHONY: generate-package-swift
generate-package-swift:
chmod +x scripts/generate-package-swift.sh
./scripts/generate-package-swift.sh
.PHONY: build build-ios-bindings build-swift-apple-platforms test-swift-apple-platforms fetch-thirdparty setup-thirdparty test format clean local-infra local-infra-forked local-infra-7702
define udid_for
$(shell xcrun simctl list devices available '$(1)' | grep '$(2)' | sort -r | head -1 | awk -F '[()]' '{ print $$(NF-3) }')
endef