26 - export CCACHE_DIR=$PWD/.ccache
27 - export GRADLE_USER_HOME=$PWD/.gradle
28 - export PATH=$PWD/bin:$PATH
29 - git config --add github.oauthtoken "$GITHUB_OAUTHTOKEN" # needed for github api rate limit
33 - du -sh .gradle || true
34 - type -a nitc nitdoc || true # is there some nit tools?
38 - export CCACHE_DIR=$PWD/.ccache
40 - du -sh .gradle || true
41 - git status --ignored || true
45 # BASIC JOBS ########################################################
50 - misc/jenkins/checkwhitespaces.sh | tee -a status.txt
51 - misc/jenkins/checksignedoffby.sh | tee -a status.txt
52 - misc/jenkins/checklicense.sh | tee -a status.txt
54 build_tools: &build_tools
59 - misc/jenkins/check_manpages.sh
74 - ./search_tests_git.sh origin/master HEAD > list
75 - ./testall.sh `cat list` | tee log.txt
76 - grep -v '=>' log.txt > ../status.txt || true
90 - git diff --name-only origin/master..HEAD -- "*.nit" "*.res" "README.*" | grep -v "^tests/" > list0.txt || true
91 - xargs nitls -pP < list0.txt > list.txt
92 - xargs nitunit < list.txt
93 - junit2html nitunit.xml
107 - nitls lib src examples contrib
108 - nitls -Pp lib src examples | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
109 - xargs nitpick < list.txt
116 - make -C contrib/asteronits android
119 - contrib/asteronits/bin/*.apk
121 # TEST FULL #########################################################
123 test_full_nitcs: &test_full_nitcs
128 - share/android-bdwgc/setup.sh
130 - ./testfull.sh | tee log.txt
131 - grep -v '=>' log.txt > ../status.txt || true
148 - ./testfull.sh --engine niti | tee log.txt
149 - grep -v '=>' log.txt > ../status.txt || true
166 - ./testfull.sh --engine nitcg | tee log.txt
167 - grep -v '=>' log.txt > ../status.txt || true
184 - ./testfull.sh --engine nitce | tee log.txt
185 - grep -v '=>' log.txt > ../status.txt || true
202 - ./testfull.sh --engine nitcsg | tee log.txt
203 - grep -v '=>' log.txt > ../status.txt || true
214 # LIB, CONTRIB AND OOT ##############################################
221 - nitls -Pp lib | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
222 - xargs nitunit -v < list.txt| tee log.txt
223 - grep -e KO log.txt > status.txt || true
224 - tail -3 log.txt >> status.txt
225 - junit2html nitunit.xml
239 - nitls -Pp src examples | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
240 - xargs nitunit -v < list.txt| tee log.txt
241 - grep -e KO log.txt > status.txt || true
242 - tail -3 log.txt >> status.txt
243 - junit2html nitunit.xml
257 - misc/jenkins/check_contrib.sh all check
258 - grep 'error message' *.xml > status.txt || true
259 - test ! -s status.txt # no lines, no errors
261 test_contribs_android:
266 - misc/jenkins/check_contrib.sh android
267 - grep 'error message' *.xml > status.txt || true
269 - find . -name '*.apk' -exec mv {} apk/debug/ ";"
270 - test ! -s status.txt # no lines, no errors
271 - misc/jenkins/check_contrib.sh android-release
272 - grep 'error message' *.xml > status.txt || true
273 - mkdir -p apk/release
274 - find . -name '*.apk' -exec mv {} apk/release ";"
275 - test ! -s status.txt # no lines, no errors
288 - grep 'error message' *.xml > ../status.txt || true
289 # Errors are somewhat expected
291 # MISC ##############################################################
297 - date # cancel the default `before_script`, an empty list does nothing
298 script: # from the README
299 - apt-get update && apt-get install --yes --no-install-recommends build-essential ccache libgc-dev libunwind-dev pkg-config
301 - bin/nitc examples/hello_world.nit
303 - . misc/nit_env.sh install
304 - nitc examples/hello_world.nit
306 - apt-get update && apt-get install --yes --no-install-recommends graphviz libcurl4-openssl-dev libevent-dev libmongoc-dev
324 - ./bench_engines.sh --fast --fast --html options
325 - grep -B1 'error message' *.xml | grep testcase > ../status.txt || true
335 # MORE TOOLS ########################################################
343 - make -C "contrib/nitcc"
356 - mkdir -p valgrind.out
357 - nitc src/nitc.nit # To warm-up the cache
358 - src/valgrind.sh --callgrind-out-file=valgrind.out/nitc.nitc.out nitc src/nitc.nit -vv
359 - callgrind_annotate valgrind.out/nitc.nitc.out > valgrind.out/nitc.nitc.txt
360 - src/valgrind.sh --callgrind-out-file=valgrind.out/niti.niti.out nit -- src/nit.nit tests/base_simple3.nit -vv
361 - callgrind_annotate valgrind.out/niti.niti.out > valgrind.out/niti.niti.txt
372 - nitdoc -d nitdoc.out --keep-going lib src
382 - nitmetrics --all --log --log-dir nitmetrics.out --dir nitmetrics.out --keep-going lib src
392 - misc/jenkins/check_contrib.sh pre-build
397 - nitcatalog -d catalog.out lib/ examples/ contrib/ contrib/oot/
416 test_full_nitcs_macos: