forked from Skynet/discord-bot
ci: build the bot in nix in order to cache it early on
This commit is contained in:
parent
0541a70714
commit
9654963198
2 changed files with 12 additions and 5 deletions
|
@ -10,6 +10,10 @@ stages:
|
|||
variables:
|
||||
RUST_BACKTRACE: FULL
|
||||
|
||||
.scripts_cache: &scripts_cache
|
||||
- nix --extra-experimental-features 'nix-command flakes' profile install nixpkgs#attic-client
|
||||
- attic login skynet https://nix-cache.skynet.ie/ $CACHE_KEY
|
||||
- attic use skynet-cache
|
||||
|
||||
# clippy and fmt are magic
|
||||
# runs on all commits/branches
|
||||
|
@ -20,6 +24,7 @@ lint-clippy:
|
|||
- rustc --version
|
||||
- cargo version
|
||||
- cargo clippy
|
||||
- cargo test --verbose
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
|
@ -47,11 +52,13 @@ lint-fmt:
|
|||
# has to actually compile
|
||||
build:
|
||||
stage: build
|
||||
tags:
|
||||
- nix
|
||||
before_script:
|
||||
- *scripts_cache
|
||||
script:
|
||||
- rustc --version
|
||||
- cargo version
|
||||
- cargo build --verbose
|
||||
- RUST_BACKTRACE=1 cargo test --verbose
|
||||
- attic watch-store skynet-cache &
|
||||
- nix build --verbose
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
|
|
|
@ -37,4 +37,4 @@ chrono = "0.4.26"
|
|||
lettre = "0.10.4"
|
||||
maud = "0.25.0"
|
||||
|
||||
serde = "1.0.188"
|
||||
serde = "1.0.188"
|
Loading…
Reference in a new issue