Skip to content

Commit

Permalink
Add Linux workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-s committed May 12, 2024
1 parent e7d0d0d commit 26f6d6f
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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.4.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
env:
SBCL_MAKE_TARGET_2_OPTIONS: --disable-ldb --disable-debugger
run: |
./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
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
echo "(+ 1 2)" | ./example

0 comments on commit 26f6d6f

Please sign in to comment.