From 864a8b68f2fdde663b56bdc714765f528ae244a4 Mon Sep 17 00:00:00 2001 From: wt Date: Fri, 18 Sep 2026 16:46:59 +0700 Subject: [PATCH] updated ci/cd --- .github/workflows/ios.yml | 53 +++++++++++------------- .github/workflows/macos.yml | 35 ++++++++++++++++ .github/workflows/packs.yml | 80 ------------------------------------- .github/workflows/test.yml | 36 +++++++++++++++++ 4 files changed, 94 insertions(+), 110 deletions(-) create mode 100644 .github/workflows/macos.yml delete mode 100644 .github/workflows/packs.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 33cdbdb..0e314d9 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -1,5 +1,4 @@ -name: iOS CI - +name: Build Unsigned iOS ipa on: push: branches: @@ -10,40 +9,34 @@ on: branches: - main - develop - jobs: - build-and-test: - name: Build and Test SwiftUI App - runs-on: macos-26 # Uses Apple Silicon M1/M2 runners - + build-ios: + name: Build Unsigned iOS IPA + runs-on: macos-26 steps: - # Step 1: Check out the repository code - - name: Checkout Repository + - name: Checkout repository uses: actions/checkout@v4 - - # Step 2: Select the correct Xcode version - - name: Set Xcode Version + - name: Set up 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 Luma.xcodeproj -scheme Luma - - # Step 4: Build and run tests using xcodebuild. CI runs the - # deterministic unit tests only; the UI tests (LumaUITests) are - # exercised manually on a simulator. - - name: Build and Test + - name: Build Xcode Workspace run: | - xcodebuild test \ + xcodebuild build \ -project Luma.xcodeproj \ -scheme Luma \ - -destination 'platform=iOS Simulator,name=iPhone 17 Pro Max,OS=26.4.1' \ - -only-testing:LumaTests \ - -resultBundlePath TestResults.xcresult - - - name: Upload Test Results - if: always() + -configuration Release \ + -destination 'generic/platform=iOS' \ + -derivedDataPath build/DerivedData \ + CODE_SIGNING_ALLOWED=NO \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGN_IDENTITY="" \ + PROVISIONING_PROFILE_SPECIFIER="" + - name: Package into IPA + run: | + mkdir -p build/Payload + mv build/DerivedData/Build/Products/Release-iphoneos/Luma.app build/Payload/ + cd build && zip -r Luma.ipa Payload/ + - name: Upload iOS Artifact uses: actions/upload-artifact@v4 with: - name: Luma-TestResults - path: TestResults.xcresult + name: Luma${{ github.run_id }} + path: build/Luma.ipa diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..a56f057 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,35 @@ +name: Build Unsigned macOS App +on: + push: + branches: + - main + - develop + - issue-* + pull_request: + branches: + - main + - develop +jobs: + build-macos: + name: Build macOS ZIP + runs-on: macos-26 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Xcode version + run: sudo xcode-select -s /Applications/Xcode_26.6.app/Contents/Developer + - name: Build macOS App + run: | + xcodebuild build \ + -project Luma.xcodeproj \ + -scheme LumaMac \ + -configuration Release \ + -derivedDataPath build/DerivedData \ + CODE_SIGNING_ALLOWED=NO \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGN_IDENTITY="" + - name: Upload macOS Artifact + uses: actions/upload-artifact@v4 + with: + name: Luma + path: build/DerivedData/Build/Products/Release/Luma.app diff --git a/.github/workflows/packs.yml b/.github/workflows/packs.yml deleted file mode 100644 index b390421..0000000 --- a/.github/workflows/packs.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Build Unsigned iOS and macOS Apps - -on: - push: - branches: - - main - - develop - - issue-* - pull_request: - branches: - - main - - develop - -jobs: - build-ios: - name: Build Unsigned iOS IPA - runs-on: macos-26 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Xcode version - run: sudo xcode-select -s /Applications/Xcode_26.6.app/Contents/Developer - - - name: Build Xcode Workspace - run: | - xcodebuild build \ - -project Luma.xcodeproj \ - -scheme Luma \ - -configuration Release \ - -destination 'generic/platform=iOS' \ - -derivedDataPath build/DerivedData \ - CODE_SIGNING_ALLOWED=NO \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGN_IDENTITY="" \ - PROVISIONING_PROFILE_SPECIFIER="" - - - name: Package into IPA - run: | - mkdir -p build/Payload - mv build/DerivedData/Build/Products/Release-iphoneos/Luma.app build/Payload/ - cd build && zip -r Luma.ipa Payload/ - - - name: Upload iOS Artifact - uses: actions/upload-artifact@v4 - with: - name: unsigned-ios-ipa - path: build/Luma.ipa - - build-macos: - name: Build macOS ZIP - runs-on: macos-26 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Xcode version - run: sudo xcode-select -s /Applications/Xcode_26.6.app/Contents/Developer - - - name: Build macOS App - run: | - xcodebuild build \ - -project Luma.xcodeproj \ - -scheme LumaMac \ - -configuration Release \ - -derivedDataPath build/DerivedData \ - CODE_SIGNING_ALLOWED=NO \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGN_IDENTITY="" - - - name: Compress macOS App - run: | - cd build/DerivedData/Build/Products/Release - zip -r Luma.zip Luma.app - - - name: Upload macOS Artifact - uses: actions/upload-artifact@v4 - with: - name: unsigned-macos-zip - path: build/DerivedData/Build/Products/Release/Luma.zip diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2ea372d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: iOS CI +on: + push: + branches: + - main + - develop + - issue-* + pull_request: + branches: + - main + - develop +jobs: + build-and-test: + name: Build and Test SwiftUI App + runs-on: macos-26 + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Set Xcode Version + run: sudo xcode-select -s /Applications/Xcode_26.6.app/Contents/Developer + - name: Resolve Swift Packages + run: xcodebuild -resolvePackageDependencies -project Luma.xcodeproj -scheme Luma + - name: Build and Test + run: | + xcodebuild test \ + -project Luma.xcodeproj \ + -scheme Luma \ + -destination 'platform=iOS Simulator,name=iPhone 17 Pro Max,OS=26.4.1' \ + -only-testing:LumaTests \ + -resultBundlePath TestResults.xcresult + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v4 + with: + name: Luma-TestResults + path: TestResults.xcresult