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

Run unit tests with github actions #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Run unit tests with github actions #1

wants to merge 6 commits into from

Conversation

FabioBatSilva
Copy link
Owner

@FabioBatSilva FabioBatSilva commented Apr 17, 2022

A few things going on here:

  • add github action to runs unit tests on push
  • fix the make file that downloads gtest
  • cleanup some warnings/errors

GoogleTest is packaged in subdirectory.

  ls -lah  downloads/googletest-release-1.11.0/*
    drwxrwxr-x 2 4.0K Jun 11  2021 ci
    drwxrwxr-x 8 4.0K Jun 11  2021 googlemock
    drwxrwxr-x 9 4.0K Jun 11  2021 googletest
    # ....

First download the zip file, then unzip to a tmp dir and finaly move googletest
to tools directory
This will ignore warning in gtest
since it is not compatible with some of the flags beeing enforced

  gtest.cc:1266:43:
  error: implicit conversion from ‘float’ to ‘double’ to match other
  operand of binary expression [-Werror=double-promotion]
   1266 |         costs[l_i + 1][r_i + 1] = replace + 1.00001;
        |                                   ~~~~~~~~^~~~~~~~~
Compile with -O1 to make inline functions compatible with gcc

  utils_math.c:582: undefined reference to `utils_truncate_number'
    error: ld returned 1 exit status
 Unused variable ret causes error :

 unittest.cpp: In member function ‘virtual void Saturate2dVector_ValsOnEdgeOfRange_Test::TestBody()’:
  unittest.cpp:291:9: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
    291 |    bool ret;
        |         ^~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants