Skip to content

Commit 9da5a01

Browse files
committed
docs: CLI samples
1 parent a4ce231 commit 9da5a01

File tree

2 files changed

+56
-8
lines changed

2 files changed

+56
-8
lines changed

.github/workflows/swift_mac.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#
2-
# References
3-
# - https://github.com/lukka/CppBuildTasks-Validation/tree/master/.github/workflows
4-
# - https://roseline.oopy.io/dev/github-action-cahce
5-
#
61
name: "Swift: Mac"
72

83
on:

readme.md

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,71 @@
66

77
* https://swift.org/package-manager/
88
* https://developer.apple.com/documentation/swift_packages
9+
* https://developer.apple.com/documentation/objectivec/objective-c_runtime?language=objc
910
* https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md
1011

1112
## How To
1213

1314
### Setup
1415

15-
(TBA)
16+
```bash
17+
pwsh setup-metal-cpp.ps1
18+
```
1619

1720
### Build
1821

19-
(TBA)
22+
#### With Swift Package Manager(SwiftPM)
23+
24+
```bash
25+
swift build
26+
swift build --configuration release --target baguette-target
27+
```
28+
29+
```bash
30+
# xcodebuild build -workspace . -list
31+
xcodebuild build -workspace . -derivedDataPath .build -scheme bridging-Package -destination "platform=macOS,arch=x86_64"
32+
```
33+
34+
#### With CMake, Vcpkg Toolchain
35+
36+
```bash
37+
export VCPKG_FEATURE_FLAGS="manifests"
38+
export VCPKG_ROOT="$HOME/../vcpkg"
39+
```
40+
41+
```
42+
cmake --preset=x64-osx
43+
cmake --build --preset=x64-osx-debug
44+
```
2045

2146
### Test
2247

23-
(TBA)
48+
#### With SwiftPM
49+
50+
```bash
51+
# swift test --list-tests
52+
swift test
53+
```
54+
55+
#### With CMake, Vcpkg Toolchain
56+
57+
```
58+
cmake --build --preset=x64-osx-debug --target baguette_test
59+
ctest --preset=x64-osx-debug
60+
```
61+
62+
### Lint
63+
64+
Check https://github.com/realm/SwiftLint
65+
66+
```bash
67+
swiftlint lint --autocorrect
68+
swiftlint lint --output docs/lint.md --reporter markdown
69+
```
70+
71+
### Document
72+
73+
```bash
74+
xcodebuild docbuild -workspace . -derivedDataPath .build -scheme bridging-Package -destination "platform=macOS"
75+
find "$(pwd)/.build" -type d -name "*.doccarchive"
76+
```

0 commit comments

Comments
 (0)