Skip to content

Commit

Permalink
Fixed dependencies and removed Codecov
Browse files Browse the repository at this point in the history
* Fix Pinned Dependencies
* Coverage as artifact
  • Loading branch information
berndgassmann authored Feb 13, 2024
1 parent 98991d6 commit 110fb84
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
interval: weekly
- package-ecosystem: pip
directory: /.github/
schedule:
interval: daily
interval: weekly
16 changes: 9 additions & 7 deletions .github/workflows/check_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,8 @@ jobs:

- name: Install Dependencies
run: |
export BUILD_DOCU=true
bash .github/workflows/install_dependencies.sh
sudo apt-get install doxygen graphviz lcov
sudo pip3 install --upgrade six>=1.11.0
sudo pip3 install Markdown==3.2.1
sudo pip3 install mkdocs
sudo pip3 install markdown-include
sudo pip3 install pymdown-extensions==8.0.1
sudo pip3 install pygments mdx_truly_sane_lists
- name: Build Documentation and Test
run: |
Expand All @@ -49,6 +43,14 @@ jobs:
run: |
bash .github/workflows/code_coverage.sh
- name: Upload coverage as artifact
uses: actions/upload-artifact@v4
with:
name: coverage_report
path: ./coverage
if-no-files-found: error
overwrite: true

- name: Documentation Deployment (Test)
run: |
mkdocs build
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/code_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ get_coverage() {
BUILD_DIR=$1
SRC_DIR=$2
PACKAGE_NAME=$3
lcov -q -i -c -d ${BUILD_DIR} -b ${SRC_DIR} --no-external -o initialCoverage.info
lcov -q -c -d ${BUILD_DIR} -b ${SRC_DIR} --no-external -o testCoverage.info --rc lcov_branch_coverage=1
lcov -q -a initialCoverage.info -a testCoverage.info -o coverage.info --rc lcov_branch_coverage=1
lcov -q -r coverage.info "impl/test*" -o coverage.info --rc lcov_branch_coverage=1
grep -v -E 'D0Ev|D1Ev|C1Ev|C1Eb' coverage.info > cleanedCoverage.info
lcov --summary cleanedCoverage.info --rc lcov_branch_coverage=1
genhtml -t ${PACKAGE_NAME} -p ${PWD}/${SRC_DIR} --branch-coverage -o coverage/${SRC_DIR} cleanedCoverage.info
bash <(curl -s https://codecov.io/bash) -f cleanedCoverage.info || echo "Codecov did not collect coverage reports"
lcov -q -i -c -d ${BUILD_DIR} -b ${SRC_DIR} --no-external -o initialCoverage_${PACKAGE_NAME}.info
lcov -q -c -d ${BUILD_DIR} -b ${SRC_DIR} --no-external -o testCoverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
lcov -q -a initialCoverage_${PACKAGE_NAME}.info -a testCoverage_${PACKAGE_NAME}.info -o coverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
lcov -q -r coverage_${PACKAGE_NAME}.info "impl/test*" -o coverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
grep -v -E 'D0Ev|D1Ev|C1Ev|C1Eb' coverage_${PACKAGE_NAME}.info > cleanedCoverage_${PACKAGE_NAME}.info
lcov --summary cleanedCoverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
genhtml -t ${PACKAGE_NAME} -p ${PWD}/${SRC_DIR} --branch-coverage -o coverage/${SRC_DIR} cleanedCoverage_${PACKAGE_NAME}.info
}

get_coverage build/ad_rss ad_rss ad_rss
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if (( IS_UBUNTU_20_04 && IS_PYTHON_3_10 )); then
BOOST_VERSION=1.78.0
BOOST_PACKAGE_BASENAME=boost_${BOOST_VERSION//./_}
wget "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/${BOOST_PACKAGE_BASENAME}.tar.gz"

tar -xzf ${BOOST_PACKAGE_BASENAME}.tar.gz
pushd ${BOOST_PACKAGE_BASENAME}

Expand All @@ -73,7 +73,7 @@ if (( IS_UBUNTU_20_04 && IS_PYTHON_3_10 )); then
echo "!!!!!!! boost bootstrap failed !!!!!!!"
cat bootstrap.log
fi

./b2 --prefix="/usr" cxxflags="-fPIC" -j 10 stage release
sudo ./b2 --prefix="/usr" cxxflags="-fPIC" -j 10 install

Expand All @@ -84,3 +84,14 @@ if (( IS_UBUNTU_20_04 && IS_PYTHON_3_10 )); then
popd

fi


if [[ "${BUILD_DOCU}x" != "x" ]]; then
sudo apt-get install doxygen graphviz lcov
sudo pip3 install --upgrade six>=1.11.0
sudo pip3 install Markdown==3.2.1
sudo pip3 install mkdocs
sudo pip3 install markdown-include
sudo pip3 install pymdown-extensions==8.0.1
sudo pip3 install pygments mdx_truly_sane_lists
fi

0 comments on commit 110fb84

Please sign in to comment.