.gitlab-ci.yml 4.07 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

Drew's avatar
Drew committed
5 6 7
before_script: 
    - git submodule update --init --recursive

8 9
variables:
  XCSBOT: "fc03b092ecd597b3488984a34d029eec"
Drew's avatar
Drew committed
10
  XCSBOT_IOS: "8398cace692793b0b9d5ab1fe0964301"
Drew's avatar
Drew committed
11

Drew's avatar
Drew committed
12
  docker_tag: "naoh"
Drew's avatar
Drew committed
13 14
  cli_executable: "NaOH"

15
  GITLAB_PROJECT_ID: "9"
Drew's avatar
Drew committed
16
  FRAMEWORK_NAME: "NaOH"
17

Drew's avatar
Drew committed
18
testMac:
Drew's avatar
Drew committed
19 20
  type: test
  script:
21 22 23
    - "/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
24
    - "echo XCS BUILDNO $XCSBUILDNO"
25 26
    - "/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
27 28
  except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
29
  tags:
Drew's avatar
Drew committed
30
    - xc7
Drew's avatar
Drew committed
31

Drew's avatar
Drew committed
32 33 34 35 36 37 38 39 40
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
41 42
  except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
43 44 45 46
  tags:
    - xc7

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

Drew's avatar
Drew committed
55 56 57 58
      - "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
59 60
   except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
61

Drew's avatar
Drew committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
   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
79 80
   except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
81

Drew's avatar
Drew committed
82
   artifacts:
Drew's avatar
Drew committed
83
      paths:
Drew's avatar
Drew committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
      - /tmp/NaOH/

atbuildMac:
  type: test
  script:
    - atbuild check

  tags:
    - osx
    - atbuild
    - openswift

  artifacts:
    paths:
      - .atllbuild/products/NaOH.a
      - .atllbuild/products/NaOH.swiftmodule
Drew's avatar
Drew committed
100 101
  except:
    - CaveJohnsonAuto
Drew's avatar
Drew committed
102 103 104 105

linux:
  type: test
  script:
Drew's avatar
Drew committed
106
        - echo $docker_tag "docker_tag"
Drew's avatar
Drew committed
107 108 109 110 111 112 113
        - 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
114 115 116
  artifacts: 
    paths:
        - bin/
Drew's avatar
Drew committed
117 118 119 120

  except:
    - CaveJohnsonAuto

Drew's avatar
Drew committed
121 122
  tags:
  - docker