| OLD | NEW |
| (Empty) |
| 1 # | |
| 2 # 20150327 pavel@salsitasoft.com | |
| 3 # | |
| 4 | |
| 5 machine: | |
| 6 xcode: | |
| 7 version: "9.0" | |
| 8 pre: | |
| 9 - brew install node || brew upgrade node | |
| 10 - brew install jq # Replace Ruby JSON.parse | |
| 11 # I wanted to be a nice guy and specify node dependency The Right Way (TM) | |
| 12 # with machine:node section. But it requires nvm which is NOT automagically inst
alled | |
| 13 # because the target is not autodetected to be a node project. And it is impossi
ble to | |
| 14 # mimick because while installing nvm _is_ possible, it is not possible to | |
| 15 # "add this and that to .bashrc". The Circle's shell config is a custom .circler
c, the | |
| 16 # name and implementation of which is private to CCI and can change at any time. | |
| 17 # Modifying (appending to) it would be very fragile. | |
| 18 # - brew install nvm | |
| 19 # - mkdir ${HOME}/.nvm | |
| 20 # - source $(brew --prefix nvm)/nvm.sh | |
| 21 # node: | |
| 22 # version: v0.10.31 | |
| 23 environment: | |
| 24 # WARNING WARNING WARNING | |
| 25 # The custom environment variables must not depend on each other | |
| 26 # because the resulting export statements will be flushed to .circlerc | |
| 27 # in an arbitrary order, not the order seen here !!! | |
| 28 # The only safe dependency is Circle-predefined vars because those | |
| 29 # are flushed ahead of the custom vars | |
| 30 XCODE_WORKSPACE: "AdblockBrowser.xcworkspace" | |
| 31 XCODE_SCHEME: "AdblockBrowser" | |
| 32 APP_VERSION: $(/usr/local/bin/jq -r .version $HOME/$CIRCLE_PROJECT_REPONAME/
package.json) | |
| 33 CORE_REPONAME: kitt-core | |
| 34 # ^^^ environment section is running in /Users/distiller | |
| 35 # so a directory change to the checked out repo is needed. | |
| 36 # Can't do "cd" or "pushd" because it's refused at time of xctool invocation res
olving | |
| 37 IOS_VERSION: "11.0" | |
| 38 IOS_SIMULATOR_VERSION: "11.0.1" | |
| 39 # ^^^ update as the time goes | |
| 40 checkout: | |
| 41 post: | |
| 42 - git submodule update --init | |
| 43 # the main repo which initiated this build was already checked out | |
| 44 - $HOME/$CIRCLE_PROJECT_REPONAME/deploy/checkout-core.sh $CORE_REPONAME $CIR
CLE_BRANCH | |
| 45 - ../$CORE_REPONAME/deploy/build-jsapi.sh .. fromci | |
| 46 | |
| 47 dependencies: | |
| 48 # WARNING: This section FORCES a path relative to $HOME/$CIRCLE_PROJECT_REPONAME
!!! | |
| 49 # Always prepended by it, no matter whether the path already starts | |
| 50 # with $HOME or another form of fs root reference | |
| 51 pre: | |
| 52 - xcodebuild -showsdks # just to log what CCI supports | |
| 53 # ^^^ as CCI support said, dependencies:pre is the earliest phase where xcode-se
lect was | |
| 54 # already run, so correct SDKs should be displayed | |
| 55 - xcrun instruments -w "iPhone SE ($IOS_SIMULATOR_VERSION)" || true | |
| 56 # ^^^ Circle recommended magic: preboot the simulator runtime | |
| 57 - xcrun simctl list # debug occassional "unavailable simulator" | |
| 58 - deploy/carthage-bootstrap.sh | |
| 59 # Do not specify "override" section to allow CCI inference which speeds up Pods
fetching | |
| 60 # https://discuss.circleci.com/t/downloading-cocoapods-specs-from-s3-instead-of-
git/7856 | |
| 61 # Override did contain brew install node | |
| 62 # but since 20160909 CircleCI says "Error: node-6.4.0 already installed" | |
| 63 cache_directories: | |
| 64 - "Carthage" | |
| 65 - "Crashlytics" | |
| 66 - "../kitt-core/node_modules" # Caching facility can't interpret variables | |
| 67 | |
| 68 test: | |
| 69 override: | |
| 70 # The colon at the end means "this command as a key has a value of these set
tings". | |
| 71 # The identation is critical! It's not idented not only to the dash but to t
he command too. | |
| 72 - $HOME/$CIRCLE_PROJECT_REPONAME/deploy/build.sh iphonesimulator $IOS_VERSIO
N $IOS_SIMULATOR_VERSION : | |
| 73 timeout: 1200 | |
| 74 # - $HOME/$CIRCLE_PROJECT_REPONAME/e2e_tests.sh | |
| 75 deployment: | |
| 76 any: | |
| 77 branch: /.*/ | |
| 78 commands: | |
| 79 # Upload to Hockey is inside build.sh. Can't think of a better way which w
ould not involve | |
| 80 # saving the artifact filenames to temporary file or something. Circle run
s each command in | |
| 81 # its own new shell instance so env vars can't be shared. | |
| 82 - chruby system && $HOME/$CIRCLE_PROJECT_REPONAME/deploy/build.sh iphoneos
$IOS_VERSION : | |
| 83 timeout: 1200 | |
| 84 # The command chaining is silly, but as stated above, "chruby system" live
s only in | |
| 85 # scope of each new shell, so it must be set just before the build script.
Putting it | |
| 86 # inside script would be wrong, as it is Circle specific hack, not Xcode i
nvocation issue | |
| OLD | NEW |