Skip to content

[#258] Move tzdata Preconfig to env #9

[#258] Move tzdata Preconfig to env

[#258] Move tzdata Preconfig to env #9

name: CryptoLib Coverage
on:
push:
branches:
- 258-cyclomatic-complexity-and-mcdc-in-ci
pull_request:
branches:
- 258-cyclomatic-complexity-and-mcdc-in-ci
jobs:
coverage:
runs-on: ubuntu-latest
container:
image: ivvitc/cryptolib:20240814
steps:
- uses: actions/checkout@v4
- name: Update
run: apt-get update
- name: Install Dependencies
env:
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
run: |
apt-get install -y lcov libcurl4-openssl-dev libmariadb-dev libmariadb-dev-compat python3 gcovr
- name: Install Python Libraries
run: pip install pycryptodome
- name: Install Libgcrypt
run: >
curl
-LS https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.50.tar.bz2
-o /tmp/libgpg-error-1.50.tar.bz2
&& tar -xjf /tmp/libgpg-error-1.50.tar.bz2 -C /tmp/
&& cd /tmp/libgpg-error-1.50
&& ./configure
&& make install
&& curl
-LS https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.11.0.tar.bz2
-o /tmp/libgcrypt-1.11.0.tar.bz2
&& tar -xjf /tmp/libgcrypt-1.11.0.tar.bz2 -C /tmp/
&& cd /tmp/libgcrypt-1.11.0
&& ./configure
&& make install
&& ldconfig
# End Container Setup
- name: Internal Build Script
working-directory: ${{github.workspace}}
run: |
# export CFLAGS="-fprofile-arcs -ftest-coverage -g"
bash ${GITHUB_WORKSPACE}/support/scripts/build_internal.sh
# Step 5: Generate Coverage Report
- name: Generate Coverage Report
run: |
mkdir -p coverage
gcovr --branches --html --html-details -o coverage/coverage_report.html
gcovr --branches --xml -o coverage/coverage_report.xml
# Step 6: Upload Coverage Report as an Artifact
- name: Upload Coverage Report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage
# # Step 7: Upload Coverage to GitHub Pages (Optional)
# - name: Deploy to GitHub Pages
# if: ${{ github.event_name == 'push' }}
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: coverage