Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c494fc88a5 | |||
| e0fa9ef3a9 | |||
| dc6d5c40b3 | |||
| 56288b1db8 |
30
.gitea/workflows/action.yaml
Normal file
30
.gitea/workflows/action.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Test And Build
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Lint:
|
||||||
|
runs-on: linepics
|
||||||
|
steps:
|
||||||
|
- name: checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: cppcheck
|
||||||
|
run: cppcheck --std=c++17 --addon=cert --addon=misc --error-exitcode=1 src/*.cpp
|
||||||
|
- name: formatting
|
||||||
|
run: clang-format --style=file --Werror --dry-run src/*.cpp src/*.h
|
||||||
|
Build:
|
||||||
|
runs-on: linepics
|
||||||
|
steps:
|
||||||
|
- name: checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
- run: |
|
||||||
|
pushd turboPmac
|
||||||
|
sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile
|
||||||
|
echo -e "\nIGNORE_SUBMODULES += sinqmotor" >> Makefile
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
- run: |
|
||||||
|
sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile
|
||||||
|
echo -e "\nIGNORE_SUBMODULES += turboPmac" >> Makefile
|
||||||
|
make install
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
default:
|
|
||||||
image: docker.psi.ch:5000/sinqdev/sinqepics:latest
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- lint
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
|
|
||||||
cppcheck:
|
|
||||||
stage: lint
|
|
||||||
script:
|
|
||||||
- cppcheck --std=c++17 --addon=cert --addon=misc --error-exitcode=1 src/*.cpp
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 week
|
|
||||||
tags:
|
|
||||||
- sinq
|
|
||||||
|
|
||||||
formatting:
|
|
||||||
stage: lint
|
|
||||||
script:
|
|
||||||
- clang-format --style=file --Werror --dry-run src/*.cpp
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 week
|
|
||||||
tags:
|
|
||||||
- sinq
|
|
||||||
|
|
||||||
# clangtidy:
|
|
||||||
# stage: lint
|
|
||||||
# script:
|
|
||||||
# - curl https://docker.psi.ch:5000/v2/_catalog
|
|
||||||
# # - dnf update -y
|
|
||||||
# # - dnf install -y clang-tools-extra
|
|
||||||
# # - clang-tidy sinqEPICSApp/src/*.cpp sinqEPICSApp/src/*.c sinqEPICSApp/src/*.h -checks=cppcoreguidelines-*,cert-*
|
|
||||||
# # tags:
|
|
||||||
# # - sinq
|
|
||||||
|
|
||||||
build_module:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- export SINQMOTOR_VERSION="$(grep 'sinqMotor_VERSION=' Makefile | cut -d= -f2)"
|
|
||||||
- git clone --depth 1 --branch "${SINQMOTOR_VERSION}" https://gitlab-ci-token:${CI_JOB_TOKEN}@git.psi.ch/sinq-epics-modules/sinqmotor.git
|
|
||||||
- pushd sinqmotor
|
|
||||||
- sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile
|
|
||||||
- echo "LIBVERSION=${SINQMOTOR_VERSION}" >> Makefile
|
|
||||||
- make install
|
|
||||||
- popd
|
|
||||||
- sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile
|
|
||||||
- echo "LIBVERSION=${CI_COMMIT_TAG:-0.0.1}" >> Makefile
|
|
||||||
- make install
|
|
||||||
- cp -rT "/ioc/modules/seleneLift/$(ls -U /ioc/modules/seleneLift/ | head -1)" "./seleneLift-${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}"
|
|
||||||
artifacts:
|
|
||||||
name: "seleneLift-${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}"
|
|
||||||
paths:
|
|
||||||
- "seleneLift-${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}/*"
|
|
||||||
expire_in: 1 week
|
|
||||||
when: always
|
|
||||||
tags:
|
|
||||||
- sinq
|
|
||||||
2
Makefile
2
Makefile
@@ -42,4 +42,4 @@ DBDS += turboPmac/sinqMotor/src/sinqMotor.dbd
|
|||||||
DBDS += turboPmac/src/turboPmac.dbd
|
DBDS += turboPmac/src/turboPmac.dbd
|
||||||
DBDS += src/seleneGuide.dbd
|
DBDS += src/seleneGuide.dbd
|
||||||
|
|
||||||
USR_CFLAGS += -Wall -Wextra -Weffc++ -Wunused-result -Wextra -Werror # -Wpedantic // Does not work because EPICS macros trigger warnings
|
USR_CFLAGS += -Wall -Wextra -Weffc++ -Wunused-result -Wextra -Werror -fvisibility=hidden# -Wpedantic // Does not work because EPICS macros trigger warnings
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
// Forward declaration of the seleneLiftAxis class to resolve the cyclic
|
// Forward declaration of the seleneLiftAxis class to resolve the cyclic
|
||||||
// dependency between the seleneLiftAxis and the seleneAngleAxis .h-file.
|
// dependency between the seleneLiftAxis and the seleneAngleAxis .h-file.
|
||||||
// See https://en.cppreference.com/w/cpp/language/class.
|
// See https://en.cppreference.com/w/cpp/language/class.
|
||||||
class seleneLiftAxis;
|
class HIDDEN seleneLiftAxis;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Virtual axis for setting the angle of the Selene guide
|
* @brief Virtual axis for setting the angle of the Selene guide
|
||||||
*
|
*
|
||||||
* Please see README.md for a detailed explanation.
|
* Please see README.md for a detailed explanation.
|
||||||
*/
|
*/
|
||||||
class seleneAngleAxis : public turboPmacAxis {
|
class HIDDEN seleneAngleAxis : public turboPmacAxis {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Construct a new seleneAngleAxis.
|
* @brief Construct a new seleneAngleAxis.
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
// Forward declaration of the axis classes to resolve the cyclic
|
// Forward declaration of the axis classes to resolve the cyclic
|
||||||
// dependency between the seleneLiftAxis and the seleneAngleAxis .h-file.
|
// dependency between the seleneLiftAxis and the seleneAngleAxis .h-file.
|
||||||
// See https://en.cppreference.com/w/cpp/language/class.
|
// See https://en.cppreference.com/w/cpp/language/class.
|
||||||
class seleneAngleAxis;
|
class HIDDEN seleneAngleAxis;
|
||||||
class seleneLiftAxis;
|
class HIDDEN seleneLiftAxis;
|
||||||
class seleneOffsetAxis;
|
class HIDDEN seleneOffsetAxis;
|
||||||
|
|
||||||
class seleneGuideController : public turboPmacController {
|
class HIDDEN seleneGuideController : public turboPmacController {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
* Please see README.md for a detailed explanation.
|
* Please see README.md for a detailed explanation.
|
||||||
*/
|
*/
|
||||||
class seleneLiftAxis : public turboPmacAxis {
|
class HIDDEN seleneLiftAxis : public turboPmacAxis {
|
||||||
public:
|
public:
|
||||||
static const int numAxes_ = 6;
|
static const int numAxes_ = 6;
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
// Forward declaration of the seleneLiftAxis class to resolve the cyclic
|
// Forward declaration of the seleneLiftAxis class to resolve the cyclic
|
||||||
// dependency between the seleneLiftAxis and the seleneAngleAxis .h-file.
|
// dependency between the seleneLiftAxis and the seleneAngleAxis .h-file.
|
||||||
// See https://en.cppreference.com/w/cpp/language/class.
|
// See https://en.cppreference.com/w/cpp/language/class.
|
||||||
class seleneLiftAxis;
|
class HIDDEN seleneLiftAxis;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Virtual axis for setting the offset of a motor of the Selene guide
|
* @brief Virtual axis for setting the offset of a motor of the Selene guide
|
||||||
*
|
*
|
||||||
* Please see README.md for a detailed explanation.
|
* Please see README.md for a detailed explanation.
|
||||||
*/
|
*/
|
||||||
class seleneOffsetAxis : public turboPmacAxis {
|
class HIDDEN seleneOffsetAxis : public turboPmacAxis {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Construct a new selene Offset Axis object
|
* @brief Construct a new selene Offset Axis object
|
||||||
|
|||||||
Submodule turboPmac updated: f423002d23...d41e7bf054
Reference in New Issue
Block a user