CI #265
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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| schedule: | |
| - cron: '0 0 1 * *' | |
| jobs: | |
| Linux: | |
| name: Ubuntu 20.04 | |
| runs-on: ubuntu-20.04 | |
| strategy: | |
| matrix: | |
| compiler: [clang++, g++] | |
| env: | |
| NAME: Linux-${{ matrix.compiler }} | |
| CXX: ${{ matrix.compiler }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: CMake tests Linux | |
| shell: bash | |
| run: | | |
| ctest -S .ci.cmake -V | |
| # - name: Upload Prebuilt Binaries | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: Linux ${{ matrix.compiler }} prebuilt binaries | |
| # path: quickcpplib-v0.1-binaries-linux-x64.tgz | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Linux ${{ matrix.compiler }} test results | |
| path: prebuilt/merged_junit_results.xml | |
| MacOS: | |
| name: Mac OS | |
| runs-on: macos-latest | |
| env: | |
| NAME: MacOS | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: CMake tests Mac OS | |
| shell: bash | |
| run: ctest -S .ci.cmake -V -E noexcept | |
| # - name: Upload Prebuilt Binaries | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: Mac OS prebuilt binaries | |
| # path: quickcpplib-v0.1-binaries-darwin-x64.tgz | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Mac OS test results | |
| path: prebuilt/merged_junit_results.xml | |
| WinVS2019: | |
| name: Windows VS2019 | |
| runs-on: windows-2019 | |
| env: | |
| NAME: WinVS2019 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: CMake tests Windows | |
| shell: bash | |
| run: ctest -S .ci.cmake -V | |
| # - name: Upload Prebuilt Binaries | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: Windows VS2019 prebuilt binaries | |
| # path: quickcpplib-v0.1-binaries-win64.zip | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Windows VS2019 test results | |
| path: prebuilt/merged_junit_results.xml | |
| publish-test-results: | |
| name: "Publish Documentation and Unit Tests Results" | |
| needs: [Linux, MacOS, WinVS2019] | |
| runs-on: ubuntu-latest | |
| # the build-and-test job might be skipped, we don't need to run this job then | |
| if: success() || failure() | |
| env: | |
| NAME: Documentation | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| path: artifacts | |
| - name: Publish Unit Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| check_name: Unit Test Results | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| files: '**/merged_junit_results.xml' | |
| - name: Checkout Documentation | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Regenerate Documentation | |
| shell: bash | |
| run: | | |
| sudo apt-get install -y doxygen graphviz | |
| ctest -S .docs.cmake -V | |
| - name: Publish Documentation | |
| uses: JamesIves/github-pages-deploy-action@3.7.1 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BRANCH: gh-pages | |
| FOLDER: doc/html | |
| CLEAN: true |