Skip to content

Commit 709bf8a

Browse files
committed
chore: enable WMO and size optimization to reduce binary size
1 parent 626bf9d commit 709bf8a

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ jobs:
4646
MARKETING_VERSION="${{ steps.version.outputs.marketing_version }}" \
4747
CURRENT_PROJECT_VERSION="${{ steps.version.outputs.marketing_version }}" \
4848
CODE_SIGNING_ALLOWED=NO \
49-
CODE_SIGNING_REQUIRED=NO
49+
CODE_SIGNING_REQUIRED=NO \
50+
STRIP_INSTALLED_PRODUCT=YES \
51+
DEAD_CODE_STRIPPING=YES \
52+
DEBUG_INFORMATION_FORMAT=dwarf-with-dsym \
53+
SWIFT_OPTIMIZATION_LEVEL=-Osize \
54+
SWIFT_COMPILATION_MODE=wholemodule
5055
5156
- name: Ad-hoc sign
5257
run: codesign --force --deep --sign - build/Build/Products/Release/Wave.app

Wave/Views/HomeView.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ enum NavItem: String, Hashable {
1616
@ViewBuilder
1717
var icon: some View {
1818
switch self {
19-
case .home: Ph.house.regular.frame(width: 16, height: 16)
19+
case .home: Ph.house.regular.frame(width: 16, height: 16)
2020
case .dictionary: Ph.bookOpen.regular.frame(width: 16, height: 16)
21-
case .snippets: Ph.textT.regular.frame(width: 16, height: 16)
22-
case .general: Ph.slidersHorizontal.regular.frame(width: 16, height: 16)
23-
case .shortcut: Ph.keyboard.regular.frame(width: 16, height: 16)
24-
case .models: Ph.cpu.regular.frame(width: 16, height: 16)
25-
case .howToUse: Ph.bookOpenText.regular.frame(width: 16, height: 16)
26-
case .about: Ph.info.regular.frame(width: 16, height: 16)
21+
case .snippets: Ph.textT.regular.frame(width: 16, height: 16)
22+
case .general: Ph.slidersHorizontal.regular.frame(width: 16, height: 16)
23+
case .shortcut: Ph.keyboard.regular.frame(width: 16, height: 16)
24+
case .models: Ph.cpu.regular.frame(width: 16, height: 16)
25+
case .howToUse: Ph.bookOpenText.regular.frame(width: 16, height: 16)
26+
case .about: Ph.info.regular.frame(width: 16, height: 16)
2727
}
2828
}
2929
}

0 commit comments

Comments
 (0)