-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (44 loc) · 1.61 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
44
45
46
47
48
49
50
51
# build only master branch on commit's
# all other branches build on PullRequest creation
branches:
only:
- master
# use a newer Ubuntu release
dist: focal
language: rust
rust:
# build nightly only for the time beeing
- nightly
# increase build speed by caching installed cargo dependencies
cache:
- cargo
- qemu
# define the stages and their order
stages:
- unittest
jobs:
include:
- stage: unittest
name: "Compile and UnittestThe Crate"
install:
- sudo apt-get install ninja-build
- wget https://download.qemu.org/qemu-5.2.0-rc0.tar.xz
- tar xvJf qemu-5.2.0-rc0.tar.xz > /dev/null
- cd qemu-5.2.0-rc0
- ./configure --disable-kvm --prefix=$TRAVIS_BUILD_DIR/qemu --target-list="arm-softmmu aarch64-softmmu"
- travis_wait make
- make
- sudo make install
- cd ..
- sudo find ~/ -type f -name "qemu-system-*"
- sudo apt-get install -y gcc-aarch64-linux-gnu
- cargo install cargo-xbuild
- cargo install cargo-make
- rustup target add aarch64-unknown-none
- rustup component add rust-src
- rustup component add llvm-tools-preview
# if we not build a PR we remove the patch of the dependencies to their github repo's
- 'if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then sed -i "/\[patch\.crates-io\]/,$ s/ruspiro-\(.*\)/# ruspiro-\1/g" Cargo.toml; fi'
# adjust the config.toml to call the test runner with the travis profile
- sed -i 's/\(cargo make qemu-test\)/\1 --profile travis/g' .cargo/config.toml
script: cargo make --profile travis unittest