File tree Expand file tree Collapse file tree 2 files changed +56
-8
lines changed Expand file tree Collapse file tree 2 files changed +56
-8
lines changed Original file line number Diff line number Diff line change 1
- #
2
- # References
3
- # - https://github.com/lukka/CppBuildTasks-Validation/tree/master/.github/workflows
4
- # - https://roseline.oopy.io/dev/github-action-cahce
5
- #
6
1
name : " Swift: Mac"
7
2
8
3
on :
Original file line number Diff line number Diff line change 6
6
7
7
* https://swift.org/package-manager/
8
8
* https://developer.apple.com/documentation/swift_packages
9
+ * https://developer.apple.com/documentation/objectivec/objective-c_runtime?language=objc
9
10
* https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md
10
11
11
12
## How To
12
13
13
14
### Setup
14
15
15
- (TBA)
16
+ ``` bash
17
+ pwsh setup-metal-cpp.ps1
18
+ ```
16
19
17
20
### Build
18
21
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
+ ```
20
45
21
46
### Test
22
47
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
+ ```
You can’t perform that action at this time.
0 commit comments