image: "liuchong/rustup:1.20.0"
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
before_script:
- dpkg --add-architecture i386
- apt-get update -yqq && apt-get install -yqq libudev-dev pkg-config git gcc-multilib libudev1:i386 libudev-dev:i386
- git submodule sync
- git submodule update --init
- rustc -Vv && cargo -Vv
cache:
paths:
- cargo
- target
build:x86_64-unknown-linux-gnu:
stage: build
script:
- cargo test --no-run --verbose
test:x86_64-unknown-linux-gnu:
stage: test
script:
- cargo test --verbose
build:i686-unknown-linux-gnu:
stage: build
variables:
PKG_CONFIG_ALLOW_CROSS: 1
before_script: &i386_before
- dpkg --add-architecture i386
- apt-get update -yqq && apt-get install -yqq libudev-dev pkg-config git gcc-multilib libudev1:i386 libudev-dev:i386
- git submodule sync
- git submodule update --init
- rustc -Vv && cargo -Vv
- rustup target add i686-unknown-linux-gnu
script:
- cargo test --no-run --verbose --target=i686-unknown-linux-gnu
test:i686-unknown-linux-gnu:
stage: test
variables:
PKG_CONFIG_ALLOW_CROSS: 1
before_script: *i386_before
script:
- cargo test --verbose --target=i686-unknown-linux-gnu
pages:
stage: deploy
script:
- cargo doc
- rm -r target/doc/libc
- rm -r target/doc/src/libc
- mkdir public
- mkdir public/img
- mv target/doc public
- mv controller.svg public/img/
artifacts:
expire_in: 1 week
paths:
- public
only:
- master
except:
- schedules