Migrate travis to github actions #11
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++ lcov doxygen graphviz python3-yaml | |
# - name: Install CodeCov and LCOV | |
# run: | | |
# sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-7 90 | |
# wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz | |
# tar xf lcov_1.13.orig.tar.gz | |
# make -C lcov-1.13 "PREFIX=${HOME}/.local" install | |
# echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- 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 |