Add JenkinsJobs/Windows/FileRevisor-RelWithDebInfo-RunUnitTestsNTimes… #31
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: FileRevisor | |
| on: [push] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| cxx: [clang++, g++] | |
| cmake_build_type: [Debug, Release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.pythonLocation }} | |
| key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('FileRevisorDevOpsPython/dev-requirements.txt') }} | |
| - name: Install lld and ninja-build | |
| run: sudo apt-get install lld ninja-build libtbb-dev | |
| - name: Install lcov Perl dependencies if g++ Release | |
| run: sudo apt-get install libcapture-tiny-perl libdatetime-perl | |
| if: ${{ matrix.cxx == 'g++' && matrix.cmake_build_type == 'Release' }} | |
| - name: Download ZenUnit.h | |
| run: curl https://raw.githubusercontent.com/NeilJustice/ZenUnitAndMetalMock/main/ZenUnitAndMetalMock/ZenUnit.h --create-dirs -o "$GITHUB_WORKSPACE/ZenUnitAndMetalMock/ZenUnit.h" | |
| - name: Download MetalMock.h | |
| run: curl https://raw.githubusercontent.com/NeilJustice/ZenUnitAndMetalMock/main/ZenUnitAndMetalMock/MetalMock.h --create-dirs -o "$GITHUB_WORKSPACE/ZenUnitAndMetalMock/MetalMock.h" | |
| - name: Install pip packages | |
| run: pip install --upgrade --upgrade-strategy eager -r FileRevisorDevOpsPython/dev-requirements.txt | |
| - name: Mypy, Flake8, Pylint, then run unit tests with coverage and pytest if g++ Release | |
| working-directory: FileRevisorDevOpsPython | |
| run: python FileRevisorDevOpsPython/MypyFlake8PylintThenRunTestsWithCoverage.py --run-tests-with-coverage-python-file=FileRevisorDevOpsPythonTests/RunAllWithCoverage.py | |
| env: | |
| PYTHONPATH: . | |
| if: ${{ matrix.cxx == 'g++' && matrix.cmake_build_type == 'Release' }} | |
| - name: Upload Python code coverage if g++ Release | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: FileRevisorDevOpsPython/FileRevisorDevOpsPythonTests/CoberturaCodeCoverageResults_FileRevisorDevOpsPythonTests.xml | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| if: ${{ matrix.cxx == 'g++' && matrix.cmake_build_type == 'Release' }} | |
| - name: Run BuildAndInstallCPlusPlusProgram.py in non code coverage mode if clang++ Debug/Release or g++ Debug | |
| run: | | |
| python FileRevisorDevOpsPython/FileRevisorDevOpsPython/BuildAndInstallCPlusPlusProgram.py \ | |
| --solution-name=FileRevisor \ | |
| --cmake-build-type="${{ matrix.cmake_build_type }}" \ | |
| --cmake-definitions="-DFastLinuxDebugBuildMode=ON -DFastLinuxReleaseBuildMode=ON" \ | |
| --tests-project-name=libFileRevisorTests \ | |
| --no-install | |
| env: | |
| CXX: "/usr/bin/${{ matrix.cxx }}" | |
| PYTHONPATH: FileRevisorDevOpsPython | |
| if: ${{ matrix.cxx == 'clang++' || (matrix.cxx == 'g++' && matrix.cmake_build_type == 'Debug') }} | |
| - name: Run BuildAndInstallCPlusPlusProgram.py in code coverage mode if g++ Release | |
| run: | | |
| python FileRevisorDevOpsPython/FileRevisorDevOpsPython/BuildAndInstallCPlusPlusProgram.py \ | |
| --solution-name=FileRevisor \ | |
| --cmake-build-type="${{ matrix.cmake_build_type }}" \ | |
| --cmake-definitions="-DLCovCodeCoverageMode=ON" \ | |
| --tests-project-name=libFileRevisorTests \ | |
| --no-install | |
| env: | |
| CXX: "/usr/bin/${{ matrix.cxx }}" | |
| PYTHONPATH: FileRevisorDevOpsPython | |
| if: ${{ matrix.cxx == 'g++' && matrix.cmake_build_type == 'Release' }} | |
| - name: Print .comment section of binary libFileRevisorTests to confirm it was linked with LLD | |
| run: readelf --string-dump .comment "${{matrix.cmake_build_type}}/libFileRevisorTests/libFileRevisorTests" | |
| - name: Install and run lcov 2.4 then upload to Codecov.io if g++ Release | |
| run: | | |
| mkdir -p lcov_2.4 | |
| wget https://github.com/linux-test-project/lcov/releases/download/v2.4/lcov-2.4.tar.gz --output-document="lcov_2.4/lcov-2.4.tar.gz" | |
| tar xf "lcov_2.4/lcov-2.4.tar.gz" --strip-components=1 --directory lcov_2.4 | |
| lcov_2.4/bin/lcov --version | |
| lcov_2.4/bin/lcov --directory . --capture --no-external --ignore-errors inconsistent --output-file coverage.info | |
| lcov_2.4/bin/lcov --list coverage.info | |
| bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${{ secrets.CODECOV_TOKEN }} || echo "Codecov did not collect coverage reports" | |
| if: ${{ matrix.cxx == 'g++' && matrix.cmake_build_type == 'Release' }} | |
| - name: tree GITHUB_WORKSPACE | |
| run: tree $GITHUB_WORKSPACE |