Skip to content

Commit

Permalink
Quickload libcalc
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-s committed Sep 24, 2024
1 parent 209e4c1 commit 5245e3b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
LD_LIBRARY_PATH: ${{ github.workspace }}/../sbcl/src/runtime:/usr/local/lib
CL_SOURCE_REGISTRY: "${{ github.workspace }}//"
run: |
$SBCL_SRC/run-sbcl.sh --script script.lisp
$SBCL_SRC/run-sbcl.sh --load script.lisp --quit
gcc -Wall -fPIC -shared -o libcalc.so libcalc.c -lsbcl
gcc -Wall -o example example.c -lcalc -lsbcl
sudo mv libcalc.so /usr/local/lib
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
DYLD_LIBRARY_PATH: ${{ github.workspace }}/../sbcl/src/runtime:.
CL_SOURCE_REGISTRY: "${{ github.workspace }}//"
run: |
$SBCL_SRC/run-sbcl.sh --script script.lisp
$SBCL_SRC/run-sbcl.sh --load script.lisp --quit
gcc -Wall -fPIC -shared -o libcalc.dylib libcalc.c -lsbcl
gcc -Wall -o example example.c -lcalc -lsbcl
echo "(+ 1 2)" | ./example | tr -d '\n' | grep "> 3> "
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
CL_SOURCE_REGISTRY: "${{ github.workspace }}//"
MSYS2_PATH_TYPE: inherit
run: |
$SBCL_SRC/run-sbcl.sh --script script.lisp
$SBCL_SRC/run-sbcl.sh --load script.lisp --quit
${{ matrix.cc }} -Wall -fPIC -shared -Wl,--export-all-symbols -o libcalc.dll libcalc.c -Wl,--whole-archive $SBCL_SRC/src/runtime/libsbcl.a -Wl,--no-whole-archive -ladvapi32 -lsynchronization -lws2_32 -lzstd
${{ matrix.cc }} -Wall -o example example.c -lcalc -L.
mv libcalc.dll $MSYSTEM_PREFIX/bin
Expand Down
2 changes: 1 addition & 1 deletion examples/libcalc/script.lisp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(require '#:asdf)

(asdf:load-system '#:libcalc)
(ql:quickload '#:libcalc)

(when (uiop:getenv "CI")
(push :github-ci *features*))
Expand Down

0 comments on commit 5245e3b

Please sign in to comment.