Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github actions #55

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}-latest
env:
OS_NAME: ${{ matrix.os_name }}
HOMEBREW_NO_AUTO_UPDATE: 1
WINDOWS_SBCL_PATH: "C:/Program Files/Steel Bank Common Lisp/1.4.14"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu
os_name: linux
bundle_ext: tar.gz
make_build_target: all
shen_exe: ./shen
prebuilt_shen_version: 3.0.2
- os: macos
os_name: macos
bundle_ext: tar.gz
make_build_target: sbcl
shen_exe: ./shen
prebuilt_shen_version: 3.0.2
- os: windows
os_name: windows
bundle_ext: zip
make_build_target: sbcl
sbcl_path: "C:/Program Files/Steel Bank Common Lisp/1.4.14"
shen_exe: ./shen.exe
prebuilt_shen_version: 3.0.2
steps:
- uses: actions/checkout@v2
- name: Setup dependencies (Linux)
if: ${{ matrix.os == 'ubuntu' }}
run: |
sudo apt install -y sbcl ecl libffi-dev
- name: Setup dependencies (MacOS)
if: ${{ matrix.os == 'macos' }}
run: brew install sbcl
- name: Setup dependencies (Windows)
if: ${{ matrix.os == 'windows' }}
run: |
choco install make
curl -L "https://netcologne.dl.sourceforge.net/project/sbcl/sbcl/1.4.14/sbcl-1.4.14-x86-64-windows-binary.msi" -o sbcl.msi
powershell -Command "Start-Process msiexec.exe -Wait -ArgumentList '/i sbcl.msi /qn'"
- name: Fetch precompiled Shen (Linux and macOS)
if: ${{ matrix.os == 'ubuntu' || matrix.os == 'macos' }}
run: |
wget "https://github.com/Shen-Language/shen-cl/releases/download/v${{ matrix.prebuilt_shen_version }}/shen-cl-v${{ matrix.prebuilt_shen_version }}-${{ matrix.os_name }}-prebuilt.tar.gz"
tar xzf "shen-cl-v${{ matrix.prebuilt_shen_version }}-${{ matrix.os_name }}-prebuilt.tar.gz" shen
- name: Fetch precompiled Shen (Windoes)
if: ${{ matrix.os == 'windows' }}
run: |
curl -L "https://github.com/Shen-Language/shen-cl/releases/download/v${{ matrix.prebuilt_shen_version }}/shen-cl-v${{ matrix.prebuilt_shen_version }}-windows-prebuilt.zip" -o "shen-cl-v${{ matrix.prebuilt_shen_version }}-windows-prebuilt.zip"
7z e "shen-cl-v${{ matrix.prebuilt_shen_version }}-windows-prebuilt.zip" shen.exe
- name: Fetch kernel
run: make fetch
- name: Precompile code
run: make precompile SHEN=${{ matrix.shen_exe }}
- name: Build and test
run: make ${{ matrix.make_build_target }}
83 changes: 0 additions & 83 deletions .travis.yml

This file was deleted.

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ ifeq ($(OSName),windows)
Slash=\\\\
ArchiveSuffix=.zip
BinarySuffix=.exe
All=clisp ccl sbcl
All=clisp sbcl
PS=powershell.exe -Command
else
Slash=/
ArchiveSuffix=.tar.gz
BinarySuffix=
All=clisp ccl ecl sbcl
All=ecl sbcl
ifeq ($(OSName),freebsd)
All=ccl ecl sbcl
else ifeq ($(OSName),openbsd)
Expand All @@ -57,8 +57,8 @@ CLISP=clisp
ECL=ecl
SBCL=sbcl

ifeq ($(TRAVIS_OS_NAME),windows)
SBCL="$(SBCL_PATH)/sbcl.exe" --core "$(SBCL_PATH)/sbcl.core"
ifeq ($(OS_NAME),windows)
SBCL="$(WINDOWS_SBCL_PATH)/sbcl.exe" --core "$(WINDOWS_SBCL_PATH)/sbcl.core"
endif

#
Expand Down Expand Up @@ -165,7 +165,7 @@ build-ecl:

.PHONY: build-sbcl
build-sbcl:
$(SBCL) --load boot.lsp
$(SBCL) --control-stack-size 8 --load boot.lsp

#
# Test an implementation
Expand Down
4 changes: 2 additions & 2 deletions src/overwrite.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,14 @@
(|shen-cl.read-eval| "(defmacro cl.exit-macro [cl.exit] -> [cl.exit 0])")
(|shen-cl.read-eval| "(defmacro shen-cl.exit-macro [shen-cl.exit] -> [cl.exit 0])")))

#+(or ccl sbcl)
#+(or ccl clisp sbcl)
(defun |shen.read-char-code| (s)
(let ((c (read-char s nil -1)))
(if (eq c -1)
-1
(char-int c))))

#+(or ccl sbcl)
#+(or ccl clisp sbcl)
(defun |pr| (x s)
(write-string x s)
(when (or (eq s |*stoutput*|) (eq s |*stinput*|))
Expand Down
8 changes: 2 additions & 6 deletions src/primitives.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,8 @@

#+clisp
(handler-bind ((warning #'muffle-warning))
(with-open-stream (*standard-input* (ext:make-stream :input :element-type 'unsigned-byte))
(with-open-stream (*standard-output* (ext:make-stream :output :element-type 'unsigned-byte))
(setq |*stoutput*| *standard-output*)
(setq |*stinput*| *standard-input*)
(let ((args (cons (car (coerce (ext:argv) 'list)) ext:*args*)))
(|shen-cl.toplevel-interpret-args| args)))))
(let ((args (cons (car (coerce (ext:argv) 'list)) ext:*args*)))
(|shen-cl.toplevel-interpret-args| args)))

#+ccl
(handler-bind ((warning #'muffle-warning))
Expand Down
Loading