Merge: Ci: move services to specific hostnames
[nit.git] / .gitlab-ci.yml
index 0c4e0a7..4b0f2ed 100644 (file)
@@ -11,6 +11,8 @@ variables:
 cache:
   paths:
     - .ccache
+    - .gradle/caches
+    - .gradle/wrapper
   key: "$CI_JOB_NAME"
 
 stages:
@@ -22,16 +24,19 @@ stages:
 before_script:
   - date
   - export CCACHE_DIR=$PWD/.ccache
+  - export GRADLE_USER_HOME=$PWD/.gradle
   - export PATH=$PWD/bin:$PATH
   - pwd
   - ccache -s
   - ccache -M 500M
+  - du -sh .gradle || true
   - type -a nitc nitdoc || true # is there some nit tools?
   - "> status.txt"
 
 after_script:
   - export CCACHE_DIR=$PWD/.ccache
   - ccache -s
+  - du -sh .gradle || true
   - git status --ignored
   - date
   - tail status.txt
@@ -89,7 +94,7 @@ nitunit_some:
   dependencies:
     - build_tools
   script:
-    - git diff --name-only origin/master..HEAD -- "*.nit" "*.res" "README.*" | grep -v "^tests/" > list0.txt
+    - git diff --name-only origin/master..HEAD -- "*.nit" "*.res" "README.*" | grep -v "^tests/" > list0.txt || true
     - xargs nitls -pP < list0.txt > list.txt
     - xargs nitunit < list.txt
   artifacts:
@@ -106,9 +111,19 @@ nitpick_full:
     - build_tools
   script:
     - nitls lib src examples contrib
-    - nitls -Pp lib src examples | grep -v -f tests/gitlab_ci.skip > list.txt # filter what is skipped by tests.sh
+    - nitls -Pp lib src examples | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
     - xargs nitpick < list.txt
 
+basic_android:
+  stage: test
+  dependencies:
+    - build_tools
+  script:
+    - make -C contrib/asteronits android
+  artifacts:
+    paths:
+      - contrib/asteronits/bin/*.apk
+
 # TEST FULL #########################################################
 
 test_full_nitcs:
@@ -208,7 +223,7 @@ nitunit_lib:
   dependencies:
     - build_tools
   script:
-    - nitls -Pp lib | grep -v -f tests/gitlab_ci.skip > list.txt # filter what is skipped by tests.sh
+    - nitls -Pp lib | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
     - xargs nitunit -v < list.txt| tee log.txt
     - grep -e KO log.txt > status.txt || true
     - tail -3 log.txt >> status.txt
@@ -225,7 +240,7 @@ nitunit_src:
   dependencies:
     - build_tools
   script:
-    - nitls -Pp src examples | grep -v -f tests/gitlab_ci.skip > list.txt # filter what is skipped by tests.sh
+    - nitls -Pp src examples | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
     - xargs nitunit -v < list.txt| tee log.txt
     - grep -e KO log.txt > status.txt || true
     - tail -3 log.txt >> status.txt
@@ -247,6 +262,21 @@ test_contribs:
     - test ! -s status.txt # no lines, no errors
   allow_failure: true
 
+test_contribs_android:
+  stage: more_test
+  dependencies:
+    - build_tools
+  script:
+    - misc/jenkins/check_contrib.sh android
+    - grep 'error message' *.xml > status.txt || true
+    - mkdir -p apk
+    - find . -name '*.apk' -exec cp {} apk/ ";"
+    - test ! -s status.txt # no lines, no errors
+  artifacts:
+    paths:
+      - "apk"
+    when: always
+
 build_oot:
   stage: more_test
   dependencies: