Git Product home page Git Product logo

xcode-continuous-integration's People

Contributors

roblabs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nickgarkusha

xcode-continuous-integration's Issues

Multiple Xcode versions on macOS

It is most certainly possible to have different versions of Xcode on your macOS development machine.

How To

  • Before you upgrade Xcode using App Store. Be sure to move Xcode 11 to its own folder before upgrading.

    • A great example: in the Xcode 11.7 to Xcode 12 era. If you wanted to keep both versions be sure to save off Xcode 11
  • Download older versions of Xcode: https://developer.apple.com/download/more

  • Example, Make a new directory in /Applications, for example Xcode-10.1

    • Move the file Xcode_10.1.xip to that folder and extract
  • Explicitly set your Xcode path, in case you have a Xcode 10 or 11 or a Beta installed

    • xcode-select -print-path
      • Print or change the path to the active developer directory. This directory
        controls which tools are used for the Xcode command line tools (for example,
        xcodebuild) as well as the BSD development commands (such as cc and make).

    • sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
    • sudo xcode-select --switch /Applications/Xcode-10.1/Xcode.app/Contents/Developer/
      • # Use Xcode 10.1 for upgrading Swift 3 projects
    • sudo xcode-select --switch /Applications/Xcode-11.7/Xcode.app/Contents/Developer/
    • sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer/

multiple-Xcode-versions


XCS

  • For Xcode Servers (XCS), it appears that you can only use one version. In that case you would be best using multiple machines.

multiple-XCS-machines

How To: MapLibre + Xcode

As of now the MapLibre GL Native project has

  • 22 Analysis issues
  • 1 Warning related to GLKit
  • 0 automated tests

Sample Integration for MapLibre from Xcode Server Bot
image


Bot Issue for MapLibre iosapp Bot (analysis issue in MGLFillExtrusionStyleLayer.mm:38)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLFillExtrusionStyleLayer.mm:38

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLBackgroundStyleLayer.mm:29)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLBackgroundStyleLayer.mm:29

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLFillStyleLayer.mm:38)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLFillStyleLayer.mm:38

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLCircleStyleLayer.mm:48)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLCircleStyleLayer.mm:48

Bot Issue for MapLibre iosapp Bot (analysis issue in CGGeometry.h:316)
Static Analysis Issue: The left operand of '==' is a garbage value

File: /Applications/Xcode_11.7/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:316

Bot Issue for MapLibre iosapp Bot (analysis issue in CGGeometry.h:316)
Static Analysis Issue: The left operand of '==' is a garbage value

File: /Applications/Xcode_11.7/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:316

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLMapView.mm:882)
Static Analysis Issue: 1st argument in message expression is an uninitialized value

File: maplibre-gl-native/platform/ios/platform/ios/src/MGLMapView.mm:882

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLVectorTileSource.mm:28)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLVectorTileSource.mm:28

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLVectorTileSource.mm:34)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLVectorTileSource.mm:34

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLSymbolStyleLayer.mm:128)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLSymbolStyleLayer.mm:128

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLReachability.m:430)
Static Analysis Issue: Localized string macro should include a non-empty comment for translators

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLReachability.m:430

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLReachability.m:423)
Static Analysis Issue: Localized string macro should include a non-empty comment for translators

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLReachability.m:423

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLReachability.m:427)
Static Analysis Issue: Localized string macro should include a non-empty comment for translators

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLReachability.m:427

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLRasterTileSource.mm:62)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLRasterTileSource.mm:62

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLRasterTileSource.mm:39)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLRasterTileSource.mm:39

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLRasterStyleLayer.mm:38)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLRasterStyleLayer.mm:38

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLOpenGLStyleLayer.mm:64)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLOpenGLStyleLayer.mm:64

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLNetworkConfiguration.m:87)
Static Analysis Issue: nil returned from a method that is expected to return a non-null value

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLNetworkConfiguration.m:87

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLLineStyleLayer.mm:50)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLLineStyleLayer.mm:50

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLImageSource.mm:30)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLImageSource.mm:30

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLHillshadeStyleLayer.mm:38)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLHillshadeStyleLayer.mm:38

Bot Issue for MapLibre iosapp Bot (analysis issue in MGLHeatmapStyleLayer.mm:29)
Static Analysis Issue: Although the value stored to 'self' is used in the enclosing expression, the value is never actually read from 'self'

File: maplibre-gl-native/platform/ios/platform/darwin/src/MGLHeatmapStyleLayer.mm:29

As of Xcode 14, Xcode Server is no longer supported. This is noted in the Xcode 14 Release Notes.

Yes, the Release notes for Xcode 14 say it is no longer supported, but unfortunately the Server UI still gives you hope that it may work. But if you see these errors, you'll have to look for another solution for automated local builds.


sudo xcrun xcscontrol --initialize --fix-permissions

*** (1/ 1) [START] Fixing filesystem permissions
(1/ 1) [END - 0.01s] FAILED: Fixing filesystem permissions
Failed: Could not fix permissions: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CurrentXcodeSymlink” in the folder “XcodeServer”." UserInfo={NSFilePath=/Library/Developer/XcodeServer/CurrentXcodeSymlink, NSUnderlyingError=0x600002bf2bb0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
Total time: 0.01 seconds


  1. [Xcode 14.3 can not start Xcode server anymore] : https://developer.apple.com/forums/thread/727877
  2. [Xcode Server is no longer supported. (73888675)] : https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes

This is the error you will see with Xcode Server, but alas it will not work
image

Git metadata

Add Git metadata (branch, SHA, remote) to the logs:

Example,

# Git metadata
git remote --verbose
git branch
gitBranch=$(/usr/bin/git -C ${XCS_PRIMARY_REPO_DIR} rev-parse --abbrev-ref HEAD)
echo branch = $gitBranch
gitSHA=$(/usr/bin/git -C ${XCS_PRIMARY_REPO_DIR} rev-parse HEAD)
echo SHA = $gitSHA

Result,

origin https://github.com/roblabs/ios-map-ui.git (fetch)
origin https://github.com/roblabs/ios-map-ui.git (push)
* roblabs/Map
branch = roblabs/Map
SHA = 74b2e955e93104808994581de7f21a6de44dbc

How To: Mapbox GL Native + Xcode

Notes & reporting on how to do XCS Bots in mapbox/mapbox-gl-native-ios#493

XCS=1
XCS_INTEGRATION_NUMBER=4
CURRENT_PROJECT_VERSION=
MARKETING_VERSION=
XCS_PRIMARY_REPO_BRANCH=main
XCS_PRIMARY_REPO_TAG=
XCS_SOURCE_DIR=/Users/roblabs/Library/Caches/XCSBuilder/Bots/02f7e872890abff99af4bf2d5be25fbe/Source
XCS_PRIMARY_REPO_DIR=/Users/roblabs/Library/Caches/XCSBuilder/Bots/02f7e872890abff99af4bf2d5be25fbe/Source/mapbox-gl-native-ios
XCS_BOT_NAME=🗺mapbox mapbox-gl-native-ios main CI Bot
XCS_OUTPUT_DIR=/Users/roblabs/Library/Caches/XCSBuilder/Integration-496032c3ccd03a9c4755b9bd344aef21

System versions

# print Mac OS X operating system version information
sw_vers

ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H2


# Xcode version & path
/usr/bin/xcodebuild -version
/usr/bin/xcode-select -print-path

Xcode 11.7
Build version 11E801a

/Applications/Xcode-11.7/Xcode.app/Contents/Developer


brew & gem dependencies

# Versions of build dependencies
brew list --versions carthage cmake ccache pkg-config glfw3
gem list xcpretty jazzy

carthage 0.36.0
ccache 3.7.11_1
cmake 3.18.2
glfw 3.3.2
pkg-config 0.29.2_3

xcpretty (0.3.0)
jazzy (0.13.5)


carthage dependencies

cat Cartfile

binary "https://api.mapbox.com/downloads/v2/carthage/mobile-maps-gl-core/mapbox-ios-sdk-gl-core-static.json" == 5.1.0
github "mapbox/mapbox-events-ios" ~> 0.10.5-beta.2


.netrc - Configure your secret Mapbox Access Token

# Does `.netrc` exist?  What are the R/W permissions
ls -l ~/.netrc  && stat -f '%A %N' ~/.netrc

-rw-r--r-- 1 roblabs staff 135 Sep 21 16:17 /Users/roblabs/.netrc
644 /Users/roblabs/.netrc


Mapbox.framework metadata

After make iframework you can check the Mapbox.framework metadata from Info.plist

# Version info from Mapbox.framework
# plutil -- property list utility
  # plutil -help
  # man plutil

plutil -convert json dynamic/Mapbox.framework/Info.plist -o Mapbox.framework.Info.json -r
# `json` depends on https://www.npmjs.com/package/json
#    npm install -g json
cat Mapbox.framework.Info.json | json CFBundleIdentifier
cat Mapbox.framework.Info.json | json CFBundleShortVersionString
cat Mapbox.framework.Info.json | json CFBundleVersion
cat Mapbox.framework.Info.json | json MGLSemanticVersionString
cat Mapbox.framework.Info.json | json MGLCommitHash

"CFBundleVersion" => "15256"
"CFBundleIdentifier" => "com.mapbox.Mapbox"
"CFBundleShortVersionString" => "6.3.0"
"MGLCommitHash" => "59702965fa"
"MGLSemanticVersionString" => "6.3.0-alpha.1"


Sample Reporting from Xcode

Integration Report
xcs-integration-report

Code Coverage
xcs-coverage

Test Report
xcs-tests

Notes on `git submodule` usage in XCS

Related to the sample for Siku — 1e13c1d

Making some notes on the proper calls to pull in a git submodule with XCS. The main repo has a reference to a readme.md in the git submodule, and the hope was that XCS would pull in the submodule automatically. That did not work.

The two commands seem to work:

  • git submodule sync
  • git submodule update --remote

Subsequent attempts were to try the three git submodule, each with results listed below. Documentation in this font are from https://git-scm.com/docs/git-submodule


🟢git submodule sync

Synchronizing submodule url for 'Siku/Siku/Resources/siku-map-assets'

Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules. It will only affect those submodules which already have a URL entry in .git/config (that is the case when they are initialized or freshly added). This is useful when submodule URLs change upstream and you need to update your local repositories accordingly.


🔴 git submodule update --init --recursive

fatal: No url found for submodule path 'siku-map-assets' in .gitmodules

If the submodule is not yet initialized, and you just want to use the setting as stored in .gitmodules, you can automatically initialize the submodule with the --init option.
If --recursive is specified, this command will recurse into the registered submodules, and update any nested submodules within.


🟢git submodule update --remote

In order to ensure a current tracking branch state, update --remote fetches the submodule’s remote repository before calculating the SHA-1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.