Skip to content

Commit

Permalink
Adding build infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
nickchan2 committed Mar 29, 2024
1 parent bc8fae3 commit 9990172
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 0 deletions.
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:
# Run actions fow all branches
push:
branches: ["**"]
pull_request:
branches: ["**"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# - name: Install clang-tidy
# run: sudo apt install clang-tidy

- name: Set up CMake
run: cmake -B build
# run: cmake cli/ -B cli/build -DENABLE_CLANG_TIDY=ON

- name: Build project
run: cmake --build build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.DS_Store
.vscode
.cache
build
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.10)
project(agi_utils)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

option(ENABLE_CLANG_TIDY OFF)
if(ENABLE_CLANG_TIDY)
set(CMAKE_CXX_CLANG_TIDY "clang-tidy")
endif()

add_subdirectory(error_detection)
add_subdirectory(loaders)
add_subdirectory(vserial)
2 changes: 2 additions & 0 deletions error_detection/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_library(error_detection STATIC error_detection.cc)
target_include_directories(error_detection PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
2 changes: 2 additions & 0 deletions loaders/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_library(loaders STATIC loaders.cc)
target_include_directories(loaders PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
2 changes: 2 additions & 0 deletions vserial/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_library(vserial STATIC vserial.cc)
target_include_directories(vserial PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

0 comments on commit 9990172

Please sign in to comment.