Skip to content

[ci] update test command #49

[ci] update test command

[ci] update test command #49

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
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 -y clang-tidy-14 cppcheck doxygen
- 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 -S . -B build -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=build/install
- name: Build
run: |
cmake --build build --config Release
- name: Install
run: |
cmake --install build --config Release --prefix build/install
- 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 -y doxygen
- name: Build documentation
run: |
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
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