Try installing conda via choco #470
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-clang mingw-w64-x86_64-lld make diffutils git python3 dos2unix | |
- name: debug | |
run: | | |
ls D:/Miniconda | |
- name: install conda + host sbcl | |
shell: pwsh | |
working-directory: ../sbcl | |
run: | | |
choco install sbcl -source tools-for-build | |
choco install miniconda3 | |
- 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' --with-sb-linkable-runtime | |
- 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 | |
LD_LIBRARY_PATH: ${{ github.workspace }}/../sbcl/src/runtime | |
run: | | |
conda build recipe --output-folder conda-bld | |
conda install -c ${{ github.workspace }}/conda-bld/ sbcl-librarian | |
- name: set environment variables | |
run: | | |
echo "LIBRARY_PATH=$LIBSBCL_PATH:$CONDA_PREFIX/lib" >> "$GITHUB_ENV" | |
echo "LD_LIBRARY_PATH=$LIBSBCL_PATH:$CONDA_PREFIX/lib" >> "$GITHUB_ENV" | |
echo "C_INCLUDE_PATH=$CONDA_PREFIX/include" >> "$GITHUB_ENV" | |
- name: build and run example | |
working-directory: examples/libcalc | |
env: | |
CL_SOURCE_REGISTRY: "${{ github.workspace }}//" | |
run: | | |
$SBCL_SRC/run-sbcl.sh --load script.lisp --quit | |
pushd libcalc | |
mkdir build | |
pushd build | |
cmake -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX .. | |
cmake --build . | |
cmake --install . | |
popd | |
popd | |
gcc -Wall -o example example.c -lcalc -lsbcl_librarian | |
echo "(+ 1 2)" | ./example | tr -d '\n' | grep "> 3> " | |
echo "(+ 1 2)" | python ./example.py | tr -d '\n' | grep "> 3> " | |
python ./exhaust_heap.py | grep "returned to Python after heap exhaustion (attempt 1)" |