Update RoveComm submodule to the latest commit #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Valgrind Memory Check | |
on: | |
pull_request: | |
branches: ["development"] | |
push: | |
branches: ["development"] | |
workflow_dispatch: | |
concurrency: | |
group: "valgrind" | |
cancel-in-progress: false | |
jobs: | |
run-valgrind: | |
runs-on: ubuntu-latest | |
container: ghcr.io/missourimrdt/rovecomm-jammy:latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Update Branch | |
run: | | |
cd /opt/RoveComm_CPP/ | |
git fetch --force --recurse-submodules | |
branch=${{ steps.extract_branch.outputs.branch }} | |
echo $branch | |
git checkout $branch | |
git pull | |
git submodule update --recursive --init | |
- name: Build Executable | |
run: | | |
cd /opt/RoveComm_CPP/ | |
mkdir build | |
cd build | |
cmake .. | |
make | |
- name: Run Valgrind | |
run: | | |
chmod 777 /opt/RoveComm_CPP/tools/valgrind/run_valgrind.sh | |
/opt/RoveComm_CPP/tools/valgrind/run_valgrind.sh "GitHub-Action" | |
- name: Analyze Valgrind - Definitely Lost | |
if: success() || failure() | |
run: | | |
cd /opt/RoveComm_CPP/tools/valgrind | |
if ! grep 'definitely lost' valgrind.rpt; then exit 0; fi | |
if grep 'definitely lost: 0' valgrind.rpt; then exit 0; else exit 1; fi | |
- name: Analyze Valgrind - Indirectly Lost | |
if: success() || failure() | |
run: | | |
cd /opt/RoveComm_CPP/tools/valgrind | |
if ! grep 'indirectly lost' valgrind.rpt; then exit 0; fi | |
if grep 'indirectly lost: 0' valgrind.rpt; then exit 0; else exit 1; fi | |
- name: Analyze Valgrind - Possibly Lost | |
if: success() || failure() | |
run: | | |
cd /opt/RoveComm_CPP/tools/valgrind | |
if ! grep 'possibly lost' valgrind.rpt; then exit 0; fi | |
if grep 'possibly lost: 0' valgrind.rpt; then exit 0; else exit 0; fi | |
- name: Analyze Valgrind - Still Reachable | |
if: success() || failure() | |
run: | | |
cd /opt/RoveComm_CPP/tools/valgrind | |
if ! grep 'still reachable' valgrind.rpt; then exit 0; fi | |
if grep 'still reachable: 0' valgrind.rpt; then exit 0; else exit 0; fi | |
- name: Upload Valgrind Log | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: valgrind.rpt | |
path: /opt/RoveComm_CPP/tools/valgrind/valgrind.rpt | |
retention-days: 1 |