Skip to content

Add CI with GitHub Actions #2

Add CI with GitHub Actions

Add CI with GitHub Actions #2

Workflow file for this run

name: Brainrot CI
on:
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 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 -o lang.lex.c lang.l
gcc -o brainrot lang.tab.c lang.lex.c -lfl
- name: Run Brainrot examples
run: |
./brainrot < examples/fizz_buzz.brainrot
./brainrot < examples/for_loop.brainrot
./brainrot < examples/hello_world.brainrot
./brainrot < examples/output_error.brainrot
./brainrot < examples/switch_case.brainrot