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

feat: addition of github actions #108

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @nasa-jpl/nasa-jpl-ethercat-devs
25 changes: 25 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build

on:
workflow_dispatch:
push:
paths:
- "src/**"
- "test/**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: egor-tensin/setup-clang@v1
with:
version: latest
platform: x64
- name: install yamlcpp
run: sudo apt install libyaml-cpp-dev
- run: |
mkdir -p build
cd build
cmake ..
make
29 changes: 29 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: test

on:
workflow_dispatch:
push:
paths:
- "src/**"
- "test/**"

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: egor-tensin/setup-clang@v1
- uses: ConorMacBride/install-package@v1
with:
apt: valgrind
version: latest
platform: x64
- name: install packages
run: sudo apt install libyaml-cpp-dev libgtest-dev doxygen
- run: |
mkdir -p build
cd build
cmake -DBUILD_JSD_TESTS=ON ..
make
make test
make memcheck
5 changes: 4 additions & 1 deletion test/test_unit/test_gold_actuator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "fastcat/config.h"
#include "fastcat/jsd/gold_actuator_offline.h"
#include "fastcat/signal_handling.h"
#include "jsd/jsd_egd_types.h"
#include "jsd/jsd_print.h"
#include "jsd/jsd_pub.h"

Expand Down Expand Up @@ -43,6 +44,7 @@ class ActuatorTest : public ::testing::Test
void SetUp() override
{
jsd_context_ = jsd_alloc();
jsd_context_->ecx_context.slavelist[0].eep_id = JSD_EGD_PRODUCT_CODE;

// FASTCAT_UNIT_TEST_DIR contains path to .
base_dir_ = FASTCAT_UNIT_TEST_DIR;
Expand Down Expand Up @@ -156,8 +158,9 @@ TEST_F(ActuatorTest, RejectMotionCommandsWhenFaulted)
EXPECT_TRUE(device_.Write(cmd));

cmd.type = fastcat::ACTUATOR_SET_OUTPUT_POSITION_CMD;
cmd.actuator_set_digital_output_cmd.digital_output_index = 1; // Avoid 0-index'ing assert error
EXPECT_TRUE(device_.Write(cmd));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we should remove the extra space added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it

cmd.type = fastcat::ACTUATOR_SET_DIGITAL_OUTPUT_CMD;
EXPECT_TRUE(device_.Write(cmd));

Expand Down