Skip to content

Add C17 and C23 builds with comprehensive benchmarking #18

Add C17 and C23 builds with comprehensive benchmarking

Add C17 and C23 builds with comprehensive benchmarking #18

Workflow file for this run

name: Build & Tests
on:
push:
branches: [ main, zig-port ]
pull_request:
branches: [ main, zig-port ]
jobs:
c-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check GCC version
run: gcc --version
- name: Build C versions (C17 and C23)
run: cd c && make clean && make
- name: Test C17 executable runs
run: cd c && echo -e "hi\npython\nexit" | timeout 5 ./chat-c17 || true
- name: Test C23 executable runs
run: cd c && echo -e "hi\npython\nexit" | timeout 5 ./chat-c23 || true
- name: Compare binary sizes
run: |
echo "Binary sizes:"
ls -lh c/chat-c17 c/chat-c23
zig-build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.15.2
- name: Build Zig chatbot
run: cd zig && zig build
- name: Run Zig tests
run: cd zig && zig build test
- name: Test Zig executable runs
run: cd zig && echo -e "hi\npython\nexit" | timeout 5 ./zig-out/bin/chat || true
- name: Show binary size
run: ls -lh zig/zig-out/bin/chat