Skip to content

[ci] install deps

[ci] install deps #45

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install clang-tidy-14 cppcheck doxygen -y -q
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 140
- name: Download utest.h
run: |
mkdir -p test/source
curl -o test/source/utest.h https://raw.githubusercontent.com/sheredom/utest.h/master/utest.h
- name: Configure
run: cmake --preset=ci-linux
- name: Build
run: cmake --build build --config Release -j 2
- name: Install
run: cmake --install build --config Release --prefix prefix
- name: Test
working-directory: build
run: ctest --output-on-failure --no-tests=error -C Release -j 2
docs:
runs-on: ubuntu-22.04
needs: test
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Doxygen
run: sudo apt-get install doxygen -y -q
- name: Build documentation
run: |
cmake --preset=ci-linux
cmake --build build --target docs
- name: Deploy documentation to branch
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git checkout --orphan gh-pages
git rm -rf .
cp -r build/docs/html/* .
git add .
git commit -m "Deploy docs"
git push --force origin gh-pages