doc: use sphinx + breathe + doxygen to generate the documentation #664
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: | |
- main | |
tags: 'REL-*' | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: ["dotbot-v1", "dotbot-v2", "nrf52833dk", "nrf52840dk", "nrf5340dk-app", "nrf5340dk-net", "sailbot-v1"] | |
config: ["Debug", "Release"] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Build projects | |
run: BUILD_TARGET=${{ matrix.target }} BUILD_CONFIG=${{ matrix.config }} make docker | |
- name: Build for release and convert elf artifacts to hex | |
if: matrix.target == 'dotbot-v1' && matrix.config == 'Release' | |
run: BUILD_TARGET=${{ matrix.target }} DOCKER_TARGETS="artifacts" BUILD_CONFIG=${{ matrix.config }} make docker | |
- name: Upload artifact | |
if: contains(fromJSON('["dotbot-v1", "dotbot-v2", "nrf52833dk", "nrf52840dk", "sailbot-v1"]'), matrix.target) && matrix.config == 'Release' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: artifacts/* | |
build-success: | |
# this is only run if all builds succeeded | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: build succeeded | |
run: exit 0 | |
style: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Check style | |
run: make check-format | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install Doxygen | |
run: sudo apt-get install -y doxygen graphviz | |
- name: Install Sphinx | |
run: python -m pip install -r doc/sphinx/requirements.txt | |
- name: Build documentation | |
run: make doc | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Build docker image | |
run: docker build -t dotbot . | |
release: | |
runs-on: ubuntu-latest | |
needs: [docker, doc, style, build-success] | |
if: >- | |
github.event_name == 'push' && | |
startsWith(github.event.ref, 'refs/tags') | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifacts | |
path: ./artifacts | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
generateReleaseNotes: true | |
artifacts: "artifacts/*" | |
token: ${{ secrets.RELEASE_TOKEN }} |