https://github.com/bialger/cpp_tests
C++ Google Tests crossplatform project template with CI/CD. Has a shell installation script.
https://github.com/bialger/cpp_tests
autotesting ci-cd ci-template cpp-template cross-platform googletest install-script template-project
Last synced: 3 months ago
JSON representation
C++ Google Tests crossplatform project template with CI/CD. Has a shell installation script.
- Host: GitHub
- URL: https://github.com/bialger/cpp_tests
- Owner: bialger
- License: gpl-3.0
- Created: 2024-01-17T05:43:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-15T09:25:11.000Z (10 months ago)
- Last Synced: 2025-02-28T16:08:13.852Z (3 months ago)
- Topics: autotesting, ci-cd, ci-template, cpp-template, cross-platform, googletest, install-script, template-project
- Language: C++
- Homepage:
- Size: 56.6 KB
- Stars: 15
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# C++ project template with Google Tests and CI/CD
This is a project template. Feel free to use & fork it. It contains all pre-configured
CMakeLists.txt, so to use it, replace project name with your one in
[main CmakeLists.txt](CMakeLists.txt), and all target and executable names in
[CI/CD script](./.github/workflows/ci_tests.yml). Sample program prints a greeting for the first argument.## How to build and run
Run the following commands from the project directory.
1. Create CMake cache
```shell
cmake -S . -B cmake-build
```2. Build executable target
```shell
cmake --build cmake-build --target cpp_tests
```3. Build tests target
```shell
cmake --build cmake-build --target cpp_tests_tests
```4. Run executable target
* On Windows:
```shell
.\cmake-build\cpp_tests.exe World
```* On *nix:
```shell
./cmake-build/bin/cpp_tests World
```5. Run tests
* On Windows:
```shell
.\cmake-build\cpp_tests_tests.exe
```* On *nix:
```shell
./cmake-build/tests/cpp_tests_tests
```