Skip to content

Commit

Permalink
Add Travis configuration
Browse files Browse the repository at this point in the history
Travis allows us to test rusty-hermit on uhyve
  • Loading branch information
jschwe committed May 18, 2020
1 parent 0414b45 commit 9adf985
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: rust
rust:
- nightly
os: linux
dist: bionic
cache: cargo
before_cache:
# Only cache cargo dependencies, do a clean build for rusty-hermit
- rm -rf $TRAVIS_BUILD_DIR/target
before_install:
- sudo apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
- sudo adduser $USER libvirt
- sudo adduser $USER kvm
- rustup component add rust-src
- rustup component add llvm-tools-preview
- cargo install uhyve
- >
if [ $(egrep -c '(vmx|svm)' /proc/cpuinfo) -eq "0" ]; then
echo "No virtualization possible - uhyve can't run";
exit -1;
fi
jobs:
include:
- name: "Test Debug Build"
script:
- cargo build -Z build-std=std,core,alloc,panic_abort --target x86_64-unknown-hermit
# used to get terminal with new groups permissions while preserving own user
- sudo -E sudo -u $USER -E bash -c "HERMIT_VERBOSE=1 $HOME/.cargo/bin/uhyve target/x86_64-unknown-hermit/debug/rusty_demo"
- sudo -E sudo -u $USER -E bash -c "HERMIT_VERBOSE=1 HERMIT_CPUS=2 $HOME/.cargo/bin/uhyve target/x86_64-unknown-hermit/debug/rusty_demo"
- name: "Test Release Build"
script:
- cargo build -Z build-std=std,core,alloc,panic_abort --target x86_64-unknown-hermit --release
- sudo -E sudo -u $USER -E bash -c "HERMIT_VERBOSE=1 $HOME/.cargo/bin/uhyve target/x86_64-unknown-hermit/release/rusty_demo"
- sudo -E sudo -u $USER -E bash -c "HERMIT_VERBOSE=1 HERMIT_CPUS=2 $HOME/.cargo/bin/uhyve target/x86_64-unknown-hermit/release/rusty_demo"

0 comments on commit 9adf985

Please sign in to comment.