Migrate travis to github actions #6
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
env: | |
LINUX_DIST: bionic | |
DEPS_DIR: ${{ github.workspace }}/deps | |
COMPILER_NAME: gcc | |
CXX: g++ | |
CC: gcc | |
RUN_TESTS: true | |
COVERAGE: false | |
# PATH: ${{ github.workspace }}/deps/cmake/bin:${{ env.PATH }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up dependencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y gcc g++ doxygen graphviz python3-yaml | |
- name: Install CodeCov and LCOV | |
run: | | |
git clone https://github.com/linux-test-project/lcov.git | |
cd lcov | |
sudo make install | |
cd .. | |
- name: Show tool versions | |
run: | | |
echo $PATH | |
echo $CXX | |
$CXX --version | |
$CXX -v | |
cmake --version | |
lcov --version | |
gcov --version | |
- name: Build project | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. -Dhueplusplus_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -Dhueplusplus_EXAMPLES=ON | |
make hueplusplus_examples hueplusplus_snippets | |
make coveragetest | |
cd .. | |
doxygen Doxyfile | |
touch doc/html/.nojekyll | |
- name: Upload coverage to Codecov | |
run: | | |
bash <(curl -s https://codecov.io/bash) | |
- name: Deploy documentation to GitHub Pages | |
if: github.ref == 'refs/heads/master' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GH_REPO_TOKEN }} | |
publish_dir: ./doc/html |