.gitlab-ci.yml 3.91 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
variables:
  XCSBOT: "fc03b092ecd597b3488984a34d029eec"
Drew's avatar
Drew committed
7
  XCSBOT_IOS: "8398cace692793b0b9d5ab1fe0964301"
Drew's avatar
Drew committed
8

Drew's avatar
Drew committed
9 10 11
  docker_tag: "NaOH"
  cli_executable: "NaOH"

12
  GITLAB_PROJECT_ID: "9"
Drew's avatar
Drew committed
13
  FRAMEWORK_NAME: "NaOH"
14

Drew's avatar
Drew committed
15
testMac:
Drew's avatar
Drew committed
16 17
  type: test
  script:
18 19 20
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI forceGitLabBranch --branchName CaveJohnsonAuto --hostname code.sealedabstract.com --projectID $GITLAB_PROJECT_ID"
    - "sleep 1" 
    - "XCSBUILDNO=`/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsIntegrateNow --botID $XCSBOT --hostname localhost --sslPolicy localhost`"
Drew's avatar
Drew committed
21
    - "echo XCS BUILDNO $XCSBUILDNO"
22 23
    - "/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
24 25
  except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
26
  tags:
Drew's avatar
Drew committed
27
    - xc7
Drew's avatar
Drew committed
28

Drew's avatar
Drew committed
29 30 31 32 33 34 35 36 37
testiOS:
  type: test
  script:
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI forceGitLabBranch --branchName CaveJohnsonAuto --hostname code.sealedabstract.com --projectID $GITLAB_PROJECT_ID"
    - "sleep 1" 
    - "XCSBUILDNO=`/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsIntegrateNow --botID $XCSBOT_IOS --hostname localhost --sslPolicy localhost`"
    - "echo XCS BUILDNO $XCSBUILDNO"
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI waitForIntegration --hostname localhost --botID $XCSBOT_IOS --sslPolicy localhost --buildNumber $XCSBUILDNO"
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsStatusToShell --hostname localhost --botID $XCSBOT_IOS --sslPolicy localhost --buildNumber $XCSBUILDNO"
Drew's avatar
Drew committed
38 39
  except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
40 41 42 43
  tags:
    - xc7

archiveiOS:
Drew's avatar
Drew committed
44 45 46 47
   type: package
   script:
      - "CJ=/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI"
      - "CARTHAGE=/usr/local/bin/carthage"
Drew's avatar
Drew committed
48
      - "$CJ setVersion --infoPlistPath ${FRAMEWORK_NAME}-iOS/Info.plist --version ${CI_BUILD_ID}"
Drew's avatar
Drew committed
49
      - "$CARTHAGE build --no-skip-current --platform ios"
Drew's avatar
Drew committed
50
      - "$CARTHAGE archive $FRAMEWORK_NAME"
Drew's avatar
Drew committed
51

Drew's avatar
Drew committed
52 53 54 55
      - "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"
Drew's avatar
Drew committed
56 57
   except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
58

Drew's avatar
Drew committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
   artifacts:
      paths:
      - /tmp/NaOH/

archiveMac:
   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"
      - "$CARTHAGE archive $FRAMEWORK_NAME --platform osx"

      - "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"
Drew's avatar
Drew committed
76 77
   except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
78

Drew's avatar
Drew committed
79
   artifacts:
Drew's avatar
Drew committed
80
      paths:
Drew's avatar
Drew committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
      - /tmp/NaOH/

atbuildMac:
  type: test
  script:
    - atbuild check

  tags:
    - osx
    - atbuild
    - openswift

  artifacts:
    paths:
      - .atllbuild/products/NaOH.a
      - .atllbuild/products/NaOH.swiftmodule

linux:
  type: test
  script:
        - docker build -t $docker_tag .
        - id=$(docker create $docker_tag)
        - mkdir bin
        - docker cp $id:$docker_tag/.atllbuild/products/${cli_executable}.swiftmodule bin/$cli_executable
        - docker cp $id:$docker_tag/.atllbuild/products/${cli_executable}.a bin/$cli_executable
        - docker rm -v $id
        - docker rmi $docker_tag
Drew's avatar
Drew committed
108 109 110
  artifacts: 
    paths:
        - bin/
Drew's avatar
Drew committed
111 112
  tags:
  - docker