Commit 31b83d76 authored by Giuseppe Carboni's avatar Giuseppe Carboni
Browse files

Merge branch 'centos_7_compatibility' of https://github.com/discos/discos into...

Merge branch 'centos_7_compatibility' of https://github.com/discos/discos into fix-issue-896-zmq-publish
parents 8e6675fb 98966072
Loading
Loading
Loading
Loading
+85 −0
Original line number Diff line number Diff line
name: DISCOS deployment and build

on:
  push:
  pull_request:

jobs:
  wait-for-download:
    name: Wait for any pending download
    runs-on: ubuntu-latest
    concurrency:
      group: download
      cancel-in-progress: false
    steps:
      - name: Go on with deployment
        run: true
  deploy-discos:
    name: Deploy DISCOS
    runs-on: ubuntu-latest
    needs: wait-for-download
    env:
      REPOSITORY_TOKEN: "${{ secrets.DEPENDENCIES_TOKEN }}"
      GH_TOKEN: "${{ secrets.GH_WORKFLOWS_TOKEN }}"
      GOOGLE_DRIVE_TOKEN: "${{ secrets.GOOGLE_DRIVE_TOKEN }}"
      PROVISIONED_VM_GDRIVE_ID: "${{ secrets.PROVISIONED_VM_GDRIVE_ID }}"
      PROVISIONED_ARCHIVE_GDRIVE_ID: "${{ secrets.PROVISIONED_ARCHIVE_GDRIVE_ID }}"
    strategy:
      fail-fast: false
      matrix:
        station: ['SRT', 'Medicina', 'Noto']
    steps:
      - name: Free up space
        uses: jlumbroso/free-disk-space@main
        with:
          tool-cache: true
      - name: Install Vagrant and VirtualBox
        run: |
          wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
          echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
          sudo apt update && sudo apt install vagrant
          sudo apt install virtualbox
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3'
          check-latest: true
      - name: Clone the deployment repository
        uses: actions/checkout@v4
        with:
          repository: 'discos/deployment'
      - name: Install deployment package and dependencies
        run: |
          python -m pip install -r requirements.txt
          pip install .
      - name: Retrieve the VM from cache
        uses: actions/cache/restore@v4
        with:
          key: discos-manager-vm
          path: |
            /home/runner/discos_manager.ova
            /home/runner/vagrant.tar.gz
      - name: Install the virtual machine
        run: |
          vboxmanage import discos_manager.ova --vsys 0 --options keepallmacs
          rm discos_manager.ova
          tar -xzvf vagrant.tar.gz
        working-directory: /home/runner
      - name: Add the virtual machine to Vagrant
        run: |
          sed -i "s/$(cat id)/$(vboxmanage list vms | grep 'discos_manager' | grep -oP '(?<=\{)[0-9a-fA-F-]+(?=\})')/" action_provision
          sed -i "s/$(cat id)/$(vboxmanage list vms | grep 'discos_manager' | grep -oP '(?<=\{)[0-9a-fA-F-]+(?=\})')/" id
        working-directory: /home/runner/.deployment/.vagrant/machines/manager/virtualbox/
      - name: Set the branch name
        run: |
          if [ "${{ github.event_name }}" == "push" ]; then
            echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
          elif [ "${{ github.event_name }}" == "pull_request" ]; then
            echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
          fi
      - name: Deploy DISCOS
        run: |
          discos-deploy manager:development --deploy-only -s ${{ matrix.station }} -b ${{ env.BRANCH_NAME }}
      - name: Shutdown the virtual machine
        run: |
          discos-vms stop
+9 −0
Original line number Diff line number Diff line
@@ -6,11 +6,13 @@ object/
*~
*.swp
*.pyc
.project*

# Ignore the SliLibrary directory
Common/Libraries/SlaLibrary

# Files generated by the building process
Common/Interfaces/build.log
Common/Clients/CaltoolClient/src/calibrationtool_ui.py
Common/Clients/CaltoolClient/src/calibrationtool_ui.pye
Common/Errors/AntennaErrors/idl/AntennaErrors.idl
@@ -26,12 +28,16 @@ Common/Errors/ParserErrors/idl/ParserErrors.idl
Common/Errors/ReceiversErrors/idl/DerotatorErrors.idl
Common/Errors/ReceiversErrors/idl/ReceiversErrors.idl
Common/Errors/XBackendErrors/idl/XBackendsErrors.idl
Common/Errors/ActiveSurfaceErrors/idl/ASErrors.idl
Common/Interfaces/ActiveSurfaceInterface/idl/ActiveSurfaceCommon.idl
Common/Interfaces/AntennaInterface/idl/SolarSystemBody.idl
Common/Interfaces/AntennaInterface/idl/AntennaBoss.idl
Common/Interfaces/AntennaInterface/idl/Moon.idl
Common/Interfaces/AntennaInterface/idl/Mount.idl
Common/Interfaces/AntennaInterface/idl/OTF.idl
Common/Interfaces/AntennaInterface/idl/Observatory.idl
Common/Interfaces/AntennaInterface/idl/SkySource.idl
Common/Interfaces/AntennaInterface/idl/SolarSystemBody.idl
Common/Interfaces/ActiveSurfaceInterface/idl/ActiveSurfaceCommon.idl
Common/Interfaces/CommonInterface/idl/AntennaDefinitions.idl
Common/Interfaces/CommonInterface/idl/BackendsDefinitions.idl
@@ -50,4 +56,7 @@ SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceGUI.h
SRT/Clients/SRTActiveSurfaceGUIClient/src/moc_SRTActiveSurfaceCore.cpp
SRT/Clients/SRTActiveSurfaceGUIClient/src/moc_SRTActiveSurfaceGUIui.cpp
SRT/Interfaces/SRTActiveSurfaceInterface/idl/SRTActiveSurfaceBoss.idl
Common/Libraries/build.log
SRT/Interfaces/SRTActiveSurfaceInterface/idl/SRTActiveSurfaceCommon.idl
.DS_Store
.vscode/settings.json
+2 −0
Original line number Diff line number Diff line
@@ -104,9 +104,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/
    issue #619 - Active surface components are now capable of changing look-up tables on the fly via the `asSetLUT` command
    issue #806   Added support for the C-band receiver at the SRT
    project #2 - Completed integration of new SRT Minor Servos
    issue #2   - Completed integration of solar system planets, sun and moon tracking. Other bodies will be added in the future.

## Fixed
## Changed
	issue #689 - The dataset provided by weather station has been enlarged by the wind direction. The correctponding RAL 'wx' command will noe provided wind direction readout, as well
    issue #621 - The maximum number of chars of the schedule file name is now 37 (extension included). This is done for fits file and archive issue with the lenght of the schedule name.
    issue #853 - The setSection command can now accept a wildcard (*) as section identifier. This will allow to configure all backend sections with a single command
    issue #895 - FitZilla version 1.23 released, the rest frequency is also added in the header of the Section table
 No newline at end of file
+44 −1
Original line number Diff line number Diff line
@@ -162,6 +162,49 @@ void updateGenerator(maci::SimpleClient& client,Antenna::TGeneratorType& lastGen
				extraLabel6->Refresh();	
				break;
			}
			case Antenna::ANT_SOLARSYSTEMBODY : {
				IRA::CString str1,str2;
 
				Antenna::SolarSystemBodyAttributes_var att;
				Antenna::SolarSystemBody_var ssbody;
				try {
					ssbody=Antenna::SolarSystemBody::_narrow(lastGenerator);
					if (!CORBA::is_nil(ssbody)) {
						ssbody->getAttributes(att);
					}
				}
				catch (...) {
					_EXCPT(ClientErrors::UnknownExImpl,impl,"::Main()");
					_IRA_LOGGUARD_LOG_EXCEPTION(guard,impl,LM_ERROR);
					return;
				}			
				tmpString=(const char*)att->sourceID;
				outString="Source name    : "+tmpString;
				extraLabel1->setValue(outString);
				extraLabel1->Refresh();
				IRA::CIRATools::radToHourAngle(att->rightAscension,str1);
				IRA::CIRATools::radToSexagesimalAngle(att->declination,str2);
				outString="Apparent Eq.   : "+str1+"/"+str2+"/";
				str1.Format("%.5lf",att->julianEpoch);
				outString+=str1;
				extraLabel2->setValue(outString);
				extraLabel2->Refresh();
				IRA::CIRATools::radToAngle(att->gLongitude,str1);
				IRA::CIRATools::radToAngle(att->gLatitude,str2);
				outString="Galactic       : "+str1+"/"+str2;
				extraLabel3->setValue(outString);
				extraLabel4->Refresh();
				IRA::CIRATools::radToAngle(att->azimuth,str1);
				IRA::CIRATools::radToAngle(att->elevation,str2);
				outString="Horizontal     : "+str1+"/"+str2;
				extraLabel4->setValue(outString);
				extraLabel4->Refresh();								
				extraLabel5->setValue("");
				extraLabel5->Refresh();			
				extraLabel6->setValue("");
				extraLabel6->Refresh();	
				break;
			}
			case Antenna::ANT_OTF: {
				Antenna::OTFAttributes_var att;
				Antenna::OTF_var otf;
+4 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
#include <SkySourceC.h>
#include <OTFC.h>
#include <MoonC.h>
#include <SolarSystemBodyC.h>
#include <ManagementErrors.h>
#include <acsncSimpleConsumer.h>
#include <fstream>
@@ -396,7 +397,7 @@ int main(int argc, char *argv[]) {
		generatorType_box->setStatusLook(Antenna::ANT_SIDEREAL);
		generatorType_box->setStatusLook(Antenna::ANT_MOON); 
		generatorType_box->setStatusLook(Antenna::ANT_SUN); 
		generatorType_box->setStatusLook(Antenna::ANT_SOLARSYTEMBODY); 
		generatorType_box->setStatusLook(Antenna::ANT_SOLARSYSTEMBODY); 
		generatorType_box->setStatusLook(Antenna::ANT_SATELLITE); 
		generatorType_box->setStatusLook(Antenna::ANT_OTF); 
		
@@ -434,6 +435,8 @@ int main(int argc, char *argv[]) {
			_TW_SET_COMPONENT(output_label,0,WINDOW_HEIGHT-(OUTPUT_FIELD_HEIGHT+1),WINDOW_WIDTH-1,OUTPUT_FIELD_HEIGHT,OUTPUT_FIELD_COLOR_PAIR,OUTPUT_FIELD_STYLE,NULL);	
		#endif 
		
		
		
		// Monitors
		ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_INFO,MODULE_NAME"::MONITORS_INSTALLATION"));
		/** Add all required monitor installation here */
Loading