Skip to content

Add coverage report #38

Add coverage report

Add coverage report #38

Workflow file for this run

on: push
name: Macgonuts CI
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Install basic tools
shell: bash
run: |
sudo apt-get install git
sudo apt-get install gcc-9
sudo apt-get update
sudo apt-get install perl
sudo apt-get install lcov
- name: Install Hefesto
shell: bash
run: |
git clone https://github.com/rafael-santiago/hefesto --recursive
cd hefesto/src
printf "\n" > blau.txt
sudo ./build.sh < blau.txt
echo "HEFESTO_INCLUDES_HOME=/usr/local/share/hefesto/include" >> "$GITHUB_ENV"
echo "HEFESTO_MODULES_HOME=/usr/local/share/hefesto/module" >> "$GITHUB_ENV"
sudo chown -R runner /usr/local/share/hefesto
cd ../..
rm -rf hefesto
- name: Install lcov-generator
shell: bash
run: |
git clone https://github.com/rafael-santiago/helios
cd helios
sudo -E hefesto --install=lcov-generator
sudo chown -R runner /usr/local/share/hefesto
cd ../
rm -rf helios
- name: Clone project repo
uses: actions/checkout@v3
with:
submodules: true
- name: Invoke Hefesto
shell: bash
run: |
cd src
sudo -E hefesto --coverage
- name: Tar coverage report
shell: bash
run: |
sudo tar -cvf /home/libmacgonuts-coverage.tar src/reports/macgonuts-static-lib
sudo chown runner /home/libmacgonuts-coverage.tar
- name: Upload LCOV results
uses: actions/upload-artifact@v2
with:
name: libmacgonuts-coverage-report
path: /home/libmacgonuts-coverage.tar
retention-days: 7