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

Release Candidate v6.4.0 #1013

Merged
merged 45 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1b65235
updating docker and conda to source reusable YAML CI scripts
ruck314 Jun 27, 2024
112dfb6
adding C++ linter
ruck314 Jun 28, 2024
cdb5fd7
adding cpplinter message filter
ruck314 Jun 28, 2024
5b8e4bc
resolving c++ linter
ruck314 Jun 28, 2024
1d326cf
updates to CPPLINT.cfg
ruck314 Jun 28, 2024
66fb36e
resolving c++ linter
ruck314 Jun 28, 2024
9e385b8
resolving c++ linter
ruck314 Jun 28, 2024
8d98bcf
increase linelength to 160 (required for block.cpp)
ruck314 Jun 28, 2024
4d6b91b
resolving c++ linter
ruck314 Jun 28, 2024
d45e886
resolving c++ linter
ruck314 Jun 28, 2024
754c797
resolving c++ linter
ruck314 Jun 28, 2024
cf1635e
resolving c++ linter
ruck314 Jun 28, 2024
1624549
resolving c++ linter
ruck314 Jun 28, 2024
dc079e4
resolving c++ linter
ruck314 Jun 28, 2024
d09afc6
resolving c++ linter
ruck314 Jun 28, 2024
5f0c5dd
Disable the build/header_guard check
ruck314 Jun 28, 2024
459ae15
resolving c++ linter
ruck314 Jun 28, 2024
7fda4ac
resolving c++ linter
ruck314 Jun 28, 2024
7d6cf39
resolving c++ linter
ruck314 Jun 28, 2024
104d935
resolving c++ linter
ruck314 Jun 28, 2024
b38fc55
resolving c++ linter
ruck314 Jun 28, 2024
7106799
resolving c++ linter
ruck314 Jun 28, 2024
49a7451
resolving c++ linter
ruck314 Jun 29, 2024
251dab6
resolving c++ linter
ruck314 Jun 29, 2024
d881466
resolving c++ linter
ruck314 Jun 29, 2024
99eb02a
resolving c++ linter
ruck314 Jun 29, 2024
1a96141
increase linelength to 250 for Variables.cpp
ruck314 Jun 29, 2024
c0ab7df
disable [runtime/arrays] filter
ruck314 Jun 29, 2024
41a72ba
resolving c++ linter
ruck314 Jun 29, 2024
cfe949b
adding [runtime/references] filter
ruck314 Jun 29, 2024
2eb6827
resolving c++ linter
ruck314 Jun 29, 2024
ce84209
resolving c++ linter
ruck314 Jun 29, 2024
9d43d45
resolving c++ linter
ruck314 Jun 29, 2024
34236a7
resolving c++ linter
ruck314 Jun 29, 2024
a8322ae
resolving c++ linter
ruck314 Jun 29, 2024
d0cbc4b
polishing the code headers to be the same formating across all cpp/h/…
ruck314 Jul 8, 2024
bbee743
reran clang-format to sync up with cpplint
ruck314 Jul 10, 2024
c2ddf8e
Merge pull request #1012 from slaclab/ESROGUE-554
ruck314 Jul 10, 2024
221deb8
Merge pull request #1010 from slaclab/reusable-CI-yaml
ruck314 Jul 10, 2024
c01e850
Delete =
ruck314 Jul 10, 2024
316104b
Fix minimum value for Int
SEBv15 Jul 11, 2024
d9bf4d9
Merge pull request #1014 from SEBv15/main
ruck314 Jul 20, 2024
f64ca19
Fix high range byte for reads
slacrherbst Jul 23, 2024
f13d849
linter fix
ruck314 Jul 23, 2024
ab08b96
Merge pull request #1016 from slaclab/high_byte_fix
ruck314 Jul 23, 2024
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
107 changes: 20 additions & 87 deletions .github/workflows/rogue_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,26 @@ jobs:
cache: 'pip'
cache-dependency-path: 'pip_requirements.txt'

# Install dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install doxygen doxygen-doc libzmq3-dev libboost-all-dev
pip install -r pip_requirements.txt

# Flake 8 check
- name: Flake8 Tests
# Python Linter
- name: Python Linter
run: |
python -m compileall -f ./python/
flake8 --count ./python/
python -m compileall -f ./tests
flake8 --count ./tests/

# C++ Linter
- name: C++ Linter
run: |
find . -name '*.h' -o -name '*.cpp' | xargs cpplint

# Rogue
- name: Build Rogue
run: |
Expand Down Expand Up @@ -136,95 +142,22 @@ jobs:

# ----------------------------------------------------------------------------

conda_build:
name: Anaconda Build
conda_build_lib:
needs: [full_build_test, small_build_test]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:

# This step checks out a copy of your repository.
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Setup anaconda
run: |
cd ${HOME}
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash miniconda.sh -b -p ${HOME}/miniconda
export PATH="${HOME}/miniconda/bin:$PATH"
source ${HOME}/miniconda/etc/profile.d/conda.sh
conda config --set always_yes yes
conda config --set channel_priority strict
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
conda install conda-build anaconda-client conda-verify
conda update -q conda conda-build
conda update --all

- name: Get Image Information
id: get_image_info
env:
CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }}
run: |
echo token=${CONDA_UPLOAD_TOKEN_TAG} >> ${GITHUB_OUTPUT}

- name: Build
run: |
export PATH="${HOME}/miniconda/bin:$PATH"
source ${HOME}/miniconda/etc/profile.d/conda.sh
conda build conda-recipe --output-folder bld-dir -c conda-forge

- name: Upload
run: |
export PATH="${HOME}/miniconda/bin:$PATH"
source ${HOME}/miniconda/etc/profile.d/conda.sh
anaconda -t ${{ steps.get_image_info.outputs.token }} upload --force bld-dir/*/*.tar.bz2
uses: slaclab/ruckus/.github/workflows/conda_build_lib.yml@main
with:
version: '1.0.0'
secrets:
CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }}

# ----------------------------------------------------------------------------

docker_build:
name: Docker Build
runs-on: ubuntu-20.04
docker_build_lib:
needs: [full_build_test, small_build_test]
if: startsWith(github.ref, 'refs/tags/')
steps:

# This step checks out a copy of your repository.
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get Image Information
id: get_image_info
run: |
echo tag=`git describe --tags` >> ${GITHUB_OUTPUT}
echo branch=`echo ${GITHUB_REF} | awk 'BEGIN { FS = "/" } ; { print $3 }'` >> ${GITHUB_OUTPUT}

# Setup docker build environment
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

# Login to Dockerhub
- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: tidair
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Build and push the docker image
- name: Build and push image to Dockerhub
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/rogue/Dockerfile
push: true
tags: tidair/rogue:${{ steps.get_image_info.outputs.tag }}, tidair/rogue:latest
build-args: branch=${{ steps.get_image_info.outputs.branch }}
uses: slaclab/ruckus/.github/workflows/docker_build_lib.yml@main
with:
version: '1.0.0'
secrets:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

# ----------------------------------------------------------------------------
34 changes: 34 additions & 0 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#######################################################
# CPPLINT.cfg
#######################################################

# Increase the max number of characters on a given line
linelength=250

# List of filters to apply
filter=-legal/copyright

# Suppress the warning for unapproved C++11 headers
# Required for "<thread> is an unapproved C++11 header"
filter=-build/c++11

# Disable the build/include_order check
# Required for #include "rogue/Directives.h" to be at start
filter=-build/include_order

# Disable the build/header_guard check
# Note changing header guard has wrong style
# E.g. from __ROGUE_UTILITIES_FILEIO_MODULE_H__ to INCLUDE_ROGUE_UTILITIES_MODULE_H_
filter=-build/header_guard

# Disable whitespace/indent check
# private/public: indent will be based on .clang-format format"
filter=-whitespace/indent

# Disable runtime/arrays
# TODO: We should fix in the future
filter=-runtime/arrays

# Disable runtime/references
# TODO: We should fix in the future
filter=-runtime/references
5 changes: 1 addition & 4 deletions include/rogue/Directives.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : Common Directives
* ----------------------------------------------------------------------------
* File : Directives.h
* Created : 2023-02-13
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* Common Directives For Rogue
Expand Down
5 changes: 1 addition & 4 deletions include/rogue/EnableSharedFromThis.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : Common virtual class to enable shared_from_this() calls.
* ----------------------------------------------------------------------------
* File : EnableSharedFromThis.h
* Created : 2019-11-15
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* This is a common parent class that must be used instead of std::enable_shared_from_this
Expand Down
5 changes: 1 addition & 4 deletions include/rogue/GeneralError.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : General Error
* ----------------------------------------------------------------------------
* File : GeneralError.h
* Created : 2017-12-05
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* General exception for Rogue
Expand Down
5 changes: 1 addition & 4 deletions include/rogue/GilRelease.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : Release GIL within scope.
* ----------------------------------------------------------------------------
* File : GilRelease.h
* Created : 2017-02-28
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* Release GIL for the scope of this class.
Expand Down
5 changes: 1 addition & 4 deletions include/rogue/Helpers.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : Helpful Functions
* ----------------------------------------------------------------------------
* File : Helpers.h
* Created : 2018-11-28
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* Helper functions for Rogue
Expand Down
7 changes: 2 additions & 5 deletions include/rogue/Logging.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : Logging interface
* ----------------------------------------------------------------------------
* File : Logging.h
* Created : 2017-02-28
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* Logging interface for pyrogue
Expand Down Expand Up @@ -73,7 +70,7 @@ class Logging {

static std::shared_ptr<rogue::Logging> create(std::string name, bool quiet = false);

Logging(std::string name, bool quiet = false);
explicit Logging(std::string name, bool quiet = false);
~Logging();

static void setLevel(uint32_t level);
Expand Down
5 changes: 1 addition & 4 deletions include/rogue/Queue.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : General Queue
* ----------------------------------------------------------------------------
* File : Queue.h
* Created : 2017-01-18
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* General queue for Rogue
Expand Down
5 changes: 1 addition & 4 deletions include/rogue/ScopedGil.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : Scoped GIL
* ----------------------------------------------------------------------------
* File : ScopedGil.h
* Created : 2017-02-28
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* Acquire the GIL for the scope of this class.
Expand Down
5 changes: 1 addition & 4 deletions include/rogue/Version.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : Rogue Version
* ----------------------------------------------------------------------------
* File : Version.h
* Created : 2017-05-17
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* Version helpers for Rogue
Expand Down
8 changes: 4 additions & 4 deletions include/rogue/hardware/MemMap.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
*-----------------------------------------------------------------------------
* Title : Raw Memory Mapped Access
* ----------------------------------------------------------------------------
* File : MemMap.h
* Created : 2019-11-18
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* Raw Memory Mapped Access
* ----------------------------------------------------------------------------
* This file is part of the rogue software platform. It is subject to
* the license terms in the LICENSE.txt file found in the top-level directory
Expand Down
11 changes: 6 additions & 5 deletions include/rogue/hardware/axi/AxiMemMap.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
*-----------------------------------------------------------------------------
* Title : AXI Memory Mapped Access
* ----------------------------------------------------------------------------
* File : AxiMemMap.h
* Created : 2017-03-21
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* AXI Memory Mapped Access
* ----------------------------------------------------------------------------
* This file is part of the rogue software platform. It is subject to
* the license terms in the LICENSE.txt file found in the top-level directory
Expand All @@ -22,6 +22,7 @@

#include <memory>
#include <mutex>
#include <string>
#include <thread>

#include "rogue/Logging.h"
Expand Down Expand Up @@ -69,7 +70,7 @@ class AxiMemMap : public rogue::interfaces::memory::Slave {
static void setup_python();

// Class Creator
AxiMemMap(std::string path);
explicit AxiMemMap(std::string path);

// Destructor
~AxiMemMap();
Expand Down
10 changes: 7 additions & 3 deletions include/rogue/hardware/axi/AxiStreamDma.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
*-----------------------------------------------------------------------------
* Title : AxiStreamDma Interface Class
* ----------------------------------------------------------------------------
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* AxiStreamDma Interface Class
* ----------------------------------------------------------------------------
* This file is part of the rogue software platform. It is subject to
* the license terms in the LICENSE.txt file found in the top-level directory
Expand All @@ -19,6 +22,7 @@

#include <map>
#include <memory>
#include <string>
#include <thread>

#include "rogue/Logging.h"
Expand All @@ -32,7 +36,7 @@ namespace axi {
//! Storage class for shared memory buffers
class AxiStreamDmaShared {
public:
AxiStreamDmaShared(std::string path);
explicit AxiStreamDmaShared(std::string path);

//! Shared FD
int32_t fd;
Expand Down
5 changes: 1 addition & 4 deletions include/rogue/hardware/axi/module.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
*-----------------------------------------------------------------------------
* Title : Python Module
* ----------------------------------------------------------------------------
* File : module.h
* Created : 2017-03-21
* Company : SLAC National Accelerator Laboratory
* ----------------------------------------------------------------------------
* Description:
* Python module setup
Expand Down
Loading
Loading