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

Finished action for running tests #1

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 16 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: C/C++ CI

on:
push:
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build and run cpp tests
run: make test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
src/.DS_Store
test/.DS_Store
.vscode
rpl-sim
build/*
37 changes: 37 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
cmake_minimum_required(VERSION 3.25)
project(rpl-sim)

set(CMAKE_CXX_STANDARD 11)

include(FetchContent)

FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0
)

set(BOOST_ENABLE_CMAKE ON)

FetchContent_Declare(
Boost
URL https://github.com/boostorg/boost/releases/download/boost-1.81.0/boost-1.81.0.tar.xz
URL_MD5 6cf0cdd797bca685910d527ae3c08cb3
DOWNLOAD_EXTRACT_TIMESTAMP ON
)

FetchContent_Declare(
Eigen3
GIT_REPOSITORY "https://gitlab.com/libeigen/eigen.git"
GIT_TAG "3.4.0"
)

FetchContent_MakeAvailable(Catch2)
FetchContent_MakeAvailable(Boost)
FetchContent_MakeAvailable(Eigen3)

add_executable(tests test/tests.cpp)
add_executable(source src/test.cpp)

target_link_libraries(tests PRIVATE Catch2::Catch2WithMain Eigen3::Eigen ${Boost_LIBRARIES})
target_link_libraries(source PRIVATE Catch2::Catch2WithMain Eigen3::Eigen)
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
.PHONY: all test clean build

test:
cmake -S . -B build
cmake --build build
cd build && ./tests && cd ..


build:
g++ -Isrc/Eigen src/test.cpp -o rpl-sim
g++ -std=c++14 -Isrc/Eigen -isystem src/boost_1_82_0 src/test.cpp -o rpl-sim


clean:
rm -rf build
rm rpl-sim
8 changes: 8 additions & 0 deletions src/boost_1_82_0/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
See ./index.html for information about this release. The "Getting Started"
section is a useful starting place.

---------------------------
Copyright Beman Dawes, 2008

Distributed under the Boost Software License, Version 1.0.
See ./LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt
Loading
Loading