Skip to content

FASL Libraries

FASL Libraries #94

Workflow file for this run

name: windows
on: [push, pull_request]
jobs:
test:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: 'sbcl/sbcl'
ref: 'sbcl-2.4.0'
path: sbcl
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: mingw-w64-ucrt-x86_64-toolchain make diffutils git cmake mingw-w64-ucrt-x86_64-lapack libffi
- name: install host sbcl
shell: pwsh
working-directory: sbcl
run: |
choco install sbcl -source tools-for-build
- name: build sbcl and libsbcl
env:
SBCL_HOME: "/c/Program Files/Steel Bank Common Lisp/1.4.14"
working-directory: sbcl
run: |
PATH=$PATH:"/c/Program Files/Steel Bank Common Lisp/1.4.14"
export PATH
./make.sh --xc-host='sbcl --lose-on-corruption --disable-ldb --disable-debugger'
./make-shared-library.sh
mv src/runtime/libsbcl.so src/runtime/libsbcl.dll
- name: install quicklisp
run: |
curl -O https://beta.quicklisp.org/quicklisp.lisp
sbcl/run-sbcl.sh --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))" --eval "(quit)"
- uses: actions/checkout@v4
with:
repository: 'quil-lang/quilc'
submodules: recursive
path: quilc
- uses: actions/checkout@v4
with:
repository: 'quil-lang/qvm'
path: qvm
- uses: actions/checkout@v4
with:
repository: 'quil-lang/magicl'
path: magicl
- name: build example
working-directory: examples/smart-libraries
env:
LIBRARY_PATH: ${{ github.workspace }}/sbcl/src/runtime
run: |
mkdir build
../../sbcl/run-sbcl.sh --dynamic-space-size 8192 --load generate-libbase.lisp
../../sbcl/run-sbcl.sh --dynamic-space-size 8192 --load generate-libs.lisp
pushd build/libbase
gcc -fPIC -shared -Wall -o libbase.dll libbase.c -lsbcl
cp libbase.h $MSYSTEM_PREFIX/include
cp libbase.dll $MSYSTEM_PREFIX/lib
ls
popd
pushd build/libminiquilc
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=$MSYSTEM_PREFIX -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX ..
make
make install
ls
popd
pushd build/libminiqvm
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=$MSYSTEM_PREFIX -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX ..
make
make install
ls
popd
gcc -Wall -o run_2q_quil_program run_2q_quil_program.c -lbase -lminiquilc -lminiqvm
ls