forked from Skynet/discord-bot
Revert "ci: improvements to building in pipeline"
This reverts commit d8b232b546
.
This commit is contained in:
parent
bee41c192f
commit
394d6b4545
4 changed files with 65 additions and 100 deletions
|
@ -1,3 +1,6 @@
|
|||
# copied a good chunk from my bfom config
|
||||
image: rust:latest
|
||||
|
||||
stages:
|
||||
- lint
|
||||
- build
|
||||
|
@ -11,15 +14,17 @@ variables:
|
|||
- 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
|
||||
- attic watch-store skynet-cache &
|
||||
|
||||
.build_template: &nix
|
||||
tags:
|
||||
- nix
|
||||
before_script:
|
||||
- *scripts_cache
|
||||
|
||||
.rules_template: &rules
|
||||
# clippy and fmt are magic
|
||||
# runs on all commits/branches
|
||||
lint-clippy:
|
||||
stage: lint
|
||||
script:
|
||||
- rustup component add clippy
|
||||
- rustc --version
|
||||
- cargo version
|
||||
- cargo clippy
|
||||
- cargo test --verbose
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
|
@ -28,28 +33,31 @@ variables:
|
|||
- Cargo.*
|
||||
when: always
|
||||
|
||||
# clippy and fmt are magic
|
||||
# runs on all commits/branches
|
||||
lint-clippy:
|
||||
stage: lint
|
||||
<<: *nix
|
||||
<<: *rules
|
||||
script:
|
||||
- nix --extra-experimental-features "nix-command flakes" build --verbose .#clippy
|
||||
|
||||
lint-fmt:
|
||||
stage: lint
|
||||
<<: *nix
|
||||
<<: *rules
|
||||
script:
|
||||
- nix --extra-experimental-features "nix-command flakes" build --verbose .#fmt
|
||||
- rustup component add rustfmt
|
||||
- rustc --version
|
||||
- cargo version
|
||||
- cargo fmt -- --check
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
- changes:
|
||||
- src/**/*
|
||||
- Cargo.*
|
||||
when: always
|
||||
|
||||
|
||||
# has to actually compile
|
||||
build:
|
||||
stage: build
|
||||
<<: *nix
|
||||
tags:
|
||||
- nix
|
||||
before_script:
|
||||
- *scripts_cache
|
||||
script:
|
||||
- attic watch-store skynet-cache &
|
||||
- nix --extra-experimental-features "nix-command flakes" build --verbose
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue