-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcodemagic.yaml
More file actions
94 lines (79 loc) · 2.33 KB
/
codemagic.yaml
File metadata and controls
94 lines (79 loc) · 2.33 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
definitions:
triggering:
push: &events
events:
- push
- pull_request
workflows:
meshingkit:
name: MeshingKit Workflow
environment:
xcode: 26.0
vars:
XCODE_SCHEME: "MeshingKit"
APP_ID: "MeshingKit"
cache:
cache_paths:
- ~/.swiftpm
- ~/Library/Caches/org.swift.swiftpm
- ~/Library/Caches/Homebrew
- /opt/homebrew/Cellar/swiftlint
- /usr/local/Cellar/swiftlint
when:
changeset:
includes:
- 'Sources'
- 'Tests'
- 'Package.swift'
- '*.swift'
triggering:
<<: *events
scripts:
- name: Download Metal Toolchain
script: |
#!/bin/zsh
xcodebuild -downloadComponent MetalToolchain
- name: Lint Swift Code
script: |
#!/bin/zsh
echo "Running SwiftLint..."
# Install swiftlint if not available
if ! command -v swiftlint &> /dev/null; then
echo "Installing SwiftLint..."
export HOMEBREW_NO_AUTO_UPDATE=1
brew install swiftlint
fi
# Run swiftlint with strict mode
swiftlint --strict --quiet
- name: Build Swift Package
script: |
#!/bin/zsh
echo "Building MeshingKit..."
# Basic swift build for the current platform
swift build --target MeshingKit
- name: Test Swift Package
script: |
#!/bin/zsh
echo "Testing MeshingKit..."
# Run tests once with coverage enabled.
swift test --enable-code-coverage --parallel
- name: Build with Xcode (Multi-Platform)
script: |
#!/bin/zsh
declare -a DESTINATIONS=(
"platform=iOS Simulator,name=iPhone 17 Pro"
"platform=macOS"
)
for DESTINATION in "${DESTINATIONS[@]}"
do
echo "Building for destination: $DESTINATION"
xcodebuild build \
-project Sources/Meshin/Meshin.xcodeproj \
-scheme Meshin \
-destination "$DESTINATION" \
-configuration Debug \
-skipPackagePluginValidation \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
-quiet
done