Skip to content

Commit

Permalink
CI: Add CentOS Python 3.8 jobs. See #227
Browse files Browse the repository at this point in the history
  • Loading branch information
tswilliams committed Jan 9, 2021
1 parent 0d81607 commit 9958148
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 17 deletions.
17 changes: 16 additions & 1 deletion ci/build-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
41 changes: 36 additions & 5 deletions ci/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

variables:
PYTHON: "python"
UHAL_ENABLE_IPBUS_MMAP: ""
VALGRIND_ARGS: "--suppressions=/opt/cactus/etc/uhal/tests/valgrind/uhal_tests.supp"

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
12 changes: 4 additions & 8 deletions config/Makefile.macros
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions uhal/tests/scripts/uhal_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
]
]]

Expand Down

0 comments on commit 9958148

Please sign in to comment.