.gitlab-ci.yml 2.22 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
# 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
debug:
  stage: build
  except:
    - release
  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
34
    - desktop/build/outputs/*debug*.exe
35 36 37 38 39 40 41 42 43 44 45
    - ios/build/robovm/*debug*.ipa
    - ios/build/robovm/*iTest*.ipa
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:
46
      when: always
47
      expire_in: 3 days
48
      paths:
49 50
      - desktop/build/libs/iTest_results/*.log
      - desktop/build/libs/iTest_results/*error.png
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
release:
  stage: build
  except:
    - debug
  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
67 68
    - desktop/build/outputs/*debug*.exe
    - desktop/build/outputs/*release*.exe
69 70 71
    - ios/build/robovm/*debug*.ipa
    - ios/build/robovm/*iTest*.ipa
    - ios/build/robovm/*release*.ipa