Skip to content

Add DLL dir

Add DLL dir #520

Workflow file for this run

name: Windows
on: [push]
jobs:
build:
runs-on: windows-latest
timeout-minutes: 60
strategy:
matrix:
cc: [gcc, clang]
fail-fast: false
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1
with:
repository: sbcl/sbcl
ref: sbcl-2.4.6
path: sbcl
- uses: msys2/setup-msys2@v2
with:
path-type: minimal
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-cmake make diffutils git dos2unix
- uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge
- name: install host sbcl
shell: pwsh
working-directory: ../sbcl
run: |
choco install sbcl -source tools-for-build
- name: build sbcl
working-directory: ../sbcl
env:
SBCL_HOME: "/c/Program Files/Steel Bank Common Lisp/1.4.14"
run: |
PATH=$PATH:"/c/Program Files/Steel Bank Common Lisp/1.4.14"
export PATH
dos2unix '${{ github.workspace }}\patches\win32-clang-build.patch'
if [ "clang" = "${{ matrix.cc }}" ]; then git apply --verbose '${{ github.workspace }}\patches\win32-clang-build.patch'; fi
CC=${{ matrix.cc }} ./make.sh --xc-host='sbcl --lose-on-corruption --disable-ldb --disable-debugger'
CC=${{ matrix.cc }} ./make-shared-library.sh
mv src/runtime/libsbcl.so src/runtime/libsbcl.dll
echo "SBCL_SRC=${{ github.workspace }}/../sbcl" >> "$GITHUB_ENV"
echo "LIBSBCL_PATH=${{ github.workspace }}/../sbcl/src/runtime" >> "$GITHUB_ENV"
- 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 install conda package
env:
LIBRARY_PATH: ${{ github.workspace }}/../sbcl/src/runtime
MSYS2_CMD: D:\a\_temp\setup-msys2\msys2.CMD
shell: pwsh
run: |
conda install conda-build
conda build recipe --output-folder conda-bld
conda install -c ${{ github.workspace }}/conda-bld/ sbcl-librarian
- name: set environment variables
shell: pwsh
run: |
echo "LIBRARY_PATH=$env:LIBSBCL_PATH:$env:CONDA_PREFIX/lib" >> "$env:GITHUB_ENV"
echo "LD_LIBRARY_PATH=$env:LIBSBCL_PATH:$env:CONDA_PREFIX/lib" >> "$env:GITHUB_ENV"
echo "C_INCLUDE_PATH=$env:CONDA_PREFIX/include" >> "$env:GITHUB_ENV"
- name: build and run example
working-directory: examples/libcalc
env:
CL_SOURCE_REGISTRY: "${{ github.workspace }}//"
shell: pwsh
run: |
D:\a\_temp\setup-msys2\msys2.CMD -c '$SBCL_SRC/run-sbcl.sh --load script.lisp --quit'
pushd libcalc
mkdir build
pushd build
D:\a\_temp\setup-msys2\msys2.CMD -c 'cmake -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -G ''MSYS Makefiles'' ..'
D:\a\_temp\setup-msys2\msys2.CMD -c "cmake --build ."
D:\a\_temp\setup-msys2\msys2.CMD -c "cmake --install ."
popd
popd
D:\a\_temp\setup-msys2\msys2.CMD -c "gcc -Wall -o example example.c -lcalc -lsbcl_librarian"
D:\a\_temp\setup-msys2\msys2.CMD -c 'echo "(+ 1 2)" | ./example | tr -d ''\n'' | grep "> 3> "'
D:\a\_temp\setup-msys2\msys2.CMD -c 'echo "(+ 1 2)" | $CONDA_PREFIX/python ./example.py | tr -d ''\n'' | grep "> 3> "'
D:\a\_temp\setup-msys2\msys2.CMD -c '$CONDA_PREFIX/python ./exhaust_heap.py | grep "returned to Python after heap exhaustion (attempt 1)"'