Paul Weber
01/27/2022, 5:59 PMPaul Weber
01/27/2022, 6:01 PMTest_iOS:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
name: Setup file extension filters
id: changes
with:
filters: |
swift:
- '**.swift'
shared:
- '**.kt'
- 'shared/'
- if: steps.changes.outputs.shared == 'true' || steps.changes.outputs.swift == 'true'
name: Setup JVM
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
- if: steps.changes.outputs.shared == 'true' || steps.changes.outputs.swift == 'true'
uses: xavierLowmiller/xcodegen-action@1.1.2
name: Run xcodegen
with:
spec: ios/project.yml
quiet: false
version: '2.25.0'
- if: steps.changes.outputs.shared == 'true' || steps.changes.outputs.swift == 'true'
name: Install Dependencies
run: |
cd ios
pod install
shell: bash
- if: steps.changes.outputs.shared == 'true' || steps.changes.outputs.swift == 'true'
name: Run xctest
run: >-
xcodebuild test -workspace ios/Spenderino.xcworkspace -scheme Spenderino -destination 'platform=iOS Simulator,name=iPhone 13,OS=15.0'
Eamon Keane
01/27/2022, 6:48 PMPaul Weber
01/27/2022, 6:52 PMPaul Weber
01/27/2022, 6:53 PMEamon Keane
01/27/2022, 6:53 PMEamon Keane
01/27/2022, 6:56 PMPaul Weber
01/27/2022, 7:36 PMEamon Keane
01/27/2022, 7:43 PMkpgalligan
01/27/2022, 8:14 PMpod install
multiple times, as you’ve found. The actual thing is you run pod install
, which sets up the Xcode run script, when that first xctest run runs a gradle command that fails, but does init something. Running pod install
agian then copies a shell framework. After that, the Xcode run script gradle succeeds. Not sure if/how that gets resolved, but it’s been a thing for a while. Obviously worse on CI.Eamon Keane
01/27/2022, 8:52 PMicerockdev
repo, he has a workaround by adding a preinstall line into the Podfile.
install! 'cocoapods', :disable_input_output_paths => true
https://github.com/CocoaPods/CocoaPods/issues/8073
https://github.com/icerockdev/moko-resources/blob/master/sample/ios-app/Podfile#L11
scratch that, it actually failed, but maybe there's something in the way he has it setup.Eamon Keane
01/28/2022, 12:23 PMios-build:
steps:
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
- cache-pull: {}
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
jenv global 11
export JAVA_HOME="$(jenv prefix)"
envman add --key JAVA_HOME --value "$(jenv prefix)"
title: Set java 11
- gradle-runner@2:
title: Build KotliniOS
inputs:
- gradle_task: compileKotlinIosX64
- gradlew_path: "./gradlew"
- cocoapods-install@2:
inputs:
- source_root_path: "$BITRISE_SOURCE_DIR/iosApp"
- xcode-build-for-simulator@0:
inputs:
- scheme: iosApp
- project_path: "./iosApp/iosApp.xcworkspace"
is_always_run: true
is_skippable: true
- cocoapods-install@2:
inputs:
- source_root_path: "$BITRISE_SOURCE_DIR/iosApp"
is_always_run: true
- xcode-build-for-simulator@0:
inputs:
- scheme: iosApp
- project_path: "./iosApp/iosApp.xcworkspace"
is_always_run: true
- cache-push:
is_always_run: true
meta:
<http://bitrise.io|bitrise.io>:
stack: osx-xcode-13.2.x
Qracle
02/27/2022, 7:30 AM| (6) xcode-build-for-simulator@0.11 |
+------------------------------------------------------------------------------+
| id: xcode-build-for-simulator |
| version: 0.11.5 |
| collection: <https://github.com/bitrise-io/bitrise-steplib.git> |
| toolkit: go |
| time: 2022-02-27T07:16:58Z |
+------------------------------------------------------------------------------+
| |
INFO[07:16:58] * [OK] Step dependency (xcode) installed, available.
INFO[07:16:58] * [OK] Step dependency (go) installed, available.
Config:
- ProjectPath: ./ios-app/iosApp.xcworkspace
- Scheme: iosApp
- Configuration:
- ArtifactName:
- XcodebuildOptions:
- Workdir: /Users/vagrant/git
- OutputDir: /Users/vagrant/deploy
- IsCleanBuild: false
- OutputTool: xcpretty
- SimulatorDevice: iPhone 8 Plus
- SimulatorOsVersion: latest
- SimulatorPlatform: iOS
- DisableIndexWhileBuilding: true
- VerboseLog: false
- CacheLevel: swift_packages
Step determined configs:
- xcodebuildVersion: Xcode 13.2.1 (Build version 13C100)
Checking if output tool (xcpretty) is installed
- xcprettyVersion: 0.3.0
Simulator info
Latest simulator for iPhone 8 Plus = 50FED432-F33B-4264-921C-EA587D44271C
Running build
[07:17:07] $ set -o pipefail && xcodebuild "-workspace" "/Users/vagrant/git/ios-app/iosApp.xcworkspace" "-scheme" "iosApp" "-configuration" "Release" "CODE_SIGNING_ALLOWED=NO" "-destination" "id=50FED432-F33B-4264-921C-EA587D44271C" "COMPILER_INDEX_STORE_ENABLE=NO" "build" | xcpretty
▸ Running script '[CP-User] Build shared'