Skip to content

fix(array): memory leaks in ExpressionList #107

fix(array): memory leaks in ExpressionList

fix(array): memory leaks in ExpressionList #107

Workflow file for this run

name: Brainrot CI
on:
workflow_dispatch:
push:
branches: ["main"]
paths-ignore:
- "**/*.md"
- "CODEOWNERS"
- "Makefile"
pull_request:
branches: ["main"]
paths-ignore:
- "**/*.md"
- "CODEOWNERS"
- "Makefile"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install gcc flex bison libfl-dev -y
- name: Build Brainrot
run: |
bison -d -Wcounterexamples lang.y -o lang.tab.c
flex lang.l
gcc -o brainrot lang.tab.c lex.yy.c ast.c -lfl -lm
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: brainrot
path: brainrot
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Brainrot artifact
uses: actions/download-artifact@v4
with:
name: brainrot
- name: Grant execute permissions to Brainrot
run: chmod +x brainrot
- name: Install Python and dependencies
run: |
sudo apt-get update
sudo apt-get install python3 python3-pip -y
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
working-directory: tests
- name: Run Pytest
run: |
source .venv/bin/activate
pytest -v test_brainrot.py
working-directory: tests