Remove C Code #20
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: Linux Compiler CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
run-linux-python3: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Compile | |
run: | | |
# For some reason, if we change to the compiler directory, Python complains. | |
export PYTHONPATH="${PYTHONPATH}:/home/runner/work/lolc/lolc/src/" | |
for x in fibonacci helloworld math_ops nested_if sum_three | |
do | |
python src/compiler/lol.py -i examples/$x.lol -o results | |
gcc results/$x-*.c | |
./a.out | |
done |