Skip to content

analysis

analysis #9

Workflow file for this run

# ns-3 CI/CD script with job for code analysis
#
# Contains jobs to run code analysis tasks.
name: "Run code analysis"
run-name: "analysis"
on:
push:
workflow_call:
workflow_dispatch:
env:
COMPILER: g++
MODE: default
jobs:
# CodeCov
code-cov:
runs-on: ubuntu-latest
steps:
# The following step is required in all jobs that use this repo's actions
- name: "Retrieve actions from repository"
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions
- name: "Install required system packages"
run: >
sudo apt update && DEBIAN_FRONTEND=noninteractive sudo apt install -y
apt-utils
git gcc g++ cmake python3 make ninja-build
tcpdump libgsl-dev libxml2-dev
curl unzip tar
ccache
lcov
wget
- name: "Checkout this repository as ns-3 module"
uses: ./.github/actions/checkout-in-ns3
- name: "Build ns-3"
env:
BUILD_ID: ubuntu-coverage
COMPILER: g++
MODE: default
EXTRA_OPTIONS: --disable-werror --enable-gcov
uses: ./.github/actions/build
with:
store-artifacts: "false"
- name: "Extract ccache statistics"
run: echo "CACHE_MISSES=`./utils/ccache-miss-rate.py`" >> $GITHUB_ENV
- name: "Generate coverage data"
# if: env.CACHE_MISSES != '0'
run: ./ns3 build coverage_gcc
- name: "Submit to codecov.io"
# if: env.CACHE_MISSES != '0'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./build/coverage/ns3.info
disable_search: true
root_dir: format('{0}/src/lorawan', env.GITHUB_WORKSPACE)