Skip to content

Commit

Permalink
Merge pull request #22 from Grabt234/master
Browse files Browse the repository at this point in the history
Feature: Update FERS with validator and visualiser
  • Loading branch information
stpaine authored Mar 27, 2024
2 parents f6daeed + 27f3115 commit 90269bd
Show file tree
Hide file tree
Showing 7 changed files with 1,905 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/CMake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: C++ Build on Linux

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:

- name: Checkout project and submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Requried Libs for FERS
run: sudo apt-get install libboost-all-dev libfftw3-dev libhdf5-dev libhdf5-serial-dev build-essential cmake cmake-qt-gui python-all-dev libtinyxml-dev

- name: Generate FERS
run: |
ls -a
mkdir build
cd build
pwd # This will print the current working directory after cd
ls -a
cmake -S .. -B . -D FERS_LIB_HDF5="/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so" -D FERS_LIB_HDF5_HL="/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so" -D CMAKE_CXX_FLAGS="-I/usr/include/hdf5/serial/"
- name: Build FERS
run: |
cd build
make
- name: Install Requried Libs for validator
run: sudo apt install libxerces-c-dev

- name: Generate Validator
run: |
cd config_validators
mkdir build
cd build
cmake ..
- name: Build Validator
run: |
cd build
make
74 changes: 74 additions & 0 deletions .github/workflows/ReleaseCMake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: C++ Build on Linux

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:

- name: Checkout project and submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Requried Libs
run: sudo apt-get install libboost-all-dev libfftw3-dev libhdf5-dev libhdf5-serial-dev build-essential cmake cmake-qt-gui python-all-dev libtinyxml-dev

- name: Generate
run: |
mkdir build
cd build
cmake -D FERS_LIB_HDF5="/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so" -D FERS_LIB_HDF5_HL="/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so" -D CMAKE_CXX_FLAGS="-I/usr/include/hdf5/serial/" ../
- name: Build
run: |
cd build
make
- name: Prepare FERS for zip
run: |
mkdir ./toZip
cp build/src/fers ./toZip/fers
- name: Go nack to home
run: cd ..

- name: Install Requried Libs for validator
run: sudo apt install libxerces-c-dev

- name: Go to valifator and generate validator
run: |
cd config_validators
mkdir build
cd build
cmake ..
- name: Build Validator
run: |
cd config_validators/build
make
- name: Prepare Validator for zip
run: |
sudo cp config_validators/build/xml_validator_output ./toZip/xml_validator_output
sudo cp config_validators/build/kml_visualiser ./toZip/kml_visualiser
sudo cp config_validators/build/validator ./toZip/validator
- name: Zip Docs and Build
uses: TheDoctor0/[email protected]
with:
directory: ./toZip # File to add to the archive
path: ./*
Filename: FERS.zip # The name of the archive file

- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
./toZip/FERS.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions config_validators/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 3.0)
project(your_project_name)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")

find_package(XercesC REQUIRED)
include_directories(${XercesC_INCLUDE_DIRS})
link_directories(${XercesC_LIBRARY_DIRS})

set(SRCS validator.cpp xml_validator_output.cpp kml_visualiser.cpp)

add_executable(validator validator.cpp)
target_link_libraries(validator ${XercesC_LIBRARIES})

add_executable(xml_validator_output xml_validator_output.cpp)
target_link_libraries(xml_validator_output ${XercesC_LIBRARIES})

add_executable(kml_visualiser kml_visualiser.cpp)
target_link_libraries(kml_visualiser ${XercesC_LIBRARIES})

install(TARGETS validator xml_validator_output kml_visualiser DESTINATION bin)
25 changes: 25 additions & 0 deletions config_validators/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Validators

Thanks Michael Altshuler, your effort did not unnoticed

## Purpose

Allows one to check a fersxml file is configured correctly and allows one to generate a kml file used for plotting on a map

## Requirements

Ensure one has run `sudo apt install libxerces-c-dev` to ensure it is availble to be incldued and linked.

## Building

Unlike FERS above, this uses cmake to simplify building

1. `mkdir build`
2. `cd build`
3. `cmake ..`
4. run `make`

## Usage

1. run `validator <file.fersxml>'
2. follow prompts
Loading

0 comments on commit 90269bd

Please sign in to comment.