10 POSTGRES_HOST_AUTH_METHOD: trust
27 - export CCACHE_DIR=$PWD/.ccache
28 - export GRADLE_USER_HOME=$PWD/.gradle
29 - export PATH=$PWD/bin:$PATH
30 - git config --add github.oauthtoken "$GITHUB_OAUTHTOKEN" # needed for github api rate limit
35 - du -sh .gradle || true
36 - type -a nitc nitdoc || true # is there some nit tools?
40 - export CCACHE_DIR=$PWD/.ccache
42 - du -sh .gradle || true
43 - git status --ignored || true
47 # BASIC JOBS ########################################################
52 - misc/jenkins/checkwhitespaces.sh | tee -a status.txt
53 - misc/jenkins/checksignedoffby.sh | tee -a status.txt
54 - misc/jenkins/checklicense.sh | tee -a status.txt
56 build_tools: &build_tools
61 - misc/jenkins/check_manpages.sh
76 - ./search_tests_git.sh origin/master HEAD > list
77 - ./testall.sh `cat list` | tee log.txt
78 - grep -v '=>' log.txt > ../status.txt || true
92 - git diff --name-only origin/master..HEAD -- "*.nit" "*.res" "README.*" | grep -v "^tests/\|contrib/" > list0.txt || true
93 - xargs nitls -pP < list0.txt > list.txt
94 - test -s list.txt || exit 0
95 - xargs nitunit < list.txt
96 - junit2html nitunit.xml
110 - nitls lib src examples contrib
111 - nitls -Pp lib src examples | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
112 - xargs nitpick < list.txt
119 - make -C contrib/asteronits android
122 - contrib/asteronits/bin/*.apk
124 # TEST FULL #########################################################
126 test_full_nitcs: &test_full_nitcs
131 - share/android-bdwgc/setup.sh
133 - ./testfull.sh | tee log.txt
134 - grep -v '=>' log.txt > ../status.txt || true
151 - ./testfull.sh --engine niti | tee log.txt
152 - grep -v '=>' log.txt > ../status.txt || true
169 - ./testfull.sh --engine nitcg | tee log.txt
170 - grep -v '=>' log.txt > ../status.txt || true
187 - ./testfull.sh --engine nitce | tee log.txt
188 - grep -v '=>' log.txt > ../status.txt || true
205 - ./testfull.sh --engine nitcsg | tee log.txt
206 - grep -v '=>' log.txt > ../status.txt || true
217 # LIB, CONTRIB AND OOT ##############################################
224 - nitls -Pp lib | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
225 - xargs nitunit -v < list.txt| tee log.txt
226 - grep -e KO log.txt > status.txt || true
227 - tail -3 log.txt >> status.txt
228 - junit2html nitunit.xml
242 - nitls -Pp src examples | grep -v -f tests/gitlab_ci.skip > list.txt || true # filter what is skipped by tests.sh
243 - xargs nitunit -v < list.txt| tee log.txt
244 - grep -e KO log.txt > status.txt || true
245 - tail -3 log.txt >> status.txt
246 - junit2html nitunit.xml
260 - misc/jenkins/check_contrib.sh all check
261 - grep 'error message' *.xml > status.txt || true
262 - test ! -s status.txt # no lines, no errors
264 test_contribs_android:
269 - misc/jenkins/check_contrib.sh android
270 - grep 'error message' *.xml > status.txt || true
272 - find . -name '*.apk' -exec mv {} apk/debug/ ";"
273 - test ! -s status.txt # no lines, no errors
274 - misc/jenkins/check_contrib.sh android-release
275 - grep 'error message' *.xml > status.txt || true
276 - mkdir -p apk/release
277 - find . -name '*.apk' -exec mv {} apk/release ";"
278 - test ! -s status.txt # no lines, no errors
291 - grep 'error message' *.xml > ../status.txt || true
292 # Errors are somewhat expected
294 # MISC ##############################################################
300 - date # cancel the default `before_script`, an empty list does nothing
301 script: # from the README
302 - apt-get update && apt-get install --yes --no-install-recommends build-essential ccache libgc-dev libunwind-dev pkg-config
304 - bin/nitc examples/hello_world.nit
306 - . misc/nit_env.sh install
307 - nitc examples/hello_world.nit
309 - apt-get update && apt-get install --yes --no-install-recommends graphviz libcurl4-openssl-dev libevent-dev libmongoc-dev
327 - ./bench_engines.sh --fast --fast --html options
328 - grep -B1 'error message' *.xml | grep testcase > ../status.txt || true
342 - nitunit doc/manual/*.nit
343 - junit2html nitunit.xml
352 # MORE TOOLS ########################################################
360 - make -C "contrib/nitcc"
373 - mkdir -p valgrind.out
374 - nitc src/nitc.nit # To warm-up the cache
375 - src/valgrind.sh --callgrind-out-file=valgrind.out/nitc.nitc.out nitc src/nitc.nit -vv
376 - callgrind_annotate valgrind.out/nitc.nitc.out > valgrind.out/nitc.nitc.txt
377 - src/valgrind.sh --callgrind-out-file=valgrind.out/niti.niti.out nit -- src/nit.nit tests/base_simple3.nit -vv
378 - callgrind_annotate valgrind.out/niti.niti.out > valgrind.out/niti.niti.txt
389 - nitdoc -d nitdoc.out --keep-going lib src
397 - apt-get update && apt-get install --yes --no-install-recommends pandoc texlive texlive-latex-extra lmodern
409 - mkdir -p nitmetrics.out
410 - nitmetrics --all --log --log-dir nitmetrics.out --dir nitmetrics.out --keep-going lib src | tee nitmetrics.out/metrics.txt
420 - misc/jenkins/check_contrib.sh pre-build
425 - nitcatalog -d catalog.out lib/ examples/ contrib/ contrib/oot/
442 test_full_nitcs_macos:
456 - benchmarks/bench_old.sh
457 allow_failure: true # time is unreliable. manual check required
469 - $project_dir = "$CI_PROJECT_DIR" -replace "\\", "\\\"
470 - $converted_project_dir = $(c:\msys64\usr\bin\bash -l -c "cygpath -u $project_dir")
471 - c:\msys64\usr\bin\env MSYSTEM=MINGW64 c:\msys64\usr\bin\bash -l -c "cd $converted_project_dir; make"