Skip to content

ci: update workflows #76

ci: update workflows

ci: update workflows #76

Workflow file for this run

name: compile_and_memcheck
on:
push:
paths:
- ".github/workflows/*"
- "Makefile"
- "src/**"
- "main.c"
pull_request:
branches:
- "main"
paths:
- ".github/workflows/*"
- "Makefile"
- "src/**"
- "main.c"
jobs:
build_executable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build primary executable
run: make
- name: Exercise install
run: sudo make install
- name: Exercise uninstall
run: sudo make uninstall
- name: Clean up primary build
run: make clean
- name: Build debug executable
run: make debug
- name: Clean up debug build
run: make debug_clean
run_valgrind:
needs: build_executable
runs-on: ubuntu-latest
env:
test_files_dir: test_dir
utils: .github/utils
steps:
- uses: actions/checkout@v3
- name: Update packages
run: sudo apt update
- name: Install dependencies
run: sudo apt-get -y install valgrind
- name: Create test files
run: sh "$utils"/init_files.sh "$test_files_dir" 10
- name: Build debug executable
run: make debug
- name: Execute Valgrind
run: valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all -s ./debug_mmv "$test_files_dir"/test*