Adding support for installing the library and simplifying versioning. #16
This file contains hidden or 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 | |
| # https://github.com/actions/runner-images | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Test on ${{ matrix.os }} with ${{ matrix.compiler }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux builds | |
| - os: ubuntu-latest | |
| compiler: gcc | |
| cc: gcc | |
| cxx: g++ | |
| - os: ubuntu-latest | |
| compiler: clang | |
| cc: clang | |
| cxx: clang++ | |
| # macOS builds | |
| - os: macos-latest | |
| compiler: clang | |
| cc: clang | |
| cxx: clang++ | |
| # Windows builds | |
| - os: windows-latest | |
| compiler: msvc | |
| cc: cl | |
| cxx: cl | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Set up compiler environment | |
| shell: bash | |
| run: | | |
| echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV | |
| echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV | |
| - name: Configure CMake | |
| run: cmake --preset test | |
| - name: Build | |
| run: cmake --build build/test | |
| - name: Run tests | |
| run: ctest --test-dir build/test --verbose | |
| docs: | |
| name: Build and Deploy Documentation | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| uses: ssciwr/doxygen-install@v1 | |
| - name: Configure CMake with docs | |
| run: cmake --preset docs | |
| - name: Build documentation | |
| run: cmake --build build/docs --target docs | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: build/docs/html | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |