![]() |
calculator (Windows) - library API 1.1.1
calculator - Libraries
|
Live site (built by CI, every report embedded): https://ucoruh.github.io/cpp-cmake-ctest-template/
Use **"Use this template"**, not "Fork": a fork of a public repository cannot be made private, and your course project must be private.
cen429-2026-<yourname>-<topic>.ucoruh) and your team mates, so a private repository can be graded.Clone it with the submodule (googletest) and run the first build:
Windows: 7-build-all-windows.bat - Linux / WSL: ./7-build-all-linux.sh (install the tools first: 4-install-tools-*, see docs/guide/install.en.md).
9-open-site-windows.bat / ./9-open-site-linux.sh opens the full site (every report, the API docs) on http://localhost:8000, and the release/ folder holds every output (app, libraries, all reports, API docs, site.zip, source, ASSETS.md, SHA256SUMS.txt). See Showing your project without GitHub Pages.GitHub Pages does not work for private repositories on the Free plan, releases do: 10-release-* publishes the same release/ folder as a GitHub Release (works on private repositories).
A small utility library, a calculator library (unit-tested infix/postfix expression parsing), a calculatorapp command-line demo and a googletest suite, wired up with CMake + CTest. Every check is reported twice - with ReportGenerator and with the ecosystem's native tool - for unit tests, code coverage and documentation coverage, on Windows and Linux separately, plus Doxygen API docs, all tied together in a MkDocs Material site. See docs/reports/index.md ("Which report is which?").
The site is bilingual (mkdocs-static-i18n: English at the root, Turkish under /tr/, language switcher in the header). Guides (English / Turkish): install / kurulum | use the template / şablonu kullanma | topic to project / konudan projeye | daily workflow / günlük iş akışı | reports inside the site / siteye rapor gömme | showing your project without Pages / Pages olmadan gösterme | releases / sürümler | troubleshooting / sorun giderme.
project.envEvery script, every workflow, the Python tools, CMake and MkDocs read this file. Rename your project or raise the version here, once. VERSION=1.1.1 releases as tag v1.1.1.
Every job exists as NN-name-windows.bat and NN-name-linux.sh (native Linux and WSL - WSL is Linux, same .sh, Linux binaries). Helper scripts live in scripts/.
| # | Job | Windows | Linux / WSL |
|---|---|---|---|
| 0 | initialise the googletest submodule (update = newest upstream) | 0-init-submodules-windows.bat | 0-init-submodules-linux.sh |
| 1 | install the git hooks (AStyle on commit) | 1-configure-git-hooks-windows.bat | 1-configure-git-hooks-linux.sh |
| 2 | re-create .gitignore | 2-create-gitignore-windows.bat | 2-create-gitignore-linux.sh |
| 3 | install Chocolatey / Scoop | 3-install-package-manager-windows.bat | - |
| 4 | install every tool (incl. PlantUML) | 4-install-tools-windows.bat | 4-install-tools-linux.sh |
| 5 | format the code (AStyle) | 5-format-code-windows.bat | 5-format-code-linux.sh |
| 6 | fast loop: build + unit tests | 6-build-and-test-windows.bat | 6-build-and-test-linux.sh |
| 7 | everything: 6 + all reports + API docs + site + release/ | 7-build-all-windows.bat | 7-build-all-linux.sh |
| 8 | run the sample app | 8-run-app-windows.bat | 8-run-app-linux.sh |
| 9 | serve + open the site on http://localhost:8000 | 9-open-site-windows.bat | 9-open-site-linux.sh |
| 10 | publish release/ as a GitHub Release (--dry-run first) | 10-release-windows.bat | 10-release-linux.sh |
| 11 | clean every generated folder | 11-clean-windows.bat | 11-clean-linux.sh |
| Old | New |
|---|---|
7-build-app-windows.bat, 7-build-doc-windows.bat | 7-build-all-windows.bat |
7-build-app-linux.sh | 7-build-all-linux.sh |
8-build-test-windows.bat | 6-build-and-test-windows.bat (new: 6-build-and-test-linux.sh) |
4-install-windows-enviroment.bat | 4-install-tools-windows.bat |
4-install-wsl-environment.sh | 4-install-tools-linux.sh |
6_download_plantuml.bat | folded into 4-install-tools-windows.bat / 4-install-tools-linux.sh |
0-init-submodules.bat / .sh | 0-init-submodules-windows.bat / 0-init-submodules-linux.sh |
0-update-submodules.bat / .sh | 0-init-submodules-windows.bat update / 0-init-submodules-linux.sh update |
1-configure-git-hooks.bat | 1-configure-git-hooks-windows.bat (new: -linux.sh) |
2-create-git-ignore.bat | 2-create-gitignore-windows.bat (new: -linux.sh) |
3-install-package-manager.bat | 3-install-package-manager-windows.bat |
5-format-code.bat | 5-format-code-windows.bat (new: -linux.sh) |
9-open-site.bat / .sh | 9-open-site-windows.bat / 9-open-site-linux.sh |
9-clean-project.bat / .sh, 9-clean-configure-app-windows.bat | 11-clean-windows.bat / 11-clean-linux.sh |
10-release.bat / .sh | 10-release-windows.bat / 10-release-linux.sh |
detect-python.bat, detect-generator.bat, detect-genhtml.bat | scripts/detect-python-windows.bat, scripts/detect-generator-windows.bat, scripts/detect-genhtml-windows.bat |
delete_desktop_ini.bat / .sh | scripts/delete-desktop-ini-windows.bat / scripts/delete-desktop-ini-linux.sh |
DoxyfileLibWin, DoxyfileLibLinux, DoxyfileTestWin, DoxyfileTestLinux | config/Doxyfile-lib, config/Doxyfile-tests (platform values come from environment variables) |
VERSION file | project.env |
build_win/, build_linux/ | build/windows-debug/, build/windows-release/, build/linux-debug/, ... |
publish_win/, publish_linux/ | publish/windows-x64/{release,debug}/, publish/linux-x64/{release,debug}/ |
release_win/, release_linux/ | release/ (one folder; assets carry the platform in their name) |
docs/coveragereportlibwin, docs/coveragenativelibwin, docs/doxygenlibwin, docs/testresultswin, docs/coverxygen* ... (and the *linux twins) | reports/<windows\|linux>/<kind>-<tool>/ |
report_test_hist_win/, report_doc_lib_hist_win/ ... | reports/history/<windows\|linux>/ |
assets/codecoveragelibwin/, assets/doccoveragelibwin/ (and *linux) | assets/badges/<windows\|linux>/{coverage,doccoverage}/ |
release/ = GitHub Release, one to one)<project>-<version>[-<platform>[-<arch>]]-<content>[-<tool>].<ext>, version without v; platforms windows, linux, macos (CI, app only); architectures x64, arm64; .zip for Windows binaries and all HTML, .tar.gz for Linux/macOS binaries.
A student builds on one platform, so a local release/ holds that platform's assets plus the neutral ones; ASSETS.md says which platform's assets are missing. CI builds both.
0-init-submodules-*)scripts/detect-generator-windows.bat picks whichever you havegcov is chosen automatically)requirements.txt (mkdocs-material, coverxygen, junit2html, gcovr), .NET SDK (ReportGenerator), Doxygen, lcov - all installed by 4-install-tools-*. See docs/guide/install.en.md.
| Coverage type | Windows OS | Linux OS (WSL / CI Ubuntu) |
|---|---|---|
| Line | ||
| Branch | ||
| Method |
| Windows OS | Linux OS (WSL / CI Ubuntu) | |
|---|---|---|
| Coverage ratio |
Both a ReportGenerator HTML report (with these badges and a history trend) and the native tool's own report (OpenCppCoverage on Windows, lcov genhtml and gcovr on Linux) are generated side by side.
Workflows under .github/workflows/:
cpp.yml - on every push and pull request: builds and tests on Windows and Ubuntu (Release), lean, no reports.pages.yml - on push to main (and manually): Windows and Linux jobs build tests + reports + API docs, a merge job builds the MkDocs site with both platforms' reports, checks its links and deploys it to the gh-pages branch. On a private repository the deploy is skipped unless the repository variable PAGES_ON_PRIVATE is true (Pages needs GitHub Pro/Team); the notice points to Showing your project without GitHub Pages.release.yml - on a v* tag (or manually): Windows, Linux and macOS jobs (macOS builds the app only), then a merge job builds the site and publishes every asset above with ASSETS.md and SHA256SUMS.txt. Prefer the local 10-release-* script day to day: same assets, no Actions minutes.Test results are converted with junit2html; 4-install-tools-* installs it together with the other Python tools (pip install --user -r requirements.txt).
Run the .sh scripts from a folder on WSL's own filesystem (~/work/<repo>), not from a Windows Google Drive path - WSL cannot reach those. See docs/guide/install.en.md and the WSL2 gcov/lcov notes in docs/guide/troubleshooting.en.md. Related notes: coruhtech/vs-docker-wsl-cpp-development, ucoruh/ns3-wsl-win10-setup.