forked from hermit-os/hermit-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (43 loc) · 1.81 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
language: rust
branches:
only:
# This is where pull requests from "bors r+" are built.
- staging
# This is where pull requests from "bors try" are built.
- trying
# Uncomment this to enable building pull requests.
- master
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 cargo-download
- 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:
- RUSTFLAGS="-Clinker-plugin-lto" 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"