-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (63 loc) · 3.02 KB
/
Copy pathMakefile
File metadata and controls
79 lines (63 loc) · 3.02 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
68
69
70
71
72
73
74
75
76
77
78
79
.DEFAULT_GOAL := check
.PHONY: fake
ANDROID_DIR := crates/notedeck_chrome/android
MACOS_APP := target/release/bundle/osx/Notedeck.app
MACOS_FEATURES ?= dave,messages
check:
cargo check
tags: fake
rusty-tags vi
jni: fake
cargo ndk --target arm64-v8a -o $(ANDROID_DIR)/app/src/main/jniLibs/ build --features dave,messages,headway,notebook,auto-update --profile release --workspace --exclude notedeck_release
jni-check: fake
cargo ndk --target arm64-v8a check --workspace --exclude notedeck_release
apk: jni
cd $(ANDROID_DIR) && ./gradlew build
gradle:
cd $(ANDROID_DIR) && ./gradlew build
push-android-config:
adb push android-config.json /sdcard/Android/data/com.damus.notedeck/files/android-config.json
android: jni
cd $(ANDROID_DIR) && ./gradlew installDebug
adb shell am start -n com.damus.notedeck/.MainActivity
adb logcat -v color -s GameActivity -s RustStdoutStderr -s threaded_app | tee logcat.txt
android-release: jni
cd $(ANDROID_DIR) && ./gradlew installRelease
adb shell am start -n com.damus.notedeck/.MainActivity
adb logcat -v color -s GameActivity -s RustStdoutStderr -s threaded_app | tee logcat.txt
release-apk: jni
cd $(ANDROID_DIR) && ./gradlew assembleRelease
@echo "Signed APK: $(ANDROID_DIR)/app/build/outputs/apk/release/app-release.apk"
release-aab: jni
cd $(ANDROID_DIR) && ./gradlew bundleRelease
@echo "Signed AAB: $(ANDROID_DIR)/app/build/outputs/bundle/release/app-release.aab"
android-tracy: fake
cargo ndk --target arm64-v8a -o $(ANDROID_DIR)/app/src/main/jniLibs/ build --profile release --features tracy
cd $(ANDROID_DIR) && ./gradlew installDebug
adb shell am start -n com.damus.notedeck/.MainActivity
adb forward tcp:8086 tcp:8086
adb logcat -v color -s GameActivity -s RustStdoutStderr -s threaded_app | tee logcat.txt
# Build an unsigned .app for local development. macOS reads a process's icon
# and name from the bundle's Info.plist, so a bare target/release binary shows
# up as a generic executable in Activity Monitor and cmd-tab. For the signed,
# notarized release build see scripts/macos_build.sh.
macos-app: fake
@command -v cargo-bundle >/dev/null || \
{ echo "cargo-bundle not found; install it with: cargo install cargo-bundle"; exit 1; }
cargo bundle -p notedeck_chrome --release --format osx --features "$(MACOS_FEATURES)"
@echo "Built $(MACOS_APP)"
# Run the bundled build with logs still going to the terminal. Launching the
# inner executable rather than `open`ing the .app keeps stdout attached while
# still giving the process its bundle identity.
macos-run: macos-app
$(MACOS_APP)/Contents/MacOS/notedeck
test-messages-docker:
docker build -f crates/notedeck_testing/Dockerfile -t notedeck-test-base .
docker run --rm \
--cpus=2 --memory=7g \
-v "$$PWD":/work -w /work \
-v cargo-registry:/root/.cargo/registry \
-v cargo-git:/root/.cargo/git \
-v cargo-target:/target \
-e CARGO_TARGET_DIR=/target \
notedeck-test-base bash -lc '$${STRESS_CMD:+stress-ng --cpu 2 --cpu-load $${STRESS_CPU_LOAD:-70} &} cargo test -p notedeck_messages --test messages_e2e -- --test-threads=1'