Skip to content

Commit

Permalink
Add Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyagupta committed Nov 22, 2018
1 parent b6df236 commit fcf4531
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: common-lisp
sudo: enabled
os:
- linux
- osx
dist: xenial
addons:
homebrew:
packages: sbcl
install: ./scripts/install-deps.sh
script: ./scripts/build.sh
before_deploy: ./scripts/create-dist.sh
deploy:
provider: releases
api_key:
secure: J1kh7HgydJYsENltYiz4LHspQZU/Zd+zPsLfF3euf8aD1P7TVRH71F4qUqq1z3LYOfWTnYGO/GN7YJg+LBpfTYz/Z95qJwIZlha1c+KF/FVaqzz8ge5FznLVE72zhxv06hRk8+K8O0IDlKcZw8L27cTTvvoebC3IuU0mSsY1EtmsCzu6uPEnXl3aObS8dsN4CuNpz54rK7jtzo9T9hkQXnPLM2G7D4AlkqiwTHQGVMODKM/CPZdgkhGssWrRyt4eunK2LjQ4gxZBxjStXsTthF+6ZLDhHNT9+oqiFHardX8O4aRDYNsvceh0FoYK4rZyGEpE3HfhZqKTxV6AXTI6NFI6v6C8mMp74ZShUqyPh8zq5/rBuztMpbsbOLz8QK/SL0Yr2heZGQeprs71+C1Y6gKXppwNZdA0wmhYilGtXS5mwgkZRxMT/aTiZ8h8EMUiFKfPTi1U5zCfib4mSrPnJAuFkwHHZ77/ElIK0IV6U7DK9TLqPDBio/AdtX7R98Vpq7clLReYuqT045w5GWcJgQRH9QPRTmN0Y5J3let7ah4AuStrvqkLghFRL41vet2Lltsqu7sq6m5cyYxoEDF7RCY91mGy9qOE1cew1nznxJuABFO4x9/mEOkQ0ri0JxOcT9+C4XvRm/AzFjq/wxqZVhj5L/kPMPDHeC2cFVaaRZw=
file_glob: true
file: build/*.tar.gz
skip_cleanup: true
on:
tags: true
3 changes: 0 additions & 3 deletions build-image.lisp

This file was deleted.

7 changes: 7 additions & 0 deletions deftask-cli.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,13 @@ Filter and re-order tasks using -q and -o respectively.
(deftask:edit-comment (second argv) (third argv) (fourth argv))
(format t "Edited comment #~A~%" (third argv))))

;;; version

(defun command-version (argv)
(declare (ignore argv))
(write-string #.(asdf:component-version (asdf:find-system "deftask-cli")))
(terpri))

;; pager

(defun launch-pager (name &rest args)
Expand Down
11 changes: 11 additions & 0 deletions scripts/build-image.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(push *default-pathname-defaults* asdf:*central-registry*)
(ql:quickload "cffi-grovel") ; https://github.com/quicklisp/quicklisp-client/issues/108
(ql:quickload "deftask-cli")

(defvar *build-dir*
(let ((os (or (deftask-cli::getenv "TRAVIS_OS_NAME")
(string-downcase (uiop/os:operating-system)))))
(assert os nil "No OS given")
(ensure-directories-exist (format nil "build/~A/" os))))

(deftask-cli:build-image (make-pathname :name "deftask" :defaults *build-dir*))
3 changes: 3 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

sbcl --disable-debugger --load scripts/build-image.lisp
17 changes: 17 additions & 0 deletions scripts/create-dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

OS=$TRAVIS_OS_NAME
VERSION=$(build/$OS/deftask version)

DIST_NAME=deftask-cli-$OS-v$VERSION
DIST_DIR=build/$DIST_NAME
mv build/$OS $DIST_DIR

TARBALL=$DIST_NAME.tar.gz

cp README.md $DIST_DIR/
cd build
tar czvf $TARBALL $DIST_NAME/*
cd -
ls build
tar tzvf build/$TARBALL
20 changes: 20 additions & 0 deletions scripts/install-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export SB_DIST=sbcl-1.4.13-x86-64-linux
export TARBALL=$SB_DIST-binary.tar.bz2
wget http://prdownloads.sourceforge.net/sbcl/$TARBALL
tar -xjvf $TARBALL
cd $SB_DIST
sudo sh install.sh
cd -
fi

curl -O https://beta.quicklisp.org/quicklisp.lisp

sbcl --disable-debugger --load quicklisp.lisp --eval '(quicklisp-quickstart:install)' --eval '(setf ql-util::*do-not-prompt* t)' --eval '(ql:add-to-init-file)' --quit

cd ~/quicklisp/local-projects/
git clone https://github.com/chaitanyagupta/termcolor.git

0 comments on commit fcf4531

Please sign in to comment.