Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ubuntu 24.04 tests #19

Merged
merged 14 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/debian10_py3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get -qq update && apt-get -qq install -y libterm-readline-gnu-perl softw
RUN curl http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
RUN add-apt-repository "deb http://repos.pni-hdri.de/apt/debian buster main" -y
RUN apt-get -qq update && apt-get -qq -y dist-upgrade
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread4-dev libzmq3-dev
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread4-dev libzmq3-dev python3-setuptools
RUN useradd -ms /bin/bash tango
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mysql-server mysql-server/root_password password rootpw"'
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mysql-server mysql-server/root_password_again password rootpw"'
Expand Down
2 changes: 1 addition & 1 deletion .ci/debian11_py3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN wget --retry-connrefused http://repos.pni-hdri.de/debian_repo.pub.gpg
RUN apt-key add debian_repo.pub.gpg
RUN add-apt-repository "deb http://repos.pni-hdri.de/apt/debian buster main" -y
RUN apt-get -qq update && apt-get -qq -y dist-upgrade
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread4-dev libzmq3-dev
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread4-dev libzmq3-dev python3-setuptools
RUN useradd -ms /bin/bash tango
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mysql-server mysql-server/root_password password rootpw"; debconf-set-selections <<< "mysql-server mysql-server/root_password_again password rootpw"; debconf-set-selections <<< "mariadb-server mysql-server/root_password password rootpw"; debconf-set-selections <<< "mariadb-server mysql-server/root_password_again password rootpw"; debconf-get-selections |grep mysql '
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq install -y default-mysql-server adduser
Expand Down
2 changes: 1 addition & 1 deletion .ci/debian12_py3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-key add debian_repo.pub.gpg
RUN cd /etc/apt/sources.list.d && wget http://repos.pni-hdri.de/bookworm-pni-hdri.list

RUN apt-get -qq update && apt-get -qq -y dist-upgrade
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread4-dev libzmq3-dev
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread4-dev libzmq3-dev python3-setuptools
RUN useradd -ms /bin/bash tango
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mysql-server mysql-server/root_password password rootpw"; debconf-set-selections <<< "mysql-server mysql-server/root_password_again password rootpw"; debconf-set-selections <<< "mariadb-server mysql-server/root_password password rootpw"; debconf-set-selections <<< "mariadb-server mysql-server/root_password_again password rootpw"; debconf-get-selections |grep mysql '
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq install -y default-mysql-server adduser
Expand Down
2 changes: 1 addition & 1 deletion .ci/debian9_py2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get -qq update && apt-get -qq install -y libterm-readline-gnu-perl softw
RUN curl http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
RUN add-apt-repository "deb http://repos.pni-hdri.de/apt/debian stretch main" -y
RUN apt-get -qq update && apt-get -qq -y dist-upgrade
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python-h5py python-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread3-dev libzmq3-dev
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python-h5py python-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread3-dev libzmq3-dev python-setuptools
# RUN apt-get -qq install -y python-pni
RUN useradd -ms /bin/bash tango
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mysql-server mysql-server/root_password password rootpw"'
Expand Down
2 changes: 1 addition & 1 deletion .ci/debian9_py3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get -qq update && apt-get -qq install -y libterm-readline-gnu-perl softw
RUN curl http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
RUN add-apt-repository "deb http://repos.pni-hdri.de/apt/debian stretch main" -y
RUN apt-get -qq update && apt-get -qq -y dist-upgrade
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread3-dev libzmq3-dev
RUN apt-get -qq update && apt-get -qq install -y default-mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libomnithread3-dev libzmq3-dev python3-setuptools
# RUN apt-get -qq install -y python3-pni
RUN useradd -ms /bin/bash tango
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mysql-server mysql-server/root_password password rootpw"'
Expand Down
31 changes: 22 additions & 9 deletions .ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,40 @@


# workaround for a bug in debian9, i.e. starting mysql hangs
if [ "$1" = "debian11" ] || [ "$1" = "debian12" ]; then
if [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "ubuntu24.04" ]; then
docker exec --user root ndts service mariadb restart
else
docker exec --user root ndts service mysql stop
if [ "$1" = "ubuntu23.10" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ]; then
if [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ]; then
docker exec --user root ndts /bin/bash -c 'usermod -d /var/lib/mysql/ mysql'
fi
docker exec --user root ndts service mysql start
# docker exec --user root ndts /bin/bash -c '$(service mysql start &) && sleep 30'
fi

echo "install tango-db"
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-db tango-common; sleep 10'
if [ "$?" -ne "0" ]; then exit 255; fi

if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ] || [ "$1" = "ubuntu21.10" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu23.10" ]; then
echo "install tango-common"
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-common; sleep 10'
if [ "$1" = "ubuntu24.04" ]; then
# docker exec --user tango ndts /bin/bash -c '/usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::10000 &'
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=root\npassword=rootpw" > /root/.my.cnf'
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=tango\nhost=localhost\npassword=rootpw" > /var/lib/tango/.my.cnf'
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON tango.* TO "tango"@"%" identified by "rootpw"'
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON tango.* TO "tango"@"localhost" identified by "rootpw"'
docker exec --user root ndts /usr/bin/mysql -e 'FLUSH PRIVILEGES'
fi
if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ] || [ "$1" = "ubuntu21.10" ] || [ "$1" = "ubuntu22.04" ]; then
# docker exec --user tango ndts /bin/bash -c '/usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::10000 &'
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=root\npassword=rootpw" > /root/.my.cnf'
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=tango\nhost=127.0.0.1\npassword=rootpw" > /var/lib/tango/.my.cnf'
fi
echo "install tango-db"
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-db; sleep 10'
if [ "$?" -ne "0" ]; then exit 255; fi
if [ "$1" = "ubuntu24.04" ]; then
docker exec --user tango ndts /usr/bin/mysql -e 'create database tango'
docker exec --user tango ndts /bin/bash -c '/usr/bin/mysql tango < /usr/share/dbconfig-common/data/tango-db/install/mysql'
fi

docker exec --user root ndts service tango-db restart


Expand All @@ -36,7 +50,7 @@ if [ "$2" = "2" ]; then
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y python-pytango'
else
echo "install python3-pytango"
if [ "$1" = "debian10" ] || [ "$1" = "ubuntu23.10" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ]|| [ "$1" = "ubuntu21.04" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] ; then
if [ "$1" = "debian10" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ]|| [ "$1" = "ubuntu21.04" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] ; then
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y python3-tango'
else
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y python3-pytango'
Expand All @@ -54,5 +68,4 @@ else
docker exec ndts python3 setup.py build
docker exec --user root ndts python3 setup.py install
fi

if [ "$?" -ne "0" ]; then exit 255; fi
2 changes: 1 addition & 1 deletion .ci/ubuntu20.04_py3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq i
RUN curl http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
RUN add-apt-repository "deb http://repos.pni-hdri.de/apt/debian focal main" -y
RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq dist-upgrade
RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq install -y mysql-client mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libzmq3-dev python3-distutils
RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq install -y mysql-client mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libzmq3-dev python3-distutils python3-setuptools
# RUN export DEBIAN_FRONTEND=noninteractive && apt-get -qq install -y python3-pni
RUN useradd -ms /bin/bash tango
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mysql-server mysql-server/root_password password rootpw"'
Expand Down
2 changes: 1 addition & 1 deletion .ci/ubuntu22.04_py3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq i
RUN curl http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
RUN add-apt-repository "deb http://repos.pni-hdri.de/apt/ubuntu jammy main" -y
RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq dist-upgrade
RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq install -y mysql-client mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libzmq3-dev python3-distutils
RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq install -y mysql-client mysql-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libzmq3-dev python3-distutils python3-setuptools
# RUN export DEBIAN_FRONTEND=noninteractive && apt-get -qq install -y python3-pni
RUN useradd -ms /bin/bash tango
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mysql-server mysql-server/root_password password rootpw"'
Expand Down
33 changes: 33 additions & 0 deletions .ci/ubuntu24.04_py3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:24.04

MAINTAINER DESY, Jan Kotanski <jankotan@gmail.com>

RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get install -y curl gpg-agent mariadb-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libzmq3-dev python3-setuptools python3-setuptools libterm-readline-gnu-perl software-properties-common coreutils procps apt-transport-https gnupg2 ca-certificates wget

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN curl -s http://repos.pni-hdri.de/debian_repo.pub.gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-hdri-repo.gpg --import
RUN chmod 644 /etc/apt/trusted.gpg.d/debian-hdri-repo.gpg

RUN cd /etc/apt/sources.list.d && wget http://repos.pni-hdri.de/noble-pni-hdri.list \
&& useradd -ms /bin/bash tango
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mariadb-server mysql-server/root_password password rootpw"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "mariadb-server mysql-server/root_password_again password rootpw"' \
&& apt-get -qq update && apt-get -qq install -y mariadb-server dialog \
&& /bin/bash -c 'sleep 10'
RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "tango-db tango-db/db/app-user string tango"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "tango-db tango-db/mysql/app-pass password rootpw"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "tango-db tango-db/mysql/admin-pass password rootpw"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "tango-db tango-db/password-confirm password rootpw"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "tango-db tango-db/app-password-confirm password rootpw"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "nxsconfigserver-db nxsconfigserver-db/mysql/app-pass password rootpw"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "nxsconfigserver-db nxsconfigserver-db/mysql/admin-pass password rootpw"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "nxsconfigserver-db nxsconfigserver-db/app-password-confirm password rootpw"' \
&& /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; debconf-set-selections <<< "nxsconfigserver-db nxsconfigserver-db/db/app-user string tango"' \
&& sed -i "s/\[mysql\]/\[mysqld\]\nsql_mode = NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION\ncharacter_set_server=latin1\ncollation_server=latin1_swedish_ci\n\[mysql\]/g" /etc/mysql/conf.d/mysql.cnf

ENV PKG_CONFIG_PATH=/home/tango/lib/pkgconfig

ENV MYSQL_HOST=localhost
USER tango
WORKDIR /home/tango

2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
os: [debian12, debian11, debian10, ubuntu23.10, ubuntu22.04, ubuntu20.04]
os: [debian12, debian11, debian10, ubuntu24.04, ubuntu22.04, ubuntu20.04]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import os

from distutils.core import setup
from setuptools import setup

try:
from sphinx.setup_command import BuildDoc
Expand Down
Loading