Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad2695aa4e | ||
|
|
a274927c2f |
@@ -0,0 +1,84 @@
|
||||
name: MacMonitor CI/CD Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
- 'milestone/**'
|
||||
- 'feat/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
- 'milestone/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
name: Build & Test (Intel x86_64)
|
||||
runs-on: [macos, intel]
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Inspect Toolchain & Environment
|
||||
run: |
|
||||
echo "=== Host Architecture ==="
|
||||
uname -m
|
||||
echo "=== macOS Version ==="
|
||||
sw_vers
|
||||
echo "=== Active Xcode Version ==="
|
||||
xcodebuild -version
|
||||
echo "=== Available macOS SDKs ==="
|
||||
xcrun --show-sdk-path
|
||||
|
||||
- name: Generate Xcode Project
|
||||
run: |
|
||||
if command -v xcodegen &> /dev/null; then
|
||||
xcodegen generate
|
||||
else
|
||||
echo "xcodegen not preinstalled, using tracked MacMonitor.xcodeproj"
|
||||
fi
|
||||
|
||||
- name: Run SwiftLint Linting
|
||||
run: |
|
||||
if command -v swiftlint &> /dev/null; then
|
||||
swiftlint lint --reporter emoji
|
||||
else
|
||||
echo "swiftlint not found, skipping lint step"
|
||||
fi
|
||||
|
||||
- name: Build MacMonitor Scheme
|
||||
run: |
|
||||
set -o pipefail
|
||||
if command -v xcbeautify &> /dev/null; then
|
||||
xcodebuild clean build \
|
||||
-scheme MacMonitor \
|
||||
-destination 'generic/platform=macOS,arch=x86_64' \
|
||||
CODE_SIGNING_ALLOWED=NO | xcbeautify
|
||||
else
|
||||
xcodebuild clean build \
|
||||
-scheme MacMonitor \
|
||||
-destination 'generic/platform=macOS,arch=x86_64' \
|
||||
CODE_SIGNING_ALLOWED=NO
|
||||
fi
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: |
|
||||
set -o pipefail
|
||||
if command -v xcbeautify &> /dev/null; then
|
||||
xcodebuild test \
|
||||
-scheme MacMonitor \
|
||||
-destination 'platform=macOS,arch=x86_64' \
|
||||
CODE_SIGNING_ALLOWED=NO | xcbeautify
|
||||
else
|
||||
xcodebuild test \
|
||||
-scheme MacMonitor \
|
||||
-destination 'platform=macOS,arch=x86_64' \
|
||||
CODE_SIGNING_ALLOWED=NO
|
||||
fi
|
||||
Reference in New Issue
Block a user