-
Notifications
You must be signed in to change notification settings - Fork 0
162 lines (134 loc) Β· 5.01 KB
/
Copy pathci.yaml
File metadata and controls
162 lines (134 loc) Β· 5.01 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
XCODE_PROJECT: mplayer.xcodeproj
XCODE_SCHEME: mplayer
XCODE_DESTINATION: 'platform=macOS'
BUILD_SETTINGS: 'CODE_SIGNING_ALLOWED=NO'
jobs:
build-and-test:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Show Xcode version
run: xcodebuild -version
- name: Build and test (Debug)
run: |
xcodebuild test \
-project ${{ env.XCODE_PROJECT }} \
-scheme ${{ env.XCODE_SCHEME }} \
-destination ${{ env.XCODE_DESTINATION }} \
-configuration Debug \
-derivedDataPath ./DerivedData \
${{ env.BUILD_SETTINGS }} \
ONLY_ACTIVE_ARCH=YES
- name: Build Release .app for distribution
run: |
echo "π Building Release .app for distribution..."
xcodebuild build \
-project ${{ env.XCODE_PROJECT }} \
-scheme ${{ env.XCODE_SCHEME }} \
-destination ${{ env.XCODE_DESTINATION }} \
-configuration Release \
-derivedDataPath ./ReleaseData \
${{ env.BUILD_SETTINGS }} \
ONLY_ACTIVE_ARCH=NO \
ARCHS="arm64"
- name: Package Release .app
run: |
# Create artifacts directory
mkdir -p ./artifacts
# Find and copy Release .app
RELEASE_APP=$(find ./ReleaseData -path "*/Release/*.app" -type d | head -1)
if [ -n "$RELEASE_APP" ]; then
cp -R "$RELEASE_APP" ./artifacts/mplayer-Release.app
echo "β
Release .app packaged successfully"
ls -la ./artifacts/
else
echo "β Release .app not found!"
exit 1
fi
- name: Upload Release .app
uses: actions/upload-artifact@v4
with:
name: mplayer-release-${{ github.run_number }}
path: ./artifacts/
retention-days: 30
code-quality-check:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run code quality checks
run: |
echo "π Running code quality checks..."
# Check for TODO/FIXME comments
if grep -r "TODO\|FIXME\|XXX" mplayer/ --include="*.swift" || true; then
echo "π Found TODO/FIXME comments (review needed)"
fi
# Check for potential force unwrapping
if grep -r "!" mplayer/ --include="*.swift" | grep -v "//\|print" || true; then
echo "β οΈ Found potential force unwrapping (review for safety)"
fi
# Check for print statements
if grep -r "print(" mplayer/ --include="*.swift" || true; then
echo "π Found print statements (consider using proper logging)"
fi
echo "β
Code quality check completed"
security-check:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Security and configuration checks
run: |
echo "π Running security checks..."
sensitive_found=false
# Check for sensitive information
if grep -ri "password\|secret\|api_key\|apikey\|token\|credential" mplayer/ --include="*.swift" --include="*.plist" || true; then
echo "β οΈ Found potential sensitive information"
sensitive_found=true
fi
# Check for AWS keys
if grep -ri "AKIAI\|AKIA[0-9A-Z]\{16\}" mplayer/ --include="*.swift" --include="*.plist" || true; then
echo "β οΈ Found potential AWS access key"
sensitive_found=true
fi
if [ "$sensitive_found" = false ]; then
echo "β
No obvious sensitive information found"
fi
# Check project configuration
echo "π Checking project configuration..."
if grep -i "PRODUCT_BUNDLE_IDENTIFIER\|DEVELOPMENT_TEAM" ${{ env.XCODE_PROJECT }}/project.pbxproj | head -5; then
echo "Project configuration found"
fi
echo "β
Security checks completed"
archive-verification:
runs-on: macos-latest
needs: build-and-test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Release artifact
uses: actions/download-artifact@v4
with:
name: mplayer-release-${{ github.run_number }}
path: ./downloaded-artifacts
- name: Verify archive can be created from Release .app
run: |
echo "π¦ Verifying archive creation..."
if [ -d "./downloaded-artifacts/mplayer-Release.app" ]; then
echo "β
Release .app found and ready for distribution"
ls -la ./downloaded-artifacts/
# Get basic app info
echo "App bundle contents:"
ls -la "./downloaded-artifacts/mplayer-Release.app/Contents/"
else
echo "β Release .app verification failed"
exit 1
fi