Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
johnynek committed Nov 22, 2024
2 parents 50f0cf7 + 6fd5607 commit ed95b92
Show file tree
Hide file tree
Showing 46 changed files with 3,176 additions and 986 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,29 @@ jobs:
- '8'
testC:
runs-on: ubuntu-latest
strategy:
matrix:
scala:
- '2.13.15'
java:
- '8'
steps:
- uses: "actions/[email protected]"
- name: "test runtime code"
run: |
cd c_runtime
make && git diff --quiet
./test
cd ..
- name: "build assembly"
run: "sbt \"++${{matrix.scala}}; cli/assembly\""
- name: "generate c code"
run: "./bosatsuj transpile --input_dir test_workspace/ --package_root test_workspace/ --lang c --outdir c_out"
- name: "compile generated c code"
run: |
cp c_runtime/* c_out
cd c_out
gcc -c output.c
timeout-minutes: 30
name: ci
on:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ node_modules/
.bloop
project/metals.sbt
project/project/*
jsui/bosatsu_ui.js
jsui/bosatsu_ui.js

c_runtime/*.o
8 changes: 6 additions & 2 deletions c_runtime/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: bosatsu_runtime.o
all: bosatsu_runtime.o test

bosatsu_generated.h: typegen.py
python3 typegen.py impls > bosatsu_generated.h
Expand All @@ -7,4 +7,8 @@ bosatsu_decls_generated.h: typegen.py
python3 typegen.py headers > bosatsu_decls_generated.h

bosatsu_runtime.o: bosatsu_runtime.h bosatsu_runtime.c bosatsu_decls_generated.h bosatsu_generated.h
gcc -c bosatsu_runtime.c
gcc -c bosatsu_runtime.c

# this will eventually have test code for the runtime and predef
test: test.c
gcc -O3 -o test test.c
Loading

0 comments on commit ed95b92

Please sign in to comment.