ci(homebrew): enable test coverage on Linux (#3842)
This commit is contained in:
parent
a0a97138e0
commit
4d2391c9a0
3 changed files with 48 additions and 58 deletions
56
.github/workflows/ci-homebrew.yml
vendored
56
.github/workflows/ci-homebrew.yml
vendored
|
|
@ -51,27 +51,6 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Fix homebrew python
|
||||
if: matrix.os_name == 'macos' && matrix.os_version == '13'
|
||||
run: |
|
||||
rm '/usr/local/bin/2to3'
|
||||
rm '/usr/local/bin/2to3-3.12'
|
||||
rm '/usr/local/bin/idle3'
|
||||
rm '/usr/local/bin/idle3.12'
|
||||
rm '/usr/local/bin/idle3.13'
|
||||
rm '/usr/local/bin/pip3.12'
|
||||
rm '/usr/local/bin/pip3.13'
|
||||
rm '/usr/local/bin/pydoc3'
|
||||
rm '/usr/local/bin/pydoc3.12'
|
||||
rm '/usr/local/bin/pydoc3.13'
|
||||
rm '/usr/local/bin/python3'
|
||||
rm '/usr/local/bin/python3.12'
|
||||
rm '/usr/local/bin/python3.13'
|
||||
rm '/usr/local/bin/python3-config'
|
||||
rm '/usr/local/bin/python3.12-config'
|
||||
rm '/usr/local/bin/python3.13-config'
|
||||
brew install python3
|
||||
|
||||
- name: Configure formula
|
||||
env:
|
||||
INPUT_RELEASE_VERSION: ${{ inputs.release_version }}
|
||||
|
|
@ -165,37 +144,6 @@ jobs:
|
|||
validate: true
|
||||
- run: echo "::remove-matcher owner=gcc-strip3::"
|
||||
|
||||
- name: Setup python
|
||||
id: python
|
||||
if: false
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Generate gcov report
|
||||
id: test_report
|
||||
# any except canceled or skipped
|
||||
# TODO: fix coverage, no .gcno files are being created
|
||||
# TODO: .gcno files are supposed to be created next to .o files
|
||||
if: false
|
||||
# if: >-
|
||||
# always() &&
|
||||
# matrix.release != true &&
|
||||
# (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
run: |
|
||||
cp -rf ${{ steps.test.outputs.buildpath }}/build/ ./build/
|
||||
cd build
|
||||
ls -Ra
|
||||
|
||||
${{ steps.python.outputs.python-path }} -m pip install gcovr
|
||||
${{ steps.python.outputs.python-path }} -m gcovr . -r ../src \
|
||||
--exclude-noncode-lines \
|
||||
--exclude-throw-branches \
|
||||
--exclude-unreachable-branches \
|
||||
--verbose \
|
||||
--xml-pretty \
|
||||
-o coverage.xml
|
||||
|
||||
- name: Upload coverage artifact
|
||||
if: >-
|
||||
always() &&
|
||||
|
|
@ -206,8 +154,8 @@ jobs:
|
|||
with:
|
||||
name: coverage-Homebrew-${{ matrix.os_name }}-${{ matrix.os_version }}
|
||||
path: |
|
||||
build/coverage.xml
|
||||
${{ steps.test.outputs.testpath }}/test_results.xml
|
||||
${{ steps.test.outputs.testpath }}/coverage.xml
|
||||
${{ steps.test.outputs.testpath }}/tests/test_results.xml
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Patch homebrew formula
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue