Skip to content

Commit a65a1e9

Browse files
committed
Update travis script to new build procedure
1 parent 2b2eede commit a65a1e9

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.travis.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,30 @@ language: rust
33
rust:
44
- nightly
55

6-
os: linux
6+
os:
7+
- linux
8+
- osx
9+
- windows
710

811
cache:
912
directories:
1013
- $HOME/.cargo
11-
- $HOME/.xargo
14+
- $HOME/Library/Caches/Homebrew
1215
- $TRAVIS_BUILD_DIR/target
16+
- $TRAVIS_BUILD_DIR/example-kernel/target
17+
18+
addons:
19+
apt:
20+
packages:
21+
- qemu-system-x86
22+
23+
install:
24+
- if [ $TRAVIS_OS_NAME = osx ]; then brew update; brew install qemu; fi
25+
- if [ $TRAVIS_OS_NAME = windows ]; then wget https://qemu.weilnetz.de/w64/2018/qemu-w64-setup-20180801.exe; 7z x qemu-w64-setup-20180801.exe; fi
1326

1427
before_script:
1528
- rustup component add rust-src
16-
- "(test -x $HOME/.cargo/bin/xargo || cargo install xargo)"
29+
- "(test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild)"
1730

1831
sudo: false
1932

@@ -23,5 +36,6 @@ notifications:
2336
on_failure: change
2437

2538
script:
26-
- RUST_TARGET_PATH=`pwd` xargo build --target x86_64-bootloader --release
27-
- objcopy -O binary -S target/x86_64-bootloader/release/bootloader bootimage.bin
39+
- cd example-kernel; cargo xbuild --target x86_64-example-kernel.json; cd ..
40+
- cd builder; cargo run -- --kernel ../example-kernel/target/x86_64-example-kernel/debug/example-kernel; cd ..
41+
- qemu-system-x86_64 -drive format=raw,file=target/x86_64-bootloader/release/bootimage.bin -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none; if [ $? -eq 123 ]; then (exit 0); else (exit 1); fi

0 commit comments

Comments
 (0)