breathe-doc / breathe

ReStructuredText and Sphinx bridge to Doxygen
https://breathe-doc.org
Other
752 stars 199 forks source link

using CI to test against different versions of doxygen #782

Open 2bndy5 opened 2 years ago

2bndy5 commented 2 years ago

I did this for a completely different project, but I thought I might share the idea.

The following yaml will install doxygen from the pre-built binary archives available via Doxygen's SourceForge files.

  build_docs:
    strategy:
      fail-fast: false
      matrix:
        doxygen: ['1.8.17', '1.9.1', '1.9.2']

    runs-on: ubuntu-latest
    steps:
      - name: install graphviz and libclang deps
        run: sudo apt-get install graphviz libclang1-9 libclang-cpp9
      - name: install doxygen from SF binary archives
        run: |
          mkdir doxygen-bin-arc && cd doxygen-bin-arc
          curl -L https://sourceforge.net/projects/doxygen/files/rel-${{ matrix.doxygen }}/doxygen-${{ matrix.doxygen }}.linux.bin.tar.gz > doxygen.tar.gz
          gunzip doxygen.tar.gz
          tar xf doxygen.tar
          cd doxygen-${{ matrix.doxygen }}
          sudo make install

      # now use doxygen accordingly
      - name: run doxygen
        run: doxygen --version

This ends up being faster (~30 seconds faster) than installing doxygen via apt (which currently serves v1.8.17 by default).

jakobandersen commented 2 years ago

Nice, thanks. Once we get the tests reorganized (e.g., #733) this should definitely be incorporated.