2022-01-03 12:46:29 +01:00
|
|
|
# When block for each step is temporary until top-level when is properly implemented
|
|
|
|
pipeline:
|
2022-01-03 17:21:56 +01:00
|
|
|
add-sccache:
|
|
|
|
image: 'rust:1.57'
|
|
|
|
commands:
|
|
|
|
- curl https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz -Lo - | tar xzf -
|
|
|
|
- mv sccache-v0.2.15-x86_64-unknown-linux-musl/sccache .
|
2022-01-03 17:23:59 +01:00
|
|
|
- chmod +x sccache
|
2022-01-03 17:21:56 +01:00
|
|
|
|
2022-01-03 12:46:29 +01:00
|
|
|
clippy:
|
|
|
|
image: 'rust:1.57'
|
2022-01-03 17:21:56 +01:00
|
|
|
environment:
|
|
|
|
- SCCACHE_BUCKET=rbci
|
2022-01-03 17:42:29 +01:00
|
|
|
- SCCACHE_ENDPOINT=s3.rustybever.be
|
2022-01-03 17:21:56 +01:00
|
|
|
- SCCACHE_S3_USE_SSL=true
|
2022-01-03 12:46:29 +01:00
|
|
|
commands:
|
2022-01-03 17:23:19 +01:00
|
|
|
- rustup component add clippy
|
2022-01-03 17:21:56 +01:00
|
|
|
- export RUSTC_WRAPPER="$PWD"/sccache
|
|
|
|
- export SCCACHE_S3_KEY_PREFIX=$CI_REPO_NAME
|
2022-01-03 12:46:29 +01:00
|
|
|
- cargo clippy -- -D clippy::all --no-deps
|
2022-01-03 18:06:35 +01:00
|
|
|
- ./sccache --show-stats
|
2022-01-03 17:21:56 +01:00
|
|
|
secrets:
|
|
|
|
- aws_access_key_id
|
|
|
|
- aws_secret_access_key
|
2022-01-03 12:46:29 +01:00
|
|
|
when:
|
2022-01-03 17:21:56 +01:00
|
|
|
event: push
|
2022-01-03 12:46:29 +01:00
|
|
|
|
|
|
|
tests:
|
|
|
|
image: 'rust:1.57'
|
|
|
|
commands:
|
2022-01-03 17:21:56 +01:00
|
|
|
- export RUSTC_WRAPPER="$PWD"/sccache
|
2022-01-03 12:46:29 +01:00
|
|
|
- cargo test
|
|
|
|
when:
|
|
|
|
event: pull_request
|