Improve performance #137
Workflow file for this run
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
| # https://github.com/actions/virtual-environments | |
| name: test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| DEVELOPER_DIR: /Applications/Xcode_16.2.app | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Test library | |
| run: swift test | |
| build_examples: | |
| name: Build examples | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build SwiftPMBased example | |
| run: | | |
| xcodebuild \ | |
| -project Examples/SwiftPMBased/SNS.xcodeproj \ | |
| -scheme SNS \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16 Pro Max' \ | |
| -configuration Debug \ | |
| clean build | |
| if [ -n "$(git status --porcelain)" ]; then git diff && echo "Make sure diff for a SNS example."; exit 1; fi | |
| - name: Build XcodeBased example | |
| run: | | |
| xcodebuild \ | |
| -project Examples/XcodeBased/Todos.xcodeproj \ | |
| -scheme Todos \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16 Pro Max' \ | |
| -configuration Debug \ | |
| clean build | |
| if [ -n "$(git status --porcelain)" ]; then git diff && echo "Make sure diff for a Todos example."; exit 1; fi | |
| - name: Build Xcode+SwiftPM example | |
| run: | | |
| xcodebuild \ | |
| -project Examples/Xcode+SwiftPM/VoiceMemo.xcodeproj \ | |
| -scheme VoiceMemo \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16 Pro Max' \ | |
| -configuration Debug \ | |
| clean build | |
| if [ -n "$(git status --porcelain)" ]; then git diff && echo "Make sure diff for a VoiceMemo example."; exit 1; fi | |
| validation: | |
| name: Validation | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache tools | |
| uses: actions/cache@v4 | |
| id: tools-cache | |
| with: | |
| path: Tools/.build | |
| key: ${{ runner.os }}-spm-${{ hashFiles('**/Tools/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Build tools | |
| if: steps.tools-cache.outputs.cache-hit != 'true' | |
| run: make build-tools | |
| - name: Validate lint | |
| run: make lint | |
| - name: Validate format | |
| run: | | |
| make format | |
| if [ -n "$(git status --porcelain)" ]; then git diff && echo "Make sure that the code is formated by 'make format'."; exit 1; fi |