Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
B-ASIC - Better ASIC Toolbox
Commits
4283aed8
Commit
4283aed8
authored
2 years ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Add code coverage to PRs
parent
5d38abf4
No related branches found
No related tags found
1 merge request
!91
Add code coverage to PRs
Pipeline
#87809
passed
2 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+18
-4
18 additions, 4 deletions
.gitlab-ci.yml
CMakeLists.txt
+2
-2
2 additions, 2 deletions
CMakeLists.txt
b_asic/__init__.py
+1
-1
1 addition, 1 deletion
b_asic/__init__.py
with
21 additions
and
7 deletions
.gitlab-ci.yml
+
18
−
4
View file @
4283aed8
...
...
@@ -4,23 +4,31 @@ stages:
before_script
:
-
apt-get update --yes
-
apt-get install --yes build-essential cmake libfmt-dev pybind11-dev graphviz python3-pyqt5 xvfb xdg-utils
-
apt-get install --yes build-essential cmake libfmt-dev pybind11-dev graphviz python3-pyqt5 xvfb xdg-utils
lcov
-
python -m pip install --upgrade pip
-
python --version
-
pip install pytest pytest-cov sphinx furo numpydoc pytest-xvfb pytest-qt setuptools_scm sphinx-qt-documentation pytest-xdist
-
pip install .
# - export CXXFLAGS='--coverage'
-
pip install -ve .
# Move file, but should be handled by installation
-
mv _b_asic* b_asic
-
pip show b_asic
.run-test
:
stage
:
test
script
:
-
pytest --cov=b_asic --cov-report xml:cov.xml --cov-report term test
-
sphinx-build -b html docs_sphinx public
-
pytest --cov=b_asic --cov-report=xml:cov.xml --cov-report=term --color=yes test
# - lcov --capture --directory . --output-file coverage.info
# - lcov --output-file coverage.info --extract coverage.info $PWD/src/'*' $PWD/b_asic/'*'
# - lcov --list coverage.info
# - find . -name '*.gc*' -delete
artifacts
:
reports
:
coverage_report
:
coverage_format
:
cobertura
path
:
cov.xml
coverage
:
/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/
run-test-3.8
:
image
:
python:3.8
...
...
@@ -34,6 +42,12 @@ run-test-3.10:
image
:
python:3.10
extends
:
"
.run-test"
run-doc-test
:
image
:
python:3.10
stage
:
test
script
:
-
sphinx-build -b html docs_sphinx public
#run-test-3.11:
# image: python:3.11
# extends: ".run-test"
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
2
−
2
View file @
4283aed8
...
...
@@ -93,7 +93,7 @@ endif()
# Copy binaries to project folder for debugging during development.
if
(
NOT ASIC_BUILDING_PYTHON_DISTRIBUTION
)
add_custom_target
(
copy_binaries ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy
"$<TARGET_FILE:
${
TARGET_NAME
}
>"
"
${
CMAKE_CURRENT_LIST_DIR
}
"
COMMENT
"Copying binaries to
${
CMAKE_CURRENT_LIST_DIR
}
"
COMMAND
${
CMAKE_COMMAND
}
-E copy
"$<TARGET_FILE:
${
TARGET_NAME
}
>"
"
${
CMAKE_CURRENT_LIST_DIR
}
/
${
LIBRARY_NAME
}
"
COMMENT
"Copying binaries to
${
CMAKE_CURRENT_LIST_DIR
}
/
${
LIBRARY_NAME
}
"
DEPENDS
"
${
TARGET_NAME
}
"
)
endif
()
This diff is collapsed.
Click to expand it.
b_asic/__init__.py
+
1
−
1
View file @
4283aed8
...
...
@@ -5,7 +5,7 @@ ASIC toolbox that simplifies circuit design and optimization.
# NOTE: If this import gives an error,
# make sure the C++ module has been compiled and installed properly.
# See the included README.md for more information on how to build/install.
from
_b_asic
import
*
from
b_asic.
_b_asic
import
*
# Python modules.
from
b_asic.core_operations
import
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment