.gitlab-ci.yml 2.37 KB
Newer Older
Drew's avatar
Drew committed
1 2
types:
  - test
Drew's avatar
Drew committed
3
  - package
Drew's avatar
Drew committed
4

5 6 7
variables:
  XCSBOT: "31b0b0bb4b62ed4d8a5f6eccaf4d6edd"
  GITLAB_PROJECT_ID: "17"
Drew's avatar
Drew committed
8
  FRAMEWORK_NAME: "SynchronousRequestKit"
9

Drew's avatar
Drew committed
10 11 12
xcs:
  type: test
  script:
13
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI forceGitLabBranch --branchName CaveJohnsonAuto --hostname code.sealedabstract.com --projectID $GITLAB_PROJECT_ID"
Drew's avatar
Drew committed
14
    - "sleep 1" 
15
    - "XCSBUILDNO=`/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsIntegrateNow --botID $XCSBOT --hostname localhost --sslPolicy localhost`"
Drew's avatar
Drew committed
16
    - "echo XCS BUILDNO $XCSBUILDNO"
17 18
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI waitForIntegration --hostname localhost --botID $XCSBOT --sslPolicy localhost --buildNumber $XCSBUILDNO"
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsStatusToShell --hostname localhost --botID $XCSBOT --sslPolicy localhost --buildNumber $XCSBUILDNO"
Drew's avatar
Drew committed
19 20 21
  only:
    - master
  tags:
Drew's avatar
Drew committed
22 23
    - xc7

Drew's avatar
Drew committed
24
archive-mac:
Drew's avatar
Drew committed
25 26 27 28 29
   type: package
   script:
      - "CJ=/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI"
      - "CARTHAGE=/usr/local/bin/carthage"
      - "$CJ setVersion --infoPlistPath $FRAMEWORK_NAME/Info.plist --version ${CI_BUILD_ID}"
Drew's avatar
Drew committed
30
      - "$CARTHAGE build --no-skip-current --platform osx"
Drew's avatar
Drew committed
31 32 33 34 35 36 37 38 39 40 41
      - "$CARTHAGE archive $FRAMEWORK_NAME"

      - "ZIPFILE=$($CJ getNameVersionString --infoPlistPath $FRAMEWORK_NAME/Info.plist --productName $FRAMEWORK_NAME)-dev-${CI_BUILD_ID}.zip"
      - "rm -rf /tmp/$FRAMEWORK_NAME/"
      - "mkdir -p /tmp/$FRAMEWORK_NAME"
      - "mv $FRAMEWORK_NAME.framework.zip /tmp/$FRAMEWORK_NAME/$ZIPFILE"
   only:
    - master

   artifacts:
      paths:
Drew's avatar
Drew committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
      - /tmp/SynchronousRequestKit/

archive-ios:
   type: package
   script:
      - "CJ=/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI"
      - "CARTHAGE=/usr/local/bin/carthage"
      - "$CJ setVersion --infoPlistPath $FRAMEWORK_NAME/Info.plist --version ${CI_BUILD_ID}"
      - "$CARTHAGE build --no-skip-current --platform ios"
      - "$CARTHAGE archive $FRAMEWORK_NAME"

      - "ZIPFILE=$($CJ getNameVersionString --infoPlistPath $FRAMEWORK_NAME/Info.plist --productName $FRAMEWORK_NAME)-dev-${CI_BUILD_ID}.zip"
      - "rm -rf /tmp/$FRAMEWORK_NAME/"
      - "mkdir -p /tmp/$FRAMEWORK_NAME"
      - "mv $FRAMEWORK_NAME.framework.zip /tmp/$FRAMEWORK_NAME/$ZIPFILE"
   only:
    - master

   artifacts:
      paths:
      - /tmp/SynchronousRequestKit/