Skip to content

Remove swank dependency #603

Remove swank dependency

Remove swank dependency #603

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'
dos2unix '${{ github.workspace }}\patches\win32-dll-build.patch'
if [ "clang" = "${{ matrix.cc }}" ]; then git apply --verbose '${{ github.workspace }}\patches\win32-clang-build.patch'; fi
git apply --verbose '${{ github.workspace }}\patches\win32-dll-build.patch'
CC=${{ matrix.cc }} ./make.sh --xc-host='sbcl --lose-on-corruption --disable-ldb --disable-debugger'
CC=${{ matrix.cc }} ./make-shared-library.sh
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 }}//"
MSYS_PATH_TYPE: inherit
shell: pwsh
run: |
$env:MINGW64_PATH="D:\a\_temp\msys64\mingw64\bin"
$env:PATH="$env:PATH;$env:LIBSBCL_PATH;$env:MINGW64_PATH"
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"
if ((echo '(+ 1 2)' | .\example.exe) -match "3") { exit 0 } else { exit 1 }
if ((echo '(+ 1 2)' | python example.py) -match "3") { exit 0 } else { exit 1 }
if ((python exhaust_heap.py) -match "attempt 1") { exit 0 } else { exit 1 }