2014-12-17 21:29:25 +13:00
|
|
|
language: rust
|
2015-05-26 22:35:10 +12:00
|
|
|
rust: nightly
|
2015-04-15 18:18:12 +12:00
|
|
|
sudo: false
|
2016-11-06 12:49:44 +13:00
|
|
|
|
2019-03-27 19:42:02 +13:00
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- name: "Main"
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
RUN_CLIPPY=true
|
|
|
|
rustup component add clippy --toolchain=nightly || RUN_CLIPPY=false
|
2020-09-28 22:13:07 +10:00
|
|
|
- cargo test --workspace --all-features
|
2019-03-27 19:42:02 +13:00
|
|
|
- |
|
|
|
|
if $RUN_CLIPPY; then
|
|
|
|
CLIPPY_STATUS=0
|
|
|
|
for package in maud_htmlescape maud_macros maud; do
|
|
|
|
(cd $package && cargo clippy -- -D warnings) || CLIPPY_STATUS=$?
|
|
|
|
done
|
|
|
|
(exit $CLIPPY_STATUS)
|
|
|
|
fi
|
2020-09-28 11:06:44 +10:00
|
|
|
- name: "Stable"
|
|
|
|
rust: stable
|
2020-07-21 08:04:48 -04:00
|
|
|
script:
|
2020-09-28 11:06:44 +10:00
|
|
|
# Skip `--all-features` because stable Rocket isn't released yet
|
2020-09-28 22:13:07 +10:00
|
|
|
- cargo test --workspace
|
2019-03-27 19:42:02 +13:00
|
|
|
- name: "Benchmarks"
|
|
|
|
script:
|
2020-09-28 22:57:55 +10:00
|
|
|
- (cd benchmarks && cargo test --benches --locked)
|
2019-03-27 21:54:35 +13:00
|
|
|
- name: "Documentation"
|
|
|
|
script:
|
|
|
|
- (cd docs && make -j$(nproc))
|
|
|
|
deploy:
|
|
|
|
provider: pages
|
|
|
|
skip_cleanup: true
|
|
|
|
github_token: $GITHUB_TOKEN
|
|
|
|
fqdn: maud.lambda.xyz
|
|
|
|
local_dir: docs/site
|
|
|
|
on:
|
|
|
|
branch: master
|
2020-09-27 20:59:49 +10:00
|
|
|
- name: "Format"
|
|
|
|
before_script:
|
|
|
|
- rustup component add rustfmt
|
|
|
|
script:
|
|
|
|
- cargo fmt -- --check
|
|
|
|
- (cd benchmarks && cargo fmt -- --check)
|
|
|
|
- (cd docs && cargo fmt -- --check)
|
2020-09-27 21:33:37 +10:00
|
|
|
# trybuild harnesses are technically not part of the Cargo project, so
|
|
|
|
# need to be checked separately
|
|
|
|
- rustfmt --check maud/tests/warnings/*.rs
|