.gitlab-ci.yml 2.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Copyright (C) 2017 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

16 17 18 19 20 21
before_script:
  - security unlock-keychain -p jenkins /Users/jenkins/Library/Keychains/login.keychain
  - git submodule update --init --recursive

stages:
  - build
22
  - unitTest
23 24 25 26 27 28

debug:
  stage: build
  except:
    - release
  script:
29
    - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true
30 31
  artifacts:
    paths:
32
    - android/build/outputs/apk/*debug*.apk
33 34
    - android/build/outputs/apk/*iTest*.apk
    - android/build/outputs/apk/*release*.apk
35
    - desktop/build/libs/*debug*.jar
36
    - desktop/build/libs/*iTest*.jar
37
    - desktop/build/libs/*release*.jar
38
    - ios/build/robovm/*debug*.ipa
39
    - ios/build/robovm/*iTest*.ipa
40
    - ios/build/robovm/*release*.ipa
41

42 43 44 45 46
debugUnitTest:
  stage: unitTest
  except:
    - release
  script:
47
    - ./gradlew test -x prepareAssets -x prepareGraphicAssets -x prepareSoundAssets -x prepareJsonAssets -x processAssets -x runChecksum
48

49 50
release:
  stage: build
51 52
  except:
    - debug
53 54 55
  only:
    - tags
  script:
56
    - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true
57 58
  artifacts:
    paths:
59
    - android/build/outputs/apk/*debug*.apk
60 61
    - android/build/outputs/apk/*iTest*.apk
    - android/build/outputs/apk/*release*.apk
62
    - desktop/build/libs/*debug*.jar
63
    - desktop/build/libs/*iTest*.jar
64
    - desktop/build/libs/*release*.jar
65
    - ios/build/robovm/*debug*.ipa
66
    - ios/build/robovm/*iTest*.ipa
67
    - ios/build/robovm/*release*.ipa
68 69 70 71 72 73

releaseUnitTest:
  stage: unitTest
  only:
    - tags
  script:
74
    - ./gradlew test -x prepareAssets -x prepareGraphicAssets -x prepareSoundAssets -x prepareJsonAssets -x processAssets -x runChecksum