forked from fishinabarrel/linux-kernel-module-rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.travis.yml
More file actions
39 lines (33 loc) · 969 Bytes
/
Copy path.travis.yml
File metadata and controls
39 lines (33 loc) · 969 Bytes
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
sudo: required
language: rust
rust:
- nightly
cache:
- cargo: true
# TODO: dedup this with the MODULE_DIR in env
- directories:
- static-filesystem/target/
- hello-world/target/
matrix:
include:
- env: MODULE_DIR=hello-world MODULE=helloworld
# TODO: currently the kernel module fails to load
# - env: MODULE_DIR=static-filesystem MODULE=staticfilesystem
install:
- sudo apt-get install -y "linux-headers-$(uname -r)"
- type -p cargo-install-update || cargo install --force cargo-update
- |
if type -p cargo-xbuild; then
cargo install-update -i cargo-xbuild
else
cargo install --force cargo-xbuild
fi
- rustup component add rust-src
script:
- cd $MODULE_DIR
- RUST_TARGET_PATH="$(pwd)/.." cargo xbuild --target x86_64-linux-kernel-module
- make
- sudo insmod "${MODULE}.ko"
- sudo rmmod "$MODULE"
notifications:
email: false