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
34 - du -sh .gradle || true
35 - type -a nitc nitdoc || true # is there some nit tools?
39 - export CCACHE_DIR=$PWD/.ccache
41 - du -sh .gradle || true
42 - git status --ignored || true
46 # BASIC JOBS ########################################################
51 - misc/jenkins/checkwhitespaces.sh | tee -a status.txt
52 - misc/jenkins/checksignedoffby.sh | tee -a status.txt
53 - misc/jenkins/checklicense.sh | tee -a status.txt
55 build_tools: &build_tools
60 - misc/jenkins/check_manpages.sh
75 - ./search_tests_git.sh origin/master HEAD > list
76 - ./testall.sh `cat list` | tee log.txt
77 - grep -v '=>' log.txt > ../status.txt || true
91 - git diff --name-only origin/master..HEAD -- "*.nit" "*.res" "README.*" | grep -v "^tests/\|contrib/" > list0.txt || true
92 - xargs nitls -pP < list0.txt > list.txt
93 - test -s list.txt || exit 0
94 - xargs nitunit < list.txt
95 - junit2html nitunit.xml
109 - nitls lib src examples contrib
110 - nitls -Pp lib src examples | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
111 - xargs nitpick < list.txt
118 - make -C contrib/asteronits android
121 - contrib/asteronits/bin/*.apk
123 # TEST FULL #########################################################
125 test_full_nitcs: &test_full_nitcs
130 - share/android-bdwgc/setup.sh
132 - ./testfull.sh | tee log.txt
133 - grep -v '=>' log.txt > ../status.txt || true
150 - ./testfull.sh --engine niti | tee log.txt
151 - grep -v '=>' log.txt > ../status.txt || true
168 - ./testfull.sh --engine nitcg | tee log.txt
169 - grep -v '=>' log.txt > ../status.txt || true
186 - ./testfull.sh --engine nitce | tee log.txt
187 - grep -v '=>' log.txt > ../status.txt || true
204 - ./testfull.sh --engine nitcsg | tee log.txt
205 - grep -v '=>' log.txt > ../status.txt || true
216 # LIB, CONTRIB AND OOT ##############################################
223 - nitls -Pp lib | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
224 - xargs nitunit -v < list.txt| tee log.txt
225 - grep -e KO log.txt > status.txt || true
226 - tail -3 log.txt >> status.txt
227 - junit2html nitunit.xml
241 - nitls -Pp src examples | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
242 - xargs nitunit -v < list.txt| tee log.txt
243 - grep -e KO log.txt > status.txt || true
244 - tail -3 log.txt >> status.txt
245 - junit2html nitunit.xml
259 - misc/jenkins/check_contrib.sh all check
260 - grep 'error message' *.xml > status.txt || true
261 - test ! -s status.txt # no lines, no errors
263 test_contribs_android:
268 - misc/jenkins/check_contrib.sh android
269 - grep 'error message' *.xml > status.txt || true
271 - find . -name '*.apk' -exec mv {} apk/debug/ ";"
272 - test ! -s status.txt # no lines, no errors
273 - misc/jenkins/check_contrib.sh android-release
274 - grep 'error message' *.xml > status.txt || true
275 - mkdir -p apk/release
276 - find . -name '*.apk' -exec mv {} apk/release ";"
277 - test ! -s status.txt # no lines, no errors
290 - grep 'error message' *.xml > ../status.txt || true
291 # Errors are somewhat expected
293 # MISC ##############################################################
299 - date # cancel the default `before_script`, an empty list does nothing
300 script: # from the README
301 - apt-get update && apt-get install --yes --no-install-recommends build-essential ccache libgc-dev libunwind-dev pkg-config
303 - bin/nitc examples/hello_world.nit
305 - . misc/nit_env.sh install
306 - nitc examples/hello_world.nit
308 - apt-get update && apt-get install --yes --no-install-recommends graphviz libcurl4-openssl-dev libevent-dev libmongoc-dev
326 - ./bench_engines.sh --fast --fast --html options
327 - grep -B1 'error message' *.xml | grep testcase > ../status.txt || true
337 # MORE TOOLS ########################################################
345 - make -C "contrib/nitcc"
358 - mkdir -p valgrind.out
359 - nitc src/nitc.nit # To warm-up the cache
360 - src/valgrind.sh --callgrind-out-file=valgrind.out/nitc.nitc.out nitc src/nitc.nit -vv
361 - callgrind_annotate valgrind.out/nitc.nitc.out > valgrind.out/nitc.nitc.txt
362 - src/valgrind.sh --callgrind-out-file=valgrind.out/niti.niti.out nit -- src/nit.nit tests/base_simple3.nit -vv
363 - callgrind_annotate valgrind.out/niti.niti.out > valgrind.out/niti.niti.txt
374 - nitdoc -d nitdoc.out --keep-going lib src
382 - apt-get update && apt-get install --yes --no-install-recommends pandoc texlive texlive-latex-extra lmodern
394 - mkdir -p nitmetrics.out
395 - nitmetrics --all --log --log-dir nitmetrics.out --dir nitmetrics.out --keep-going lib src | tee nitmetrics.out/metrics.txt
405 - misc/jenkins/check_contrib.sh pre-build
410 - nitcatalog -d catalog.out lib/ examples/ contrib/ contrib/oot/
427 test_full_nitcs_macos:
441 - benchmarks/bench_old.sh
442 allow_failure: true # time is unreliable. manual check required