CMakeLists.txt: Remove 'set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)' #183
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: ZenUnitAndMetalMock | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
cmake_build_type: [Debug, Release] | |
cxx: [clang++, g++-10] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }} | |
- name: Install lld and ninja-build | |
run: sudo apt-get install lld ninja-build | |
- name: Install lcov if g++-10 Release | |
run: sudo apt-get install lcov | |
if: ${{ matrix.cxx == 'g++-10' && matrix.cmake_build_type == 'Release' }} | |
- name: Install pip packages | |
run: pip install --upgrade --upgrade-strategy eager -r dev-requirements.txt | |
- name: Mypy, Flake8, Pylint, then run unit tests with coverage and pytest if g++-10 Release | |
run: python ZenUnitDevOpsPython/MypyFlake8PylintThenRunTestsWithCoverage.py --run-tests-with-coverage-python-file=ZenUnitDevOpsPythonTests/RunAllWithCoverage.py | |
env: | |
PYTHONPATH: "." | |
if: ${{ matrix.cxx == 'g++-10' && matrix.cmake_build_type == 'Release' }} | |
- name: Upload Python code coverage if g++-10 Release | |
uses: codecov/codecov-action@v1 | |
with: | |
files: ZenUnitDevOpsPythonTests/CoberturaCodeCoverageResults_ZenUnitDevOpsPythonTests.xml | |
fail_ci_if_error: true | |
if: ${{ matrix.cxx == 'g++-10' && matrix.cmake_build_type == 'Release' }} | |
- name: Run BuildAndTestZenUnitAndMetalMock.py in non code coverage mode if clang++ Debug/Release or g++-10 Debug | |
run: | | |
python ZenUnitDevOpsPython/BuildAndTestZenUnitAndMetalMock.py \ | |
--cmake-generator=Ninja \ | |
--cmake-build-type="${{ matrix.cmake_build_type }}" \ | |
--cmake-definitions="" | |
env: | |
CXX: "/usr/bin/${{ matrix.cxx }}" | |
PYTHONPATH: . | |
if: ${{ matrix.cxx == 'clang++' || (matrix.cxx == 'g++-10' && matrix.cmake_build_type == 'Debug') }} | |
- name: Run BuildAndTestZenUnitAndMetalMock.py in code coverage mode if g++-10 Release | |
run: | | |
python ZenUnitDevOpsPython/BuildAndTestZenUnitAndMetalMock.py \ | |
--cmake-generator=Ninja \ | |
--cmake-build-type="${{ matrix.cmake_build_type }}" \ | |
--cmake-definitions="-DLCovCodeCoverageMode=ON" | |
env: | |
CXX: "/usr/bin/${{ matrix.cxx }}" | |
PYTHONPATH: . | |
if: ${{ matrix.cxx == 'g++-10' && matrix.cmake_build_type == 'Release' }} | |
- name: Print .comment section of binary ZenUnitLibraryTests to confirm it was linked with LLD | |
run: readelf --string-dump .comment "${{matrix.cmake_build_type}}/ZenUnitLibraryTests/ZenUnitLibraryTests" | |
- name: Install and run lcov 1.15 then upload to Codecov.io if g++-10 Release | |
run: | | |
mkdir -p lcov_1_15 | |
wget https://github.com/linux-test-project/lcov/releases/download/v1.15/lcov-1.15.tar.gz --output-document="lcov_1_15/lcov-1.15.tar.gz" | |
tar xf "lcov_1_15/lcov-1.15.tar.gz" --strip-components=1 --directory lcov_1_15 | |
lcov_1_15/bin/lcov --version | |
lcov_1_15/bin/lcov --directory . --capture --output-file coverage.info | |
lcov_1_15/bin/lcov --list coverage.info | |
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports" | |
if: ${{ matrix.cxx == 'g++-10' && matrix.cmake_build_type == 'Release' }} | |
- name: SonarCloud scan if g++-10 Release | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
if: ${{ matrix.cxx == 'g++-10' && matrix.cmake_build_type == 'Release' }} |