@@ -31,12 +31,14 @@ jobs:
3131 arch : " x86_64"
3232 triple : " x86_64-unknown-linux-gnu"
3333 comprehensive_test : true
34+ lint_check : true
3435 - name : " Linux ARM64"
3536 runner : ubuntu-24.04-arm
3637 platform : " Linux"
3738 arch : " aarch64"
3839 triple : " aarch64-unknown-linux-gnu"
3940 comprehensive_test : true
41+ lint_check : true
4042
4143 steps :
4244 - name : Checkout code
@@ -99,7 +101,30 @@ jobs:
99101
100102 if [ "${{ matrix.platform }}" = "macOS" ]; then
101103 echo "Building universal macOS binary..."
102- swift build --configuration release --arch arm64 --arch x86_64 -Xswiftc -Osize
104+
105+ # Build ARM64 binary
106+ echo "Building ARM64 binary..."
107+ swift build --configuration release --arch arm64 -Xswiftc -Osize
108+
109+ # Build x86_64 binary
110+ echo "Building x86_64 binary..."
111+ swift build --configuration release --arch x86_64 -Xswiftc -Osize
112+
113+ # Create output directory
114+ mkdir -p .build/apple/Products/Release
115+
116+ # Combine architectures with lipo
117+ echo "Combining architectures with lipo..."
118+ lipo -create \
119+ .build/arm64-apple-macosx/release/swift-dependency-audit \
120+ .build/x86_64-apple-macosx/release/swift-dependency-audit \
121+ -output .build/apple/Products/Release/swift-dependency-audit
122+
123+ # Verify the universal binary
124+ echo "Verifying universal binary..."
125+ lipo -info .build/apple/Products/Release/swift-dependency-audit
126+
127+ # Strip the final binary
103128 strip -rSTx .build/apple/Products/Release/swift-dependency-audit
104129 else
105130 echo "Building static Linux binary for ${{ matrix.arch }}..."
@@ -138,7 +163,7 @@ jobs:
138163
139164 echo "=== Testing JSON Output ==="
140165 $BINARY_PATH . --output-format json --no-color --exclude-tests > output.json
141- cat output.json | python3 -m json.tool > /dev/null || (echo "❌ Invalid JSON output" && exit 1)
166+ jq . output.json > /dev/null || (echo "❌ Invalid JSON output" && exit 1)
142167 echo "✅ JSON output is valid"
143168
144169 echo "=== Testing Output Formats ==="
@@ -148,14 +173,7 @@ jobs:
148173 echo "=== Testing Custom Whitelist ==="
149174 $BINARY_PATH . --whitelist "Foundation,SwiftUI,ArgumentParser" --verbose --exclude-tests
150175
151- echo "=== Testing Plugin Integration ==="
152- if swift package plugin --list | grep -q "DependencyAuditPlugin"; then
153- echo "✅ Plugin is properly registered"
154- else
155- echo "⚠️ Plugin not found in list, but core functionality works"
156- fi
157-
158- - name : Lint and format check (macOS only)
176+ - name : Lint and format check
159177 if : matrix.lint_check
160178 run : |
161179 echo "=== Format Check ==="
@@ -165,16 +183,6 @@ jobs:
165183 else
166184 echo "swift-format not available, skipping format check"
167185 fi
168-
169- echo "=== Build Warnings Check ==="
170- swift build --configuration release 2>&1 | tee build.log
171- if grep -q "warning:" build.log; then
172- echo "⚠️ Build warnings found:"
173- grep "warning:" build.log
174- exit 1
175- else
176- echo "✅ No build warnings found"
177- fi
178186 continue-on-error : true
179187
180188 - name : Upload build artifacts
0 commit comments