Update README #65
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: Test build the application | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.5.* | |
modules: 'qtpdf' | |
cache: true | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: '53bef8994c541b6561884a8395ea35715ece75db' | |
- name: Install dependencies | |
run: vcpkg install gtest hunspell | |
- name: Configure | |
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
- name: Build | |
run: cmake --build build -j | |
- name: Run tests | |
run: ctest --output-on-failure --test-dir build | |
analyse: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.5.* | |
modules: 'qtpdf' | |
cache: true | |
- name: Install additional dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y hunspell libgmock-dev libhunspell-dev clazy | |
# https://github.com/actions/runner-images/issues/8659 | |
- name: Downgrade libstdc++ and g++ | |
run: | | |
sudo apt-get purge -y g++-13 gcc-13 libstdc++-13-dev | |
sudo apt-get install -y --allow-downgrades libstdc++-12-dev libstdc++6=12.* libgcc-s1=12.* | |
- name: Run Clazy analysis | |
run: | | |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clazy | |
cmake --build build -j |