feat: enable memcheck in workflow #8
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: C CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt install software-properties-common -y | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
sudo apt-get update -y | |
sudo apt-get install -y gcc-13 valgrind | |
- name: Set up gcc-13 | |
run: | | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 90 | |
- name: Check versions | |
run: | | |
gcc --version | |
make --version | |
- name: make build | |
run: make build | |
- name: make test | |
run: make test | |
- name: make memcheck | |
run: make memcheck | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt install software-properties-common -y | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
sudo apt-get update -y | |
sudo apt-get install -y gcc-13 valgrind | |
- name: Set up gcc-13 | |
run: | | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 90 | |
- name: Check versions | |
run: | | |
gcc --version | |
make --version | |
- name: make build | |
run: make build | |