From f00ffe6a248e4b74540466bb109e0081bee9cfdc Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 31 Jul 2026 12:43:39 +0700 Subject: [PATCH] added ci for macos and watchos --- .github/workflows/macos.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/watchos.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/watchos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..277ed14 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,34 @@ +name: MacOS CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-and-test: + name: Build and Test SwiftUI App + runs-on: macos-26 # Uses Apple Silicon M1/M2 runners + + steps: + # Step 1: Check out the repository code + - name: Checkout Repository + uses: actions/checkout@v4 + + # Step 2: Select the correct Xcode version + - name: Set Xcode Version + run: sudo xcode-select -s /Applications/Xcode_26.6.app/Contents/Developer + + # Step 3: Load dependencies if using Swift Package Manager + - name: Resolve Swift Packages + run: xcodebuild -resolvePackageDependencies -project Balance/Balance.xcodeproj -scheme BalanceMac + + # Step 4: Build and run tests using xcodebuild + - name: Build and Test + run: | + xcodebuild test \ + -project Balance/Balance.xcodeproj \ + -scheme BalanceMac \ + -destination 'platform=MacOS Simulator,name=macos,OS=26.4.1' \ + -quiet diff --git a/.github/workflows/watchos.yml b/.github/workflows/watchos.yml new file mode 100644 index 0000000..5fc8286 --- /dev/null +++ b/.github/workflows/watchos.yml @@ -0,0 +1,34 @@ +name: WatchOS CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-and-test: + name: Build and Test SwiftUI App + runs-on: macos-26 # Uses Apple Silicon M1/M2 runners + + steps: + # Step 1: Check out the repository code + - name: Checkout Repository + uses: actions/checkout@v4 + + # Step 2: Select the correct Xcode version + - name: Set Xcode Version + run: sudo xcode-select -s /Applications/Xcode_26.6.app/Contents/Developer + + # Step 3: Load dependencies if using Swift Package Manager + - name: Resolve Swift Packages + run: xcodebuild -resolvePackageDependencies -project Balance/Balance.xcodeproj -scheme BalanceWatch + + # Step 4: Build and run tests using xcodebuild + - name: Build and Test + run: | + xcodebuild test \ + -project Balance/Balance.xcodeproj \ + -scheme BalanceWatch \ + -destination 'platform=WatchOS Simulator,name=watchOS,OS=26.4.1' \ + -quiet