2019-11-05 07:59:49 -05:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
|
|
|
- image: circleci/rust:latest
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Version information
|
|
|
|
command: rustc --version; cargo --version; rustup --version
|
|
|
|
- run:
|
|
|
|
name: Calculate dependencies
|
|
|
|
command: cargo generate-lockfile
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
|
|
- run:
|
|
|
|
name: Check Formatting
|
|
|
|
command: |
|
|
|
|
rustup component add rustfmt
|
|
|
|
rustfmt --version
|
|
|
|
cargo fmt --all -- --check --color=auto
|
|
|
|
- run:
|
2019-11-05 08:11:30 -05:00
|
|
|
name: Install Lua
|
|
|
|
command: |
|
|
|
|
sudo apt-get update
|
2019-11-29 08:26:30 -05:00
|
|
|
sudo apt-get -y --no-install-recommends install liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev
|
2019-11-05 07:59:49 -05:00
|
|
|
- run:
|
|
|
|
name: Build all targets
|
|
|
|
command: cargo build --all --all-targets
|
|
|
|
- run:
|
|
|
|
name: Run all tests / Lua 5.3
|
|
|
|
command: cargo test --all --no-default-features --features lua53
|
2019-11-29 08:26:30 -05:00
|
|
|
- run:
|
|
|
|
name: Run all tests / Lua 5.2
|
|
|
|
command: cargo test --all --no-default-features --features lua52
|
2019-11-05 07:59:49 -05:00
|
|
|
- run:
|
|
|
|
name: Run all tests / Lua 5.1
|
|
|
|
command: cargo test --all --no-default-features --features lua51
|
|
|
|
- run:
|
|
|
|
name: Run all tests / LuaJIT
|
|
|
|
command: cargo test --all --no-default-features --features luajit
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- /usr/local/cargo/registry
|
|
|
|
- target/debug/.fingerprint
|
|
|
|
- target/debug/build
|
|
|
|
- target/debug/deps
|
|
|
|
key: cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|