Xcode always builds on 7.0

ios

#1

Xcode always build on Xcode 7.0 inspite of mentioning xcode version in config.yml. Tried both CircleCI 1.0 & 2.0.

Select Xcode version console:
xcode-select --switch /Applications/Xcode-7.0.app && xcodebuild -version
Xcode 7.0
Build version 7A220

As a result of this, swift syntax fails on build and test.

Config file

jobs:
   build:
      macos:
        xcode: "9.0"

      dependencies:
      override:
        - bundle install

      steps:
        - checkout

        - run:
          name: Fetch CocoaPods Specs
          command: |
              curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf

        - run:
          name: Install CocoaPods
          command: pod install --verbose
   
        - run:
          name: Build and run tests
          command: fastlane scan
          environment:
             SCAN_DEVICE: iPhone 8
             SCAN_SCHEME: WebTests

        - run:
          command: mv fastlane/test_output/report.junit fastlane/test_output/report.xml
          when: always

        - store_test_results:
          path: fastlane/test_output

        - store_artifacts:
          path: /tmp/test-results
          destination: scan-test-results

        - store_artifacts:
          path: ~/Library/Logs/scan
          destination: scan-logs

workflows:
    version: 2
    build-and-test:
         macos:
             xcode: "9.0"
    jobs:
        - build
        - test

https://gist.github.com/ITechRoof/3bfec92eba06f5dec01f6b565e663190
Help appreciated…


#2

Please share your full config file here.


#10

xcode build shows swift 2 error like “boolean condition requires ‘where’ to separate it from variable binding”.
I am using swift 4 and have mentioned xcode version as “9.0”.
Please find the config file in the above post 1.


#11

Apologies, I replied initially with a grumpy message, having thought you’d not followed my posting suggestions again. Thank you for repairing the formatting - got there eventually!

It seems your core issue is the error message you have now referred to - have you searched for that on the web? It strikes me as something that would be on Stack Overflow.


#12

As I mentioned earlier, this is swift 2 error shown in old version of xcode. As I am using swift 4 and mentioning to use latest version of xcode, this error is not expected. So I feel building is done in older version of xcode inspite of mentioning version as xcode 9.


#13

Can you run a --version switch on a binary to see if your theory is correct? You can get an SSH session to do so.


#14

On connecting SSH, I could see it uses xcode 7.0

And I m not finding xcode 9.0 available on the build machine. Please find list of application available below:


#15

Is your config named .circleci/config.yml?
What do you get from this command?

ls -la .circleci/config.yml

#16

Hello,
I am facing exactly the same problem.
Here is my config file

# .circleci/config.yml
version: 2
jobs:
  build:
    docker:
      - image: circleci/ruby:2.4.1
    macos:
      xcode: "9.2.0"
    environment:
      FL_OUTPUT_DIR: output
    shell: /bin/bash --login -o pipefail
    steps:
      - checkout
      - run: bundle install
      - run:
          name: Fastlane
          command: bundle exec fastlane scan
          environment:
            SCAN_DEVICE: iPhone 6
            SCAN_SCHEME: Heer 2

I also connected to the container with ssh, the xCode versions installed are going only to 8.3.
I also checked that ls -la .circleci/config.yml is showing me my config.yml file.

Does anyone have an idea of what the problem could be?

Thanks


#17

For future readers, this question is duplicated here.