Do the build on CI using nix.

This commit is contained in:
Benjamin Summers 2018-11-08 11:28:54 -08:00
parent 0925e15335
commit 088156c197
2 changed files with 32 additions and 43 deletions

View File

@ -1,60 +1,20 @@
language: node_js
node_js:
- 4
python: "3.5"
language: nix
nix: 2.1.3
script:
- meson . ./build --buildtype=debugoptimized -Dgc=true -Dprof=true
- cd ./build
- ninja
- sudo ninja install
- cd ../.travis
- ulimit -c unlimited -S
- npm install
# || true so we continue
- npm run -s test || RESULT=$?
- if [[ ${RESULT} -eq 0 ]]; then exit 0; else for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb urbit core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done; fi;
- echo "build failed with status code $RESULT"
- exit $RESULT
- nix-shell --pure --run './scripts/cibuild -Dnix=true'
# Uncomment me if this gets annoying
#
# notifications:
# email: false
before_install:
- wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
- unzip ninja-linux.zip
- sudo mv ninja /usr/bin/
install:
# pwd: ~/urbit
- pip3 install --user -I meson==0.46.1
- git clone https://github.com/urbit/arvo
- cd ./arvo
- git checkout $(cat ../.travis/pin-arvo-commit.txt)
- cd ..
addons:
apt:
packages:
- python3
- python3-pip
- libgmp3-dev
- libsigsegv-dev
- openssl
- libssl-dev
- libncurses5-dev
- automake
- autoconf
- make
- libtool
- g++
- re2c
- libcurl4-gnutls-dev
- unzip
- gdb
# before_deploy: "make deb" # TODO
deploy:
skip_cleanup: true
provider: releases

29
scripts/cibuild Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -ex
meson . ./build --buildtype=debugoptimized -Dgc=true -Dprof=true "$@"
cd ./build
ninja || true
sudo ninja install
cd ../.travis
ulimit -c unlimited -S
npm install
npm run -s test || RESULT=$?
[[ ${RESULT} -eq 0 ]] && exit 0
for i in $(find ./ -maxdepth 1 -name 'core*' -print)
do gdb urbit core* -ex "thread apply all bt" -ex "set pagination 0" -batch
done
echo "build failed with status code $RESULT"
exit $RESULT