Add mectrics.app to the README header #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| engine: | |
| name: MetricsKit (SwiftPM) | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Show toolchain | |
| run: swift --version | |
| - name: Build | |
| working-directory: Packages/MetricsKit | |
| run: swift build --build-tests | |
| - name: Test | |
| working-directory: Packages/MetricsKit | |
| run: swift test | |
| app: | |
| name: Mectrics.app (xcodebuild) | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Show toolchain | |
| run: xcodebuild -version | |
| - name: Install XcodeGen | |
| run: brew install xcodegen | |
| - name: Generate the Xcode project | |
| run: xcodegen generate | |
| # The runner has no Developer ID certificate and no App Group provisioning, so | |
| # signing is disabled here. Release builds are signed and notarized locally by | |
| # scripts/release.sh. | |
| - name: Build | |
| run: | | |
| xcodebuild build \ | |
| -project Mectrics.xcodeproj \ | |
| -scheme Mectrics \ | |
| -configuration Debug \ | |
| -destination 'platform=macOS' \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGN_ENTITLEMENTS="" \ | |
| DEVELOPMENT_TEAM="" | |
| hygiene: | |
| name: Repository hygiene | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Generated output must not be committed | |
| run: | | |
| if git ls-files | grep -E '^(Mectrics\.xcodeproj/|DerivedData/|\.build/|.*\.DS_Store$)'; then | |
| echo "::error::Generated or OS output is committed. project.yml is the source of the Xcode project." | |
| exit 1 | |
| fi | |
| - name: Relative Markdown links and image paths must resolve | |
| run: | | |
| fail=0 | |
| for file in $(git ls-files '*.md'); do | |
| dir=$(dirname "$file") | |
| # Markdown links, plus the src/srcset of inline HTML (banner and screenshots). | |
| targets=$( | |
| { grep -oE '\]\([^) ]+\)' "$file" | sed -E 's/^\]\(//; s/\)$//' | |
| grep -oE '(src|srcset)="[^"]+"' "$file" | sed -E 's/^(src|srcset)="//; s/"$//' | |
| } || true | |
| ) | |
| for target in $targets; do | |
| case "$target" in | |
| http*|mailto:*|data:*|\#*) continue ;; | |
| esac | |
| target="${target%%#*}" | |
| [ -z "$target" ] && continue | |
| if [ ! -e "$dir/$target" ]; then | |
| echo "::error file=$file::broken relative path -> $target" | |
| fail=1 | |
| fi | |
| done | |
| done | |
| exit $fail |