.gitlab-ci.yml 3.36 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
before_script: 
Drew's avatar
Drew committed
6
    - if ! which git; then apt-get update && apt-get install git --no-install-recommends -y; fi
Drew's avatar
Drew committed
7 8
    - git submodule update --init --recursive

9 10
variables:

Drew's avatar
Drew committed
11
testMac:
Drew's avatar
Drew committed
12 13
  type: test
  script:
Drew's avatar
Drew committed
14
    - atpm fetch --include NaOH.xcode-tests
Drew's avatar
Drew committed
15 16
    - killall -9 com.apple.CoreSimulator.CoreSimulatorService || true; killall Simulator || true
    - DEVELOPER_DIR=/Applications/Xcode8.app/Contents/Developer xcodebuild -scheme NaOH clean test
Drew's avatar
Drew committed
17
  tags:
Drew's avatar
Drew committed
18
    - xcode8symlink
Drew's avatar
Drew committed
19
    - atpm
Drew's avatar
Drew committed
20

21
testiOSSim64:
Drew's avatar
Drew committed
22 23
  type: test
  script:
Drew's avatar
Drew committed
24
    - atpm fetch --include NaOH.xcode-tests
Drew's avatar
Drew committed
25
    - killall -9 com.apple.CoreSimulator.CoreSimulatorService || true; killall Simulator || true
Drew's avatar
Drew committed
26
    - DEVELOPER_DIR=/Applications/Xcode8.app/Contents/Developer xcodebuild -scheme NaOHiOSTestHostApp -configuration Debug -destination "platform=iOS Simulator,name=iPhone 6" clean test
Drew's avatar
Drew committed
27
  tags:
Drew's avatar
Drew committed
28
    - xcode8symlink
Drew's avatar
Drew committed
29
    - atpm
Drew's avatar
Drew committed
30

Drew's avatar
Drew committed
31
testiOSSim32:
32 33
  type: test
  script:
Drew's avatar
Drew committed
34
    - atpm fetch --include NaOH.xcode-tests
Drew's avatar
Drew committed
35
    - killall -9 com.apple.CoreSimulator.CoreSimulatorService || true; killall Simulator || true
Drew's avatar
Drew committed
36
    - DEVELOPER_DIR=/Applications/Xcode8.app/Contents/Developer xcodebuild -scheme NaOHiOSTestHostApp -configuration Debug -destination "platform=iOS Simulator,name=iPhone 5" clean test
37
  tags:
Drew's avatar
Drew committed
38
    - xcode8symlink
Drew's avatar
Drew committed
39
    - atpm
40

Drew's avatar
Drew committed
41 42 43 44 45 46 47 48 49 50
# iosDeviceTest:
#   type: test
#   script:
#     - atpm fetch
#     - killall -9 com.apple.CoreSimulator.CoreSimulatorService || true; killall Simulator || true
#     - DEVELOPER_DIR=/Applications/Xcode8.app/Contents/Developer xcodebuild -scheme NaOHiOSTestHostApp -configuration Debug -destination "platform=iOS,name=DCA" clean test
#   tags:
#     - xcode8symlink
#     - iosDevice
#     - atpm
51

Drew's avatar
Drew committed
52
archiveiOS:
Drew's avatar
Drew committed
53 54
   type: package
   script:
Drew's avatar
Drew committed
55 56
      - killall -9 com.apple.CoreSimulator.CoreSimulatorService || true; killall Simulator || true
      - DEVELOPER_DIR=/Applications/Xcode8.app/Contents/Developer carthage build --no-skip-current --platform ios
57 58 59 60
      - mkdir binaries
      - cp -R Carthage/Build/iOS/* binaries/
      - strip -S -x binaries/NaOH.framework/NaOH
      - plutil -replace CFBundleVersion -string "$CI_BUILD_ID" binaries/NaOH.framework/Info.plist
Drew's avatar
Drew committed
61
   tags:
Drew's avatar
Drew committed
62
    - xcode8symlink
Drew's avatar
Drew committed
63

Drew's avatar
Drew committed
64 65
   artifacts:
      paths:
66 67 68
      - binaries/
      name: "NaOH-iOS-${CI_BUILD_REF_NAME}-${CI_BUILD_ID}"

Drew's avatar
Drew committed
69 70 71 72

archiveMac:
   type: package
   script:
Drew's avatar
Drew committed
73 74
      - killall -9 com.apple.CoreSimulator.CoreSimulatorService || true; killall Simulator || true
      - DEVELOPER_DIR=/Applications/Xcode8.app/Contents/Developer carthage build --no-skip-current --platform osx
75 76 77 78
      - mkdir binaries
      - cp -R Carthage/Build/Mac/* binaries/
      - strip -S -x binaries/NaOH.framework/NaOH 
      - plutil -replace CFBundleVersion -string "$CI_BUILD_ID" binaries/NaOH.framework/Versions/A/Resources/Info.plist
Drew's avatar
Drew committed
79

Drew's avatar
Drew committed
80
   artifacts:
Drew's avatar
Drew committed
81
      paths:
82
      - binaries
Drew's avatar
Drew committed
83
      name: "NaOH-OSX-${CI_BUILD_REF_NAME}-${CI_BUILD_ID}"
Drew's avatar
Drew committed
84

Drew's avatar
Drew committed
85
   tags:
Drew's avatar
Drew committed
86
    - xcode8symlink
Drew's avatar
Drew committed
87

Drew's avatar
Drew committed
88 89 90
atbuildMac:
  type: test
  script:
Drew's avatar
Drew committed
91
    - atpm fetch
Drew's avatar
Drew committed
92
    - atbuild check
Drew's avatar
Drew committed
93 94 95 96 97

  tags:
    - osx
    - atbuild
    - openswift
Drew's avatar
Drew committed
98
    - atpm
Drew's avatar
Drew committed
99 100 101

  artifacts:
    paths:
102 103
      - bin/NaOH.a
      - bin/NaOH.swiftmodule
Drew's avatar
Drew committed
104 105 106 107

linux:
  type: test
  script:
Drew's avatar
Drew committed
108 109
        - apt-get update && apt-get install --no-install-recommends xz-utils curl git ca-certificates atpm atbuild caroline-static-tool -y
        - atpm fetch
Drew's avatar
Drew committed
110
        - atbuild check
Drew's avatar
Drew committed
111
        
Drew's avatar
Drew committed
112
  image: drewcrawford/buildbase:latest
Drew's avatar
Drew committed
113

Drew's avatar
Drew committed
114
  tags:
Drew's avatar
Drew committed
115
  - autoscale-linux