1
1
mirror of https://github.com/kanaka/mal.git synced 2024-10-03 17:07:39 +03:00

add makefile and dockerfile for mal CI for ruby.2

This commit is contained in:
Ryan Cook 2021-12-12 11:16:51 -07:00 committed by Joel Martin
parent f1be2c471f
commit 6896b0ab18
4 changed files with 45 additions and 1 deletions

View File

@ -81,6 +81,7 @@ IMPL:
- {IMPL: rexx}
- {IMPL: rpython, SLOW: 1}
- {IMPL: ruby}
- {IMPL: ruby.2}
- {IMPL: rust}
- {IMPL: scala}
- {IMPL: scheme, scheme_MODE: chibi}

View File

@ -0,0 +1,24 @@
FROM ubuntu:20.04
MAINTAINER Joel Martin <github@martintribe.org>
##########################################################
# General requirements for testing or common across many
# implementations
##########################################################
RUN apt-get -y update
# Required for running tests
RUN apt-get -y install make python
# Some typical implementation and test requirements
RUN apt-get -y install curl libreadline-dev libedit-dev
RUN mkdir -p /mal
WORKDIR /mal
##########################################################
# Specific implementation requirements
##########################################################
RUN apt-get -y install ruby

19
impls/ruby.2/Makefile Normal file
View File

@ -0,0 +1,19 @@
SOURCES_BASE = errors.rb types.rb reader.rb printer.rb
SOURCES_LISP = env.rb core.rb stepA_mal.rb
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
all:
true
dist: mal.rb mal
mal.rb: $(SOURCES)
cat $+ | grep -v "^require_relative" > $@
mal: mal.rb
echo "#!/usr/bin/env ruby" > $@
cat $< >> $@
chmod +x $@
clean:
rm -f mal.rb mal

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
from __future__ import print_function
import os, sys, re