Browse Source

add c template test

tags/v0.3.5-rc0
XxChang 1 year ago
parent
commit
b4c6e12f45
2 changed files with 21 additions and 0 deletions
  1. +17
    -0
      .github/workflows/ci.yml
  2. +4
    -0
      binaries/cli/src/template/c/talker/talker-template.c

+ 17
- 0
.github/workflows/ci.yml View File

@@ -314,6 +314,23 @@ jobs:
dora stop --name ci-python-test --grace-duration 5s
dora destroy

- name: "Test CLI (C)"
timeout-minutes: 30
# fail-fast by using bash shell explictly
shell: bash
run: |
# Test C template Project
dora new test_c_project --lang c
cd test_c_project
dora up
dora list
cmake -B build
cmake --build build
cmake --install build
dora start dataflow.yml --name ci-c-test
sleep 10
dora stop --name ci-c-test --grace-duration 5s
dora destroy
clippy:
name: "Clippy"
runs-on: ubuntu-latest


+ 4
- 0
binaries/cli/src/template/c/talker/talker-template.c View File

@@ -48,10 +48,14 @@ int main()
else if (ty == DoraEventType_Stop)
{
printf("[c node] received stop event\n");
free_dora_event(event);
break;
}
else
{
printf("[c node] received unexpected event: %d\n", ty);
free_dora_event(event);
break;
}

free_dora_event(event);


Loading…
Cancel
Save