Skip to content

Commit

Permalink
[#108] Add coarse_nix and stack_nix to the build matrix (not working:…
Browse files Browse the repository at this point in the history
… "no space left on device")

re: "Prelude.read no parse" error that RRN reported:

`nix-shell` sets an environment variable, SIZE=size. I've not been
able track down what specific package is responsible for this. I tried
to write another minimal shell.nix script and that shell had this
environment variable too.

Gibbon tries to parse "size" as an Int (in Gibbon.Common.getRunConfig)
and that doesn't work out very well. Until we figure out the source of
this rogue variable, we *unset* it run_all_tests.sh.

Now, Travis fails with "No space left on device" while trying to
install Gibbon's dependencies (the Haskell ones, via Stack) :(
  • Loading branch information
ckoparkar committed Feb 11, 2019
1 parent 5a0f339 commit f0bc5a0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 25 deletions.
49 changes: 34 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# To set the default GCC version to 7
sudo: required

# Do not choose a language; we provide our own build tools.
language: generic
# language: nix
# Install some Nix tools.
# See https://docs.travis-ci.com/user/languages/nix.
language: nix

# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack

# TODO: after the Nix jobs start working on Travis we should look into
# caching Nix things too: https://nixos.wiki/wiki/Nix_on_Travis.

# Ensure necessary system libraries are present
addons:
apt:
Expand All @@ -23,21 +24,38 @@ addons:
- ghc-8.4.3

# Build in three modes, varying ONLY the environment used to build
# Docker code
env:
-
- STACK_DOCKER=1
# - STACK_NIX=1

# Temporary:
# Docker code.
matrix:
include:
- name: Default

- name: stack_docker
env: STACK_DOCKER=1

# Travis fails with "No space left on device" while trying to install
# Gibbon's dependencies (the Haskell ones, via Stack) :(
- name: coarse_nix
env: COARSE_NIX=1
install: skip
addons: skip
script:
- df -h
- nix-shell shell.nix --run "COARSE_NIX=1 ./run_all_tests.sh"

- name: stack_nix
env: STACK_NIX=1

# Temporary:
allow_failures:
- env: STACK_DOCKER=1
# - env: STACK_NIX=1

- name: stack_docker
- name: coarse_nix
- name: stack_nix

install:
# Download and unpack the stack executable
# The Ubuntu package is only available on >16.04. Travis is using 14.04.
# Update: Travis supports Ubuntu 16.04 since Nov 2018. We should start
# using that.
- echo "Installing Stack...\n"
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
Expand Down Expand Up @@ -66,6 +84,7 @@ install:
git:
submodules: false

# Default.
script:
./run_all_tests.sh

Expand Down
12 changes: 2 additions & 10 deletions gibbon-compiler/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ packages:

extra-deps:
- s-cargot-0.1.4.0
- haskell-src-exts-simple-1.20.0.0

flags: {}
extra-package-dbs: []
Expand All @@ -16,20 +15,13 @@ extra-package-dbs: []
# If you want to pin things for reproducible builds
nix:
enable: false
packages: [gcc, which]
# packages: [gcc, which]
# path: ["https://github.com/NixOS/nixpkgs-channels/archive/nixos-17.03.tar.gz"]
# nixos-unstable snapshot:
# path: ["nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/1e1472ed93e1256dfdac4908ae8edcb90ceff21c.tar.gz"]
# shell-file: shell.nix
shell-file: shell.nix
path: ["nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.09.tar.gz"]

# [2018.05.23] (chai):
# Ugh, Stack fails to construct a build plan with my system GHC, even though it's pinned to 8.2.2,
# which is the same version that it expects. It tries to build deepseq-1.4.4.0 which is not even released yet.
# Pinning a particular version of deepseq leads to further errors. Disabling this for now.
#
# system-ghc: true

docker:
enable: false
auto-pull: true
Expand Down
13 changes: 13 additions & 0 deletions run_all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ echo " Gibbon Compiler (1/2): build & unit tests"
echo "-------------------------------------------"
set -x
cd $top/gibbon-compiler
df -h

if [ "$LLVM_ENABLED" == "1" ]; then
echo "Building Gibbon with LLVM enabled"
Expand All @@ -134,6 +135,18 @@ echo "--------------------------------------------"
# Turning off -j for now [2016.11.06]
cd $top/gibbon-compiler
# make answers

## CSK: nix-shell sets an environment variable, SIZE=size. I've not been able
## track down what specific package is responsible for this. I tried to write
## another minimal shell.nix script and that shell had this environment
## variable too.
##
## This leads to the "Prelude.read no parse" error that RRN reported in #108.
## Gibbon tries to parse "size" as an Int (in Gibbon.Common.getRunConfig) and
## that doesn't work out very well. Until we figure out the source of this
## rogue variable, we *unset* it here.
unset SIZE ITERS

$STK exec test-gibbon-examples -- -v2


Expand Down

0 comments on commit f0bc5a0

Please sign in to comment.