Skip to content

Commit

Permalink
add ubuntu oracular tests (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan authored Oct 24, 2024
1 parent 92f9023 commit 34c8468
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


# workaround for a bug in debian9, i.e. starting mysql hangs
if [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "ubuntu24.04" ]; then
if [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; then
docker exec --user root ndts service mariadb restart
else
docker exec --user root ndts service mysql stop
Expand All @@ -17,7 +17,7 @@ fi
docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y xvfb libxcb1 libx11-xcb1 libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxcb-render-util0 xkb-data tango-common; sleep 10'

if [ "$?" -ne "0" ]; then exit 255; fi
if [ "$1" = "ubuntu24.04" ]; then
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; 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'
Expand All @@ -35,7 +35,7 @@ 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
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; 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
Expand All @@ -47,7 +47,7 @@ docker exec --user root ndts chown -R tango:tango /tmp/runtime-tango

docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y xvfb libxcb1 libx11-xcb1 libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxcb-render-util0 xkb-data'
if [ "$?" != "0" ]; then exit 255; fi
if [ "$1" = "ubuntu24.04" ]; then
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; 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 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y libxcb-xinerama0'
docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa '
Expand Down Expand Up @@ -75,7 +75,7 @@ if [ "$2" = "2" ]; then
else
echo "install nxsconfigserver-db"
docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -y nxsconfigserver-db; sleep 10'
if [ "$1" = "ubuntu24.04" ]; then
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; then
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON nxsconfig.* TO "tango"@"%" identified by "rootpw"'
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON nxsconfig.* TO "tango"@"localhost" identified by "rootpw"'
docker exec --user root ndts /usr/bin/mysql -e 'FLUSH PRIVILEGES'
Expand All @@ -90,7 +90,7 @@ else
docker exec --user root ndts /bin/sh -c 'cd itango-src; git checkout tags/v0.1.7 -b b0.1.7; python3 setup.py install'
# docker exec --user root ndts /bin/sh -c 'cd taurus-src; git checkout; python3 setup.py install'
fi
if [ "$1" = "ubuntu24.04" ] ||[ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "debian11" ]|| [ "$1" = "debian12" ]; then
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "debian11" ]|| [ "$1" = "debian12" ]; then
docker exec --user root ndts /bin/sh -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -y git python3-six python3-numpy graphviz python3-sphinx g++ build-essential python3-dev pkg-config python3-all-dev python3-setuptools libtango-dev python3-setuptools python3-tango python3-tz; apt-get -qq install -y nxsconfigserver-db; sleep 10'
else
docker exec --user root ndts /bin/sh -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -y git python3-six python3-numpy graphviz python3-sphinx g++ build-essential python3-dev pkg-config python3-all-dev python3-setuptools libtango-dev python3-setuptools python3-pytango python3-tz python3-enum34 python3ango; apt-get -qq install -y nxsconfigserver-db; sleep 10'
Expand Down Expand Up @@ -131,7 +131,7 @@ if [ "$2" = "2" ]; then
docker exec --user root ndts /bin/sh -c 'cd sardana-src; git checkout tags/2.8.4 -b b2.8.4; python setup.py install'
fi
else
if [ "$1" = "ubuntu24.04" ]; then
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; then
docker exec --user root ndts /bin/sh -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y python3-taurus-pyqtgraph'
fi
echo "install sardana, taurus and nexdatas"
Expand All @@ -140,7 +140,7 @@ else
else
docker exec --user root ndts /bin/sh -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y python3-nxsconfigserver python3-nxswriter python3-nxstools python3-nxsrecselector python3-setuptools nxsrecselector nxswriter nxsconfigserver nxstools python3-packaging'
fi
if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "debian10" ] ; then
if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "debian10" ] ; then
docker exec --user root ndts /bin/sh -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y python3-taurus python3-sardana'
else
docker exec --user root ndts /bin/sh -c 'git clone https://gitlab.com/taurus-org/taurus taurus-src; cd taurus-src'
Expand Down
47 changes: 47 additions & 0 deletions .ci/ubuntu24.10_py3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM ubuntu:24.10

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

ENV DEBIAN_FRONTEND=noninteractive

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 python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl libomniorb4-dev libcos4-dev libzmq3-dev python3-setuptools python3-lxml liblog4j1.2-java python3-setuptools python3-pytest python3-opencv

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/oracular-pni-hdri.list \
&& useradd -ms /bin/bash tango

# switch to the german archive mirror
# RUN sed -i 's|http://archive|http://de.archive|g' /etc/apt/sources.list

# install packages
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 install -y mariadb-client python3-h5py python3-sphinx apt-utils debconf-utils net-tools omniidl python3-pninexus python3-pyqt5 python3-pyqt5.qtsvg python3-qtchecker python3-pyfai qt5-qmake qtchooser python3-requests xvfb libxcb1 libx11-xcb1 libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxcb-render-util0 xkb-data liblog4j1.2-java python3-pyqt5 git python3-tz python3-pyqtgraph python3-setuptools python3-zmq python3-scipy python3-pyqt5.qtwebkit hdf5-filter-plugin-serial-links


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 python3-mysqldb 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-collations = latin1=latin1_swedish_ci\ncharacter-set-server=latin1\n\[mysql\]/g" /etc/mysql/conf.d/mysql.cnf

ENV PKG_CONFIG_PATH=/home/tango/lib/pkgconfig

ENV MYSQL_HOST=localhost
ENV DISPLAY=":99.0"
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, ubuntu24.04, ubuntu22.04, ubuntu20.04]
os: [debian12, debian11, debian10, ubuntu24.10, ubuntu24.04, ubuntu22.04]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down

0 comments on commit 34c8468

Please sign in to comment.