-
Notifications
You must be signed in to change notification settings - Fork 16
51 lines (46 loc) · 1.81 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
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 -L${{ github.workspace }}/examples/libcalc
sudo mv libcalc.so /usr/lib
sudo cp libcalc.core /usr/lib
echo "(+ 1 2)" | ./example
python --version
echo "(+ 1 2)" | python ./example.py
python ./exhaust_heap.py