Skip to content

Commit

Permalink
build: add single thread config build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Jan 2, 2024
1 parent 5566f5a commit 65b002c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/build-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,31 @@ jobs:
env:
Z_FEATURE_RAWETH_TRANSPORT: ${{ matrix.feature_reth }}

st_build:
name: Build and test in single thread on ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run docker image
run: docker run --name zenoh_router --init --net host -d eclipse/zenoh:latest

- name: Build project and run test
run: |
sudo apt install -y ninja-build
CMAKE_GENERATOR=Ninja make
python3 ./build/tests/single_thread.py
timeout-minutes: 5
env:
Z_FEATURE_MULTI_THREAD: 0

- name: Stop docker image
if: always()
run: |
docker stop zenoh_router
docker rm zenoh_router
fragment_test:
name: Test multicast and unicast fragmentation
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ if(UNIX OR MSVC)
configure_file(${PROJECT_SOURCE_DIR}/tests/modularity.py ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/modularity.py COPYONLY)
configure_file(${PROJECT_SOURCE_DIR}/tests/raweth.py ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/raweth.py COPYONLY)
configure_file(${PROJECT_SOURCE_DIR}/tests/fragment.py ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/fragment.py COPYONLY)
configure_file(${PROJECT_SOURCE_DIR}/tests/fragment.py ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/single_thread.py COPYONLY)
configure_file(${PROJECT_SOURCE_DIR}/tests/single_thread.py ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/single_thread.py COPYONLY)

enable_testing()
add_test(z_data_struct_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/z_data_struct_test)
Expand Down

0 comments on commit 65b002c

Please sign in to comment.