.gitlab-ci.yml 2.54 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# 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/>.
before_script:
  - ./gradlew unlockIOSKeyChain
  - git submodule update --init --recursive
stages:
  - build
  - unitTest
  - iTest-desktop
22
pre-release:
23
  stage: build
24 25 26
  only:
    - master
    - devel
27
  script:
28
    - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true -PTABLEXIA_HD_ASSETS=true
29 30 31 32
  artifacts:
    paths:
    - android/build/outputs/apk/*debug*.apk
    - android/build/outputs/apk/*iTest*.apk
33 34
    - ios/build/robovm/*debug*.ipa
    - ios/build/robovm/*iTest*.ipa
35 36
    - desktop/build/libs/*debug*.jar
    - desktop/build/libs/*iTest*.jar
37
    - desktop/build/libs/*debug*.deb
38
    - desktop/build/outputs/*debug*.exe
39
    - desktop/build/outputApp/*debug*.app
40 41 42 43 44 45
debug:
  stage: build
  except:
    - pre-release
    - release
  script:
46
      - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true
47 48 49
  artifacts:
      expire_in: 2 weeks
      paths:
50 51 52 53 54
      - android/build/outputs/apk/*debug*.apk
      - android/build/outputs/apk/*iTest*.apk
      - ios/build/robovm/*debug*.ipa
      - ios/build/robovm/*iTest*.ipa
      - desktop/build/libs/*debug*.jar
55 56 57 58 59 60 61 62 63
unitTest:
  stage: unitTest
  script:
    - ./gradlew test -x prepareAssets -x prepareGraphicAssets -x prepareSoundAssets -x prepareJsonAssets -x processAssets -x runChecksum
iTest-desktop:
  stage: iTest-desktop
  script:
    - ./gradlew desktop:runITestBundle
  artifacts:
64
      when: always
65
      expire_in: 3 days
66
      paths:
67 68
      - desktop/build/libs/iTest_results/*.log
      - desktop/build/libs/iTest_results/*error.png
69 70 71 72 73
release:
  stage: build
  only:
    - tags
  script:
74
    - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true -PTABLEXIA_HD_ASSETS=true
75 76 77
  artifacts:
    paths:
    - android/build/outputs/apk/*release*.apk
78
    - ios/build/robovm/*release*.ipa
79
    - desktop/build/libs/*release*.jar
80
    - desktop/build/libs/*release*.deb
81
    - desktop/build/outputs/*release*.exe
82
    - desktop/build/outputApp/*release*.app