Try add_dll_directory #72
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 | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/checkout@v1 | |
with: | |
repository: sbcl/sbcl | |
ref: sbcl-2.2.4 | |
path: sbcl | |
- name: install host sbcl | |
run: | | |
sudo apt-get -qq update | true | |
sudo apt-get -qq install sbcl libcapstone-dev | |
- name: build sbcl | |
working-directory: ../sbcl | |
env: | |
SBCL_MAKE_TARGET_2_OPTIONS: --disable-ldb --disable-debugger | |
run: | | |
git apply ../sbcl-librarian/.github/workflows/non-static-lossage-handler.patch | |
./make.sh --xc-host='sbcl --dynamic-space-size 700MB --lose-on-corruption --disable-ldb --disable-debugger' | |
./make-shared-library.sh | |
- name: install quicklisp | |
working-directory: ../sbcl | |
run: | | |
curl -O https://beta.quicklisp.org/quicklisp.lisp | |
./run-sbcl.sh --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))" --eval "(quit)" | |
- name: build and run example | |
working-directory: examples/libcalc | |
env: | |
SBCL_SRC: ${{ github.workspace }}/../sbcl | |
LIBRARY_PATH: ${{ github.workspace }}/../sbcl/src/runtime:${{ github.workspace }}/examples/libcalc | |
LD_LIBRARY_PATH: ${{ github.workspace }}/../sbcl/src/runtime:${{ github.workspace }}/examples/libcalc | |
CL_SOURCE_REGISTRY: "${{ github.workspace }}//" | |
run: | | |
$SBCL_SRC/run-sbcl.sh --script script.lisp | |
gcc -Wall -fPIC -shared -o libcalc.so libcalc.c -lsbcl | |
gcc -Wall -o example example.c -lcalc -lsbcl | |
echo "(+ 1 2)" | ./example | |
python --version | |
echo "(+ 1 2)" | python ./example.py | |
python ./exhaust_heap.py | |