Skip to content

Commit d200afe

Browse files
authored
Merge branch 'master' into master
2 parents 188b8f4 + d463259 commit d200afe

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,46 @@ jobs:
4242
install: base-devel mingw-w64-${{matrix.env}}-toolchain
4343
- run: make
4444
- run: make test
45-
code-coverage:
45+
code-coverage-old:
4646
runs-on: ubuntu-latest
4747
steps:
4848
- uses: actions/checkout@v4
4949
- name: Setup LCOV
5050
uses: hrishikesh-kadam/setup-lcov@v1
5151
- name: Build and Run tests
5252
run: make coverage -j
53+
# - name: Upload coverage to Codecov
54+
# uses: codecov/codecov-action@v5
55+
# with:
56+
# files: ./cov-html/libopenlibm.info
57+
# token: ${{ secrets.CODECOV_TOKEN }}
58+
- uses: actions/upload-artifact@v4
59+
with:
60+
name: code-coverage-report-old
61+
path: ./cov-html/
62+
code-coverage:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Checkout Openlibm
66+
uses: actions/checkout@v4
67+
- name: Checkout Openlibm-test
68+
uses: actions/checkout@v4
69+
with:
70+
repository: 'JuliaMath/openlibm-test'
71+
path: 'openlibm-test'
72+
- name: Setup LCOV
73+
uses: hrishikesh-kadam/setup-lcov@v1
74+
- name: Build Openlibm
75+
run: make -j`nproc` CODE_COVERAGE=1
76+
- name: Run Test
77+
run: |
78+
make -j`nproc` -C openlibm-test \
79+
USE_OPENLIBM=1 OPENLIBM_HOME="$(pwd)" \
80+
SKIP_FP_EXCEPT_TEST=1 \
81+
- name: Show Test Result
82+
run: cat openlibm-test/src/REPORT
83+
- name: Gen Coverage Report
84+
run: make gen-cov-report
5385
- name: Upload coverage to Codecov
5486
uses: codecov/codecov-action@v5
5587
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*.pc
88

99
# code coverage
10+
openlibm-test
1011
cov-html/
1112
*.gcda
1213
*.gcno

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ COVERAGE_DIR:=cov-html
8484
COVERAGE_FILE:=$(COVERAGE_DIR)/libopenlibm.info
8585
# Gen cov report with: make clean && make coverage -j
8686
coverage: clean-coverage
87-
mkdir $(COVERAGE_DIR)
8887
$(MAKE) test CODE_COVERAGE=1
88+
$(MAKE) gen-cov-report
89+
90+
gen-cov-report:
91+
-mkdir $(COVERAGE_DIR)
8992
lcov -d amd64 -d bsdsrc -d ld80 -d src \
9093
--rc lcov_branch_coverage=1 --capture --output-file $(COVERAGE_FILE)
9194
genhtml --legend --branch-coverage \

0 commit comments

Comments
 (0)