[WIP] Add simple CMake presets #143
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: QA | |
on: [push, pull_request] | |
jobs: | |
build-clang: | |
name: Check source with clang | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Update system | |
run: sudo apt-get update | |
- name: Install prerequisites | |
run: >- | |
sudo apt-get install -y | |
libgcrypt20-dev | |
clang-14 | |
clang-tidy-14 | |
cmake | |
ninja-build | |
doxygen | |
graphviz | |
- uses: actions/checkout@v3 | |
- name: Configure | |
# cSpell:disable | |
env: | |
CXX: clang++-14 | |
CXXFLAGS: >- | |
-std=c++11 | |
-pedantic | |
-Werror | |
-Wall | |
-Wextra | |
SRecord_CMake_Flags: >- | |
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON | |
run: cmake --preset default --fresh ${SRecord_CMake_Flags} | |
# cSpell:enable | |
- name: Build | |
run: ninja -k 0 srecord-executables | |
- name: Smoke test | |
run: cmake --build --preset srecord-executables-version | |
- name: Build test prerequisites | |
run: cmake --build --preset prepare-test | |
- name: Test | |
working-directory: build | |
run: ctest --output-on-failure --output-junit ctest.junit.xml | |
- name: clang-tidy | |
if: always() | |
run: run-clang-tidy-14 -p build -header-filter=.* | |
build-gcc: | |
name: Check source with gcc | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Update system | |
run: sudo apt-get update | |
- name: Install prerequisites | |
run: >- | |
sudo apt-get install -y | |
libgcrypt20-dev | |
gcc-11 | |
cmake | |
ninja-build | |
doxygen | |
graphviz | |
- uses: actions/checkout@v3 | |
- name: Configure | |
# cSpell:disable | |
env: | |
CXX: g++-11 | |
CXXFLAGS: >- | |
-std=c++11 | |
-pedantic | |
-Werror | |
-Wall | |
-Wextra | |
-Wno-implicit-fallthrough | |
SRecord_CMake_Flags: >- | |
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON | |
run: cmake --preset default --fresh ${SRecord_CMake_Flags} | |
# cSpell:enable | |
- name: Build | |
run: ninja -k 0 srecord-executables | |
- name: Smoke test | |
run: cmake --build srecord-executables-version | |
- name: Build test prerequisites | |
run: cmake --build prepare-test | |
- name: Test | |
working-directory: build | |
run: ctest --output-on-failure --output-junit ctest.junit.xml | |
docs: | |
name: Documentation | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Update system | |
run: sudo apt-get update | |
- name: Install prerequisites | |
run: >- | |
sudo apt-get install -y | |
cmake | |
ninja-build | |
doxygen | |
graphviz | |
groff | |
psutils | |
ghostscript | |
- uses: actions/checkout@v3 | |
- name: Configure | |
run: cmake -G Ninja -S . -B build | |
- name: man pages | |
working-directory: build | |
run: ninja man | |
- name: PDF | |
working-directory: build | |
run: ninja doco | |
- name: Doxygen | |
working-directory: build | |
run: ninja doxygen | |
- name: Web Site | |
working-directory: build | |
run: ninja man-html web-site |