Disable FastLED examples for Due #100
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
# This action generates the documentation and then deploys it to the `gh-pages` branch. | |
name: Documentation & Coverage | |
on: | |
push: | |
jobs: | |
deploy-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Cache the doxygen executable, lcov | |
- uses: actions/cache@v3 | |
id: cache-tools | |
with: | |
path: | | |
/tmp/doxygen | |
/tmp/lcov | |
/tmp/gtest | |
key: ${{ runner.os }}-doc-${{ hashFiles('scripts/ci/install-doxygen.sh', 'scripts/ci/install-lcov.sh', 'scripts/install-gtest.sh') }} | |
- name: Install Graphviz/Dot and LCOV Perl dependencies, as well as TeX Live | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
graphviz libjson-perl libperlio-gzip-perl perl \ | |
texlive-binaries | |
- name: Install LCOV | |
run: | | |
./scripts/ci/install-lcov.sh /tmp/lcov | |
echo "/tmp/lcov/bin" >> $GITHUB_PATH | |
# Download and install doxygen | |
- name: Install Doxygen | |
run: > | |
wget -O- https://github.com/doxygen/doxygen/releases/download/Release_1_10_0/doxygen-1.10.0.linux.bin.tar.gz | | |
tar xz -C /usr/local/bin doxygen-1.10.0/bin/doxygen --strip-components=2 | |
- name: Install Google Test | |
if: steps.cache-tools.outputs.cache-hit != 'true' | |
shell: bash | |
run: ./scripts/install-gtest.sh Debug /tmp/gtest | |
# Install Python | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install pypng | |
run: python3 -m pip install "pypng>=0.0.20" | |
# Create the `gh-pages` branch if it doesn't exist already, check it out, | |
# and copy it to /tmp/staging. | |
- name: Create staging area | |
run: | | |
rm -rf /tmp/staging | |
git fetch origin gh-pages:gh-pages ||: | |
git checkout gh-pages || \ | |
{ git checkout --orphan gh-pages && git rm -rf . && git clean -fxd ; } | |
cp -ar $GITHUB_WORKSPACE/ /tmp/staging | |
git checkout ${GITHUB_REF##*/} | |
git submodule update --init --recursive | |
# Generate the documentation and save it in /tmp/staging | |
- name: Generate documentation | |
run: ./scripts/ci/gen-docs.sh /tmp/staging | |
env: | |
CMAKE_PREFIX_PATH: /tmp/gtest | |
# Commit the new documentation, squash the commits, and push it to GitHub | |
- name: Commit and push documention | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
commithash=$(git rev-parse HEAD) | |
cd /tmp/staging | |
git add . | |
git commit -m "Documentation for ${commithash}" && \ | |
git reset $(git commit-tree HEAD^{tree} -m "Documentation for ${commithash}") && \ | |
git push -f origin gh-pages ||: |