diff --git a/ci/build-rpm.yml b/ci/build-rpm.yml index 424223257..8a665f2fa 100644 --- a/ci/build-rpm.yml +++ b/ci/build-rpm.yml @@ -30,11 +30,18 @@ build:centos7: build:centos8: extends: .template_build_rpm_yumrepo - image: ${IPBUS_DOCKER_REGISTRY}/ipbus-sw-dev-centos8:2020-06-13__boost1.66.0_pugixml1.9 + image: ${IPBUS_DOCKER_REGISTRY}/ipbus-sw-dev-centos8:2020-01-08__boost1.66.0_pugixml1.11 variables: YUMGROUPS_FILE: ci/yum/yumgroups-centos7.xml OUTPUT_REPO_SUBDIR: centos8/x86_64 +build:centos8-python38: + extends: .template_build_rpm_yumrepo + image: ${IPBUS_DOCKER_REGISTRY}/ipbus-sw-dev-centos8-python38:2020-01-08__boost1.66.0_pugixml1.11 + variables: + YUMGROUPS_FILE: ci/yum/yumgroups-centos7.xml + OUTPUT_REPO_SUBDIR: centos8_python38/x86_64 + build:centos7-gcc8: stage: build @@ -89,3 +96,11 @@ publish:yum:centos8: DEPLOY_SUBDIR: repos/centos8/x86_64 needs: - build:centos8 + +publish:yum:centos8-python38: + extends: .template_publish + variables: + CI_OUTPUT_DIR: ci_results/repos/centos8_python38/x86_64 + DEPLOY_SUBDIR: repos/centos8_python38/x86_64 + needs: + - build:centos8-python38 diff --git a/ci/tests.yml b/ci/tests.yml index db5040bbb..8e887d8be 100644 --- a/ci/tests.yml +++ b/ci/tests.yml @@ -1,5 +1,6 @@ variables: + PYTHON: "python" UHAL_ENABLE_IPBUS_MMAP: "" VALGRIND_ARGS: "--suppressions=/opt/cactus/etc/uhal/tests/valgrind/uhal_tests.supp" @@ -15,10 +16,9 @@ variables: - cat /etc/yum.repos.d/ipbus-sw-ci.repo - sudo rpm --rebuilddb && sudo yum clean all - sudo yum -y groupinstall ${YUM_GROUPINSTALL_ARGUMENTS} ipbus-sw - - if [ "$REPO_URL_OS_SUBDIR" != "centos8/x86_64" ]; then sudo yum -y install 'cactuscore-uhal-*-debuginfo'; fi + - if [[ ! "$REPO_URL_OS_SUBDIR" =~ ^centos8.+ ]]; then sudo yum -y install 'cactuscore-uhal-*-debuginfo'; fi - rpm -qa | grep cactus | sort - .template_test:centos7: extends: .template_test_rpmInstall image: ${IPBUS_DOCKER_REGISTRY}/ipbus-sw-test-centos7:2020-06-13 @@ -57,11 +57,25 @@ variables: - job: publish:yum:centos8 artifacts: false variables: + PYTHON: "python3.6" REPO_URL_OS_SUBDIR: centos8/x86_64 TEST_SUITE_CONTROLHUB_PATH_ARGUMENT: "-p /opt/cactus/bin" YUM_GROUPINSTALL_ARGUMENTS: "--enablerepo=PowerTools" UHAL_GUI_DEPENDENCIES: "python3-numpy" +.template_test:centos8-python38: + extends: .template_test_rpmInstall + image: ${IPBUS_DOCKER_REGISTRY}/ipbus-sw-test-centos8:2020-06-13 + needs: + - job: publish:yum:centos8-python38 + artifacts: false + variables: + PYTHON: "python3.8" + REPO_URL_OS_SUBDIR: centos8_python38/x86_64 + TEST_SUITE_CONTROLHUB_PATH_ARGUMENT: "-p /opt/cactus/bin" + UHAL_GUI_DEPENDENCIES: "python38-numpy" + YUM_GROUPINSTALL_ARGUMENTS: "--enablerepo=PowerTools" + .template_test_simpleInstall: stage: test @@ -109,20 +123,20 @@ variables: script: - export PATH=/opt/cactus/bin/uhal/tests:$PATH - export LD_LIBRARY_PATH=/opt/cactus/lib:$LD_LIBRARY_PATH - - uhal_test_suite.py -v -s pycohal + - ${PYTHON} $(which uhal_test_suite.py) -v -s pycohal .job_template: &test_gui_jobScript script: - 'if [ -x "$(command -v yum)" ]; then sudo yum -y install ${UHAL_GUI_DEPENDENCIES} ; else sudo apt-get update && sudo apt-get -y install python-wx* ; fi' - export PATH=/opt/cactus/bin/uhal/tests:$PATH - export LD_LIBRARY_PATH=/opt/cactus/lib:$LD_LIBRARY_PATH - - uhal_test_suite.py -v -s gui + - ${PYTHON} $(which uhal_test_suite.py) -v -s gui .job_template: &test_tools_jobScript script: - export PATH=/opt/cactus/bin/uhal/tests:/opt/cactus/bin/uhal/tools:$PATH - export LD_LIBRARY_PATH=/opt/cactus/lib:$LD_LIBRARY_PATH - - uhal_test_suite.py -v -s tools + - ${PYTHON} $(which uhal_test_suite.py) -v -s tools .job_template: &test_controlhub_service_jobScript script: @@ -202,6 +216,23 @@ test_controlhub:centos8: <<: *test_controlhub_plainScripts_jobScript +test_core:centos8-python38: + extends: .template_test:centos8-python38 + <<: *test_core_jobScript + +test_python:centos8-python38: + extends: .template_test:centos8-python38 + <<: *test_python_jobScript + +test_tools:centos8-python38: + extends: .template_test:centos8-python38 + <<: *test_tools_jobScript + +test_controlhub:centos8-python38: + extends: .template_test:centos8-python38 + <<: *test_controlhub_plainScripts_jobScript + + test_core:fedora30-python2: extends: .template_test:fedora30-python2 <<: *test_core_jobScript diff --git a/config/Makefile.macros b/config/Makefile.macros index 46210ccf8..b77ba1679 100644 --- a/config/Makefile.macros +++ b/config/Makefile.macros @@ -6,20 +6,16 @@ CACTUS_RPM_ROOT ?= $(BUILD_HOME) PYTHON ?= python -CACTUS_PLATFORM=$(shell ${PYTHON} -c "import platform; print(platform.platform())") +CACTUS_PLATFORM=$(shell cat /etc/system-release) CACTUS_OS=unknown.os UNAME=$(strip $(shell uname -s)) ifeq ($(UNAME),Linux) - ifneq ($(findstring redhat-5,$(CACTUS_PLATFORM)),) - CACTUS_OS=slc5 - else ifneq ($(findstring redhat-6,$(CACTUS_PLATFORM)),) + ifneq ($(findstring Scientific Linux CERN SLC release 6,$(CACTUS_PLATFORM)),) CACTUS_OS=slc6 - else ifneq ($(findstring centos-6,$(CACTUS_PLATFORM)),) - CACTUS_OS=centos6 - else ifneq ($(findstring centos-7,$(CACTUS_PLATFORM)),) + else ifneq ($(findstring CentOS Linux release 7,$(CACTUS_PLATFORM)),) CACTUS_OS=centos7 - else ifneq ($(findstring centos-8,$(CACTUS_PLATFORM)),) + else ifneq ($(findstring CentOS Linux release 8,$(CACTUS_PLATFORM)),) CACTUS_OS=centos8 endif else ifeq ($(UNAME),Darwin) diff --git a/uhal/tests/scripts/uhal_test_suite.py b/uhal/tests/scripts/uhal_test_suite.py index 082a14aaf..a1668c811 100755 --- a/uhal/tests/scripts/uhal_test_suite.py +++ b/uhal/tests/scripts/uhal_test_suite.py @@ -146,17 +146,17 @@ def get_commands(conn_file, controlhub_scripts_dir, uhal_tools_template_vhdl): cmds += [["TEST PYCOHAL", ["DummyHardwareUdp.exe --version 1 --port 50001", - "test_pycohal -c %s -v" % (conn_file), + sys.executable + " $(which test_pycohal) -c %s -v" % (conn_file), "KILL_BACKGROUND_PROCS"] ]] cmds += [["TEST uHAL GUI", - ["/usr/bin/python -c \"import uhal.gui.test.test_uhal_gui;uhal.gui.test.test_uhal_gui.main()\""] + [sys.executable + " -c \"import uhal.gui.test.test_uhal_gui;uhal.gui.test.test_uhal_gui.main()\""] ]] cmds += [["TEST uHAL TOOLS", [#uhal.tools.ipbus_addr_map - "gen_ipbus_addr_decode -t %s %s" % (uhal_tools_template_vhdl, join(os.path.split(uhal_tools_template_vhdl)[0],'addr_table.xml')), + sys.executable + " $(which gen_ipbus_addr_decode) -t %s %s" % (uhal_tools_template_vhdl, join(os.path.split(uhal_tools_template_vhdl)[0],'addr_table.xml')), ] ]]