.gitlab-ci.yml 2.88 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 28 29 30 31 32 33 34
  script:
    - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true
  artifacts:
    paths:
    - android/build/outputs/apk/*debug*.apk
    - android/build/outputs/apk/*iTest*.apk
    - desktop/build/libs/*debug*.jar
    - desktop/build/libs/*iTest*.jar
35
    - desktop/build/libs/*debug*.deb
36
    - desktop/build/outputs/*debug*.exe
37 38
    - ios/build/robovm/*debug*.ipa
    - ios/build/robovm/*iTest*.ipa
39 40 41 42 43 44 45 46 47 48 49 50 51
debug:
  stage: build
  except:
    - pre-release
    - release
  script:
    - ./gradlew clean
    - ./gradlew android:assemble -PTABLEXIA_ASSETS_UPLOAD=true
    - ./gradlew ios:assemble
  artifacts:
      expire_in: 2 weeks
      paths:
      - android/build/outputs/apk/*debug*.apk
52 53 54 55 56
      - desktop/build/libs/*debug*.jar
#      - desktop/build/outputApp/*debug*.app
      - desktop/build/outputs/*debug*.exe
      - desktop/build/libs/*debug*.deb
#      - ios/build/robovm/*debug*.ipa
57 58 59 60 61 62 63 64 65
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:
66
      when: always
67
      expire_in: 3 days
68
      paths:
69 70
      - desktop/build/libs/iTest_results/*.log
      - desktop/build/libs/iTest_results/*error.png
71 72 73 74 75 76 77 78 79 80 81 82 83 84
release:
  stage: build
  only:
    - tags
  script:
    - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true
  artifacts:
    paths:
    - android/build/outputs/apk/*debug*.apk
    - android/build/outputs/apk/*iTest*.apk
    - android/build/outputs/apk/*release*.apk
    - desktop/build/libs/*debug*.jar
    - desktop/build/libs/*iTest*.jar
    - desktop/build/libs/*release*.jar
85 86
    - desktop/build/libs/*debug*.deb
    - desktop/build/libs/*release*.deb
87 88
    - desktop/build/outputs/*debug*.exe
    - desktop/build/outputs/*release*.exe
89
    - ios/build/robovm/*debug*.ipa
90 91
    - desktop/build/outputApp/*debug*.app
    - desktop/build/outputApp/*release*.app
92 93
    - ios/build/robovm/*iTest*.ipa
    - ios/build/robovm/*release*.ipa