]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
pipeline: use make jobserver to run 3 compilationunits.sh in parallel
authorbones_was_here <bones_was_here@xa.org.au>
Mon, 21 Mar 2022 15:21:08 +0000 (01:21 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Mon, 21 Mar 2022 21:00:17 +0000 (07:00 +1000)
compilationunits.sh has 3 main tasks, one for each progs.
They were run sequentially without making use of multi threading.

Also make clean now removes the temp files created by compilationunits.sh

.gitlab-ci.yml
Makefile
qcsrc/Makefile
qcsrc/tools/compilationunits.sh

index 89ac1ce360ab8700f2cbd6d0d1ec1129b8a9bf65..cc7b5bd0628e4677a751066f984548dbe9b2408c 100644 (file)
@@ -22,7 +22,7 @@ test_compilation_units:
       - qcsrc/**/*\r
   stage: test\r
   script:\r
-    - ./qcsrc/tools/compilationunits.sh\r
+    - make test\r
 \r
 test_sv_game:\r
   stage: test\r
index ab7fa6c1b79fb076e17a833941af341c0d009d08..9ba235e48d70325d9535cbedb1454755ae52dc67 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,13 +23,13 @@ qc: check-cvars
 .PHONY: skin
 skin: gfx/menu/default/skinvalues.txt
 
+gfx/menu/default/skinvalues.txt: qcsrc/menu/skin-customizables.inc
+       $(PERL) qcsrc/menu/skin-customizables.inc > gfx/menu/default/skinvalues.txt
+
 .PHONY: clean
 clean:
        $(MAKE) -C qcsrc clean
 
-gfx/menu/default/skinvalues.txt: qcsrc/menu/skin-customizables.inc
-       $(PERL) qcsrc/menu/skin-customizables.inc > gfx/menu/default/skinvalues.txt
-
 .PHONY: sv
 sv:
        $(MAKE) -C qcsrc sv
@@ -37,3 +37,7 @@ sv:
 .PHONY: pk3
 pk3:
        $(MAKE) -C qcsrc pk3
+
+.PHONY: test
+test:
+       $(MAKE) -C qcsrc test
index f562bd4f69ea3b84651e6ae042fb27a9234b56e9..ee9e7e64ab9c6e6016fd362b3e2faca5a801b369 100644 (file)
@@ -81,6 +81,7 @@ clean: | $(WORKDIR)
        $(RM) $(WORKDIR)/qccversion.*
        $(RM) $(WORKDIR)/csprogs-*
        $(RM) $(WORKDIR)/autoexec/csprogs-*.cfg
+       $(RM) $(WORKDIR)/*.dat
        $(RM) csprogs-*.pk3
 
 .PHONY: qc
@@ -94,6 +95,12 @@ pk3: csprogs-$(VER).pk3
 
 
 
+COMPTESTS = test-server test-client test-menu
+.PHONY: test $(COMPTESTS)
+test: $(COMPTESTS)
+$(COMPTESTS):
+       tools/compilationunits.sh $@
+
 
 
 %-$(VER).pk3: $(PROGS_OUT)/%.dat
index 7a7ff17b6d554cbe6451ae2dda773ec81b017088..375b534ae5b250be072da68ac7363259e9e182ca 100755 (executable)
@@ -66,10 +66,10 @@ function check1() {
     MODE=${prog}
     includes="-include lib/_all.inc"
     [ -f ${prog}/_all.qh ] && includes="${includes} -include ${prog}/_all.qh"
-    qpp ${file} test.dat \
+    qpp ${file} test-${prog}.dat \
             ${includes} \
             -I. ${QCCIDENT} ${QCCDEFS} > ${WORKDIR}/${prog}.qc
-    qcc ${QCCFLAGS} -o ../${WORKDIR}/test.dat ../${WORKDIR}/${prog}.qc >/dev/null
+    qcc ${QCCFLAGS} -o ../${WORKDIR}/test-${prog}.dat ../${WORKDIR}/${prog}.qc >/dev/null
 }
 
 function check() {
@@ -85,6 +85,7 @@ if [ ${#@} -eq 0 ]; then
     check menu
 else
     for var in ${@}; do
+        var=${var#test-}
         check ${var}
     done
 fi