Skip to content

Commit

Permalink
Update swift.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rudrankriyam authored Feb 9, 2025
1 parent 7062834 commit b8b6a0e
Showing 1 changed file with 63 additions and 9 deletions.
72 changes: 63 additions & 9 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: Swift

on:
Expand All @@ -11,12 +8,69 @@ on:

jobs:
build:

runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v

umerokit:
name: UmeroKit Workflow
runs-on: macos-12
env:
XCODE_SCHEME: "UmeroKit"
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Build Framework
run: |
declare -a DESTINATIONS=("platform=iOS Simulator,name=iPhone 14" "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)" "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)" "platform=macOS")
for DESTINATION in "${DESTINATIONS[@]}"
do
xcodebuild clean build \
-scheme "$XCODE_SCHEME" \
-destination "$DESTINATION" \
-skipPackagePluginValidation
done
- name: Test Framework
run: |
declare -a DESTINATIONS=("platform=iOS Simulator,name=iPhone 14" "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)" "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)" "platform=macOS")
for DESTINATION in "${DESTINATIONS[@]}"
do
set -o pipefail
xcodebuild clean test \
-scheme "$XCODE_SCHEME" \
-destination "$DESTINATION" \
-skipPackagePluginValidation | xcpretty --report junit
done
continue-on-error: true
if: always()
- name: Publish Test Report
uses: actions/upload-artifact@v3
with:
name: junit
path: build/reports/junit.xml

umerokit-update-docs:
name: UmeroKit Docs Update Workflow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
- uses: actions/checkout@v4
- name: Update DocC Documentation
run: |
swift package --allow-writing-to-directory ./docs \
generate-documentation --target UmeroKit \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path UmeroKit \
--output-path ./docs
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git add .
git commit -m "[skip ci] Update DocC Documentation"
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/rryam/UmeroKit.git
git pull --ff-only
git push origin main

0 comments on commit b8b6a0e

Please sign in to comment.