Commit e6e4ed5f authored by Thomas Braun's avatar Thomas Braun
Browse files

Merge branch 'switch-to-our-runners' into 'main'

.gitlab-ci.yml: Switch to our runners and regenerate code for newer class factory approach

This saves the precious gitlab CI minutes.

See merge request !136
parents 999e0b9f 314e17d0
Loading
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ workflow:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

.build-template-win:
  stage: build
  rules:
    - if: '$ARCH == "x64"'
      variables:
@@ -79,9 +80,12 @@ build-win-32bit:
    PLATFORM: Win32

macos:
  image: macos-15-xcode-16
  stage: build
  tags:
    - saas-macos-medium-m1
    - macos
    - aarch64
    - shell
    - tahoe
  variables:
    PIXI_HOME: "$CI_PROJECT_DIR/.pixi_install"
    PIXI_NO_PATH_UPDATE: "true"
@@ -96,6 +100,8 @@ macos:
    - pixi run -e $ENV_TO_TEST build

run-tests-with-mariadb:
  stage: test
  dependencies: []
  tags:
    - amd64
    - docker
@@ -156,6 +162,8 @@ run-tests-with-mariadb:
    url: "https://${CI_PROJECT_NAMESPACE}.gitlab.io/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts/coverage/coverage.html"

run-tests-with-mysql:
  stage: test
  dependencies: []
  tags:
    - amd64
    - docker
@@ -186,6 +194,7 @@ run-tests-with-mysql:
      junit: build/JU_*.xml

release_job:
  dependencies: []
  tags:
    - amd64
    - docker
+50 −15
Original line number Diff line number Diff line
/*----- PROTECTED REGION ID(DataBase::ClassFactory.cpp) ENABLED START -----*/
/* clang-format on */
//+=============================================================================
//=============================================================================
//
// file :        ClassFactory.cpp
//
// description : C++ source for the class_factory method of the DServer
//               device class. This method is responsible to create
//               all class singletin for a device server. It is called
//               at device server startup
//
// project :     TANGO Device Server
//               device class. This method is responsible for the creation of
//               all class singleton for a device server. It is called
//               at device server startup.
//
// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010,2011,2012,2013
//						European Synchrotron Radiation Facility
//                      BP 220, Grenoble 38043
//                      FRANCE
// project :     TANGO
//
// This file is part of Tango.
// This file is part of Tango device class.
//
// Tango is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,22 +26,62 @@
// You should have received a copy of the GNU General Public License
// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
//
//==============================================================================
//
//
//=============================================================================
//                This file is generated by POGO
//        (Program Obviously used to Generate tango Object)
//=============================================================================

#include <tango/tango.h>
#include "ClassFactory.h"
#include "DataBaseClass.h"

//	Add class header files if needed
#if TANGO_VERSION >= TANGO_MAKE_VERSION(10, 3, 0)

namespace DataBase_ns
{

class DServerImpl : public Tango::DServer
{
  public:
    DServerImpl(Tango::DeviceClass *cl_ptr,
                const std::string &name,
                const std::string &description,
                Tango::DevState state,
                const std::string &status) :
        DServer(cl_ptr, name.c_str(), description.c_str(), state, status.c_str())
    {
    }

  private:
    void class_factory() override
    {
        add_class(DataBaseClass::init("DataBase"));
    }
};

Tango::DServer *constructor(Tango::DeviceClass *cl_ptr,
                            const std::string &name,
                            const std::string &desc,
                            Tango::DevState state,
                            const std::string &status)
{
    return new DServerImpl(cl_ptr, name, desc, state, status);
}
} // namespace DataBase_ns

#else

/**
 *	Create DataBase Class singleton and store it in DServer object.
 */

void Tango::DServer::class_factory()
{
    //	Add method class init if needed
    add_class(DataBase_ns::DataBaseClass::init("DataBase"));
}

#endif
/* clang-format off */
/*----- PROTECTED REGION END -----*/	//	DataBase::ClassFactory.cpp

ClassFactory.h

0 → 100644
+16 −0
Original line number Diff line number Diff line
#include <tango/tango.h>
#include "Utils.h"

#if TANGO_VERSION >= TANGO_MAKE_VERSION(10, 3, 0)

namespace DataBase_ns
{

Tango::DServer *constructor(Tango::DeviceClass *cl_ptr,
                            const std::string &name,
                            const std::string &desc,
                            Tango::DevState state,
                            const std::string &status);
}

#endif
+7 −7
Original line number Diff line number Diff line
@@ -2739,8 +2739,8 @@ void DataBaseClass::command_factory()
	DbGetDeviceDomainListClass	*pDbGetDeviceDomainListCmd =
		new DbGetDeviceDomainListClass("DbGetDeviceDomainList",
			Tango::DEV_STRING, Tango::DEVVAR_STRINGARRAY,
			"The wildcard",
			"Device name domain list",
			"The device name containing a possible wildcard",
			"List of device domain names without duplicates",
			Tango::OPERATOR);
	command_list.push_back(pDbGetDeviceDomainListCmd);

@@ -2757,8 +2757,8 @@ void DataBaseClass::command_factory()
	DbGetDeviceFamilyListClass	*pDbGetDeviceFamilyListCmd =
		new DbGetDeviceFamilyListClass("DbGetDeviceFamilyList",
			Tango::DEV_STRING, Tango::DEVVAR_STRINGARRAY,
			"The wildcard",
			"Family list",
			"The device name containing a possible wildcard",
			"List of device family names without duplicates",
			Tango::OPERATOR);
	command_list.push_back(pDbGetDeviceFamilyListCmd);

@@ -2793,8 +2793,8 @@ void DataBaseClass::command_factory()
	DbGetDeviceMemberListClass	*pDbGetDeviceMemberListCmd =
		new DbGetDeviceMemberListClass("DbGetDeviceMemberList",
			Tango::DEV_STRING, Tango::DEVVAR_STRINGARRAY,
			"The filter",
			"Device names member list",
			"The device name containing a possible wildcard",
			"List of device member names without duplicates",
			Tango::OPERATOR);
	command_list.push_back(pDbGetDeviceMemberListCmd);

@@ -2973,7 +2973,7 @@ void DataBaseClass::command_factory()
	DbPutAttributeAliasClass	*pDbPutAttributeAliasCmd =
		new DbPutAttributeAliasClass("DbPutAttributeAlias",
			Tango::DEVVAR_STRINGARRAY, Tango::DEV_VOID,
			"Str[0] = attribute name\nStr[1] = attribute alias",
			"Str[0] = attribute name (device/attribute)\nStr[1] = attribute alias",
			"",
			Tango::OPERATOR);
	command_list.push_back(pDbPutAttributeAliasCmd);