Skip to content

Commit

Permalink
Software compilaton tests in CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
bo3z committed Oct 22, 2024
1 parent 8deb74e commit 49b8e65
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# 1) Build HTML from Sphinx
- name: Build HTML
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile_driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# We do some additional logging, just so that we can back-trace the Linux / Ubuntu version
- name: Compile driver
Expand Down
147 changes: 147 additions & 0 deletions .github/workflows/compile_software.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# A work-flow for compiling the Coyote software examples; for now, we are testing on Ubuntu 20.04
# This checks no extreme breaking changes were done in the examples & software, i.e. at least it compiles
name: Compile software

# Run on every push, makes dev and PR reviews easier
on: push

jobs:
compile-kmeans:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile kmeans
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=kmeans -DVERBOSITY=ON && make

compile-multi-threading:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile multi-threading
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=multithreading -DVERBOSITY=ON && make

compile-perf-fpga:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile perf FPGA
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=perf_fpga -DVERBOSITY=ON && make

compile-perf-local:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile perf local
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=perf_local -DVERBOSITY=ON && make

compile-reconfigure-shell:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile reconfigure shell
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=reconfigure_shell -DVERBOSITY=ON && make

compile-streaming-client:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile streaming client
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=streaming_client -DVERBOSITY=ON && make

compile-streaming-server:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile streaming server
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=streaming_server -DVERBOSITY=ON && make

compile-tcp-benchmark:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile TCP benchmark
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=tcp_iperf -DVERBOSITY=ON && make

compile-rdma-client:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile RDMA client
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=rdma_client -DVERBOSITY=ON && make

compile-rdma-server:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Environment set-up
run:
mkdir examples_sw/build && sudo apt-get install libboost-all-dev

- name: Compile RDMA server
run:
cd examples_sw/build && cmake ../ -DEXAMPLE=rdma_server -DVERBOSITY=ON && make
2 changes: 1 addition & 1 deletion cmake/FindCoyoteHW.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Coyote HW package
#
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
#project(CoyoteHW)

set(IPREPO_DIR ${CMAKE_BINARY_DIR}/iprepo)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindCoyoteSW.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Coyote SW package
#
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)

# Config
set(EN_AVX "1" CACHE STRING "AVX enabled.")
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindVivado.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# VIVADO_FOUND
# VIVADO_BINARY

cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)

find_path(VIVADO_PATH
NAMES vivado
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindVivadoHLS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# VIVADO_HLS_BINARY
# VIVADO_HLS_INCLUDE_DIRS

cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)

find_path(VIVADO_HLS_PATH
NAMES vivado_hls vitis_hls
Expand Down
8 changes: 7 additions & 1 deletion examples_sw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(test)

set(CYT_DIR ${CMAKE_SOURCE_DIR}/../)
Expand Down Expand Up @@ -57,11 +57,13 @@ endif()
if(EXAMPLE STREQUAL "streaming_server")
set(TARGET_DIR "${CYT_DIR}/examples_sw/apps/streaming_service/server")
message("** Example: Streaming service - Server (Coyote daemon)")
include_directories(${TARGET_DIR}/../include ${TARGET_DIR}/include)
endif()

if(EXAMPLE STREQUAL "streaming_client")
set(TARGET_DIR "${CYT_DIR}/examples_sw/apps/streaming_service/client")
message("** Example: Streaming service - Client")
include_directories(${TARGET_DIR}/../include)
endif()

if(EXAMPLE STREQUAL "multithreading")
Expand All @@ -73,6 +75,7 @@ endif()
if(EXAMPLE STREQUAL "kmeans")
set(TARGET_DIR "${CYT_DIR}/examples_sw/apps/kmeans")
message("** Example: K-Means kernel - Unified memory")
include_directories(${TARGET_DIR}/include)
endif()

# Network - RDMA
Expand All @@ -99,6 +102,9 @@ endif()
#
set(EXEC test)
add_executable(${EXEC} ${TARGET_DIR}/main.cpp)
if(EXAMPLE STREQUAL "kmeans")
add_executable(kmeans_utils ${TARGET_DIR}/utils.cpp)
endif()
target_link_libraries(${EXEC} PUBLIC Coyote)
target_link_directories(${EXEC} PUBLIC /usr/local/lib)

Expand Down

0 comments on commit 49b8e65

Please sign in to comment.