Files
MacMonitor/.gitea/workflows/build.yml
gronod f34bb6bafe
MacMonitor CI/CD Pipeline / Build & Test (Intel x86_64) (push) Successful in 1m11s
ci: use platform=macOS,arch=x86_64 for build step matching test step
2026-09-08 13:09:37 +01:00

85 lines
2.2 KiB
YAML

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-14
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 'platform=macOS,arch=x86_64' \
CODE_SIGNING_ALLOWED=NO | xcbeautify
else
xcodebuild clean build \
-scheme MacMonitor \
-destination '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