Skip to content

ci: test with openlibm-test #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,46 @@ jobs:
install: base-devel mingw-w64-${{matrix.env}}-toolchain
- run: make
- run: make test
code-coverage:
code-coverage-old:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- name: Build and Run tests
run: make coverage -j
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v5
# with:
# files: ./cov-html/libopenlibm.info
# token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: code-coverage-report-old
path: ./cov-html/
code-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout Openlibm
uses: actions/checkout@v4
- name: Checkout Openlibm-test
uses: actions/checkout@v4
with:
repository: 'JuliaMath/openlibm-test'
path: 'openlibm-test'
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- name: Build Openlibm
run: make -j`nproc` CODE_COVERAGE=1
- name: Run Test
run: |
make -j`nproc` -C openlibm-test \
USE_OPENLIBM=1 OPENLIBM_HOME="$(pwd)" \
SKIP_FP_EXCEPT_TEST=1 \
- name: Show Test Result
run: cat openlibm-test/src/REPORT
- name: Gen Coverage Report
run: make gen-cov-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.pc

# code coverage
openlibm-test
cov-html/
*.gcda
*.gcno
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ COVERAGE_DIR:=cov-html
COVERAGE_FILE:=$(COVERAGE_DIR)/libopenlibm.info
# Gen cov report with: make clean && make coverage -j
coverage: clean-coverage
mkdir $(COVERAGE_DIR)
$(MAKE) test CODE_COVERAGE=1
$(MAKE) gen-cov-report

gen-cov-report:
-mkdir $(COVERAGE_DIR)
lcov -d amd64 -d bsdsrc -d ld80 -d src \
--rc lcov_branch_coverage=1 --capture --output-file $(COVERAGE_FILE)
genhtml --legend --branch-coverage \
Expand Down