Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit a11fcca

Browse files
authored
Fixed #5 -- added the most basic CI (#6)
* Fixed #5 -- added the most basic CI * Fix * Sigh, cargo install'd things live in cache * sigh, shell; * install some kernel headers * caching as well * sudo + caching * sigh, not working ATM * fix travis cache * noop commit to test how fast travis is with cache
1 parent 19a2b54 commit a11fcca

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
sudo: required
2+
3+
language: rust
4+
rust:
5+
- nightly
6+
cache:
7+
- cargo: true
8+
# TODO: dedup this with the MODULE_DIR in env
9+
- directories:
10+
- static-filesystem/target/
11+
- hello-world/target/
12+
13+
matrix:
14+
include:
15+
- env: MODULE_DIR=hello-world MODULE=helloworld
16+
# TODO: currently the kernel module fails to load
17+
# - env: MODULE_DIR=static-filesystem MODULE=staticfilesystem
18+
19+
install:
20+
- sudo apt-get install -y "linux-headers-$(uname -r)"
21+
- type -p cargo-install-update || cargo install --force cargo-update
22+
- |
23+
if type -p cargo-xbuild; then
24+
cargo install-update -i cargo-xbuild
25+
else
26+
cargo install --force cargo-xbuild
27+
fi
28+
- rustup component add rust-src
29+
30+
script:
31+
- cd $MODULE_DIR
32+
- RUST_TARGET_PATH="$(pwd)/.." cargo xbuild --target x86_64-linux-kernel-module
33+
- make
34+
- sudo insmod "${MODULE}.ko"
35+
- sudo rmmod "$MODULE"

0 commit comments

Comments
 (0)