mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-30 12:07:46 +00:00
refac: split ci/cd into pieces
This commit is contained in:
parent
cb66042a0c
commit
993fdd2ff6
2 changed files with 31 additions and 37 deletions
31
buildkite-cd.yaml
Normal file
31
buildkite-cd.yaml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
steps:
|
||||||
|
- label: build
|
||||||
|
agents:
|
||||||
|
queue: private
|
||||||
|
artifacts:
|
||||||
|
- alejandra-*
|
||||||
|
command:
|
||||||
|
- echo +++
|
||||||
|
- nix build .#alejandra-binaries
|
||||||
|
- nix-store
|
||||||
|
--query
|
||||||
|
--include-outputs $(nix-store --query --deriver result)
|
||||||
|
--requisites |
|
||||||
|
grep -v '\.drv$$' |
|
||||||
|
cachix push alejandra
|
||||||
|
- cp -L result/* .
|
||||||
|
|
||||||
|
- label: coverage
|
||||||
|
agents:
|
||||||
|
queue: private
|
||||||
|
command:
|
||||||
|
- echo +++ Fetch
|
||||||
|
- git branch -D main
|
||||||
|
- git branch main
|
||||||
|
- git checkout main
|
||||||
|
- echo --- Load environment
|
||||||
|
- direnv allow
|
||||||
|
- eval "$(direnv export bash)"
|
||||||
|
- echo +++ Run tests
|
||||||
|
- cd src/alejandra
|
||||||
|
- cargo tarpaulin --coveralls "$${COVERALLS_REPO_TOKEN}"
|
|
@ -1,39 +1,5 @@
|
||||||
steps:
|
steps:
|
||||||
- label: build
|
|
||||||
if: build.branch == "main"
|
|
||||||
agents:
|
|
||||||
queue: private
|
|
||||||
artifacts:
|
|
||||||
- alejandra-*
|
|
||||||
command:
|
|
||||||
- echo +++
|
|
||||||
- nix build .#alejandra-binaries
|
|
||||||
- nix-store
|
|
||||||
--query
|
|
||||||
--include-outputs $(nix-store --query --deriver result)
|
|
||||||
--requisites |
|
|
||||||
grep -v '\.drv$$' |
|
|
||||||
cachix push alejandra
|
|
||||||
- cp -L result/* .
|
|
||||||
|
|
||||||
- label: coverage
|
|
||||||
if: build.branch == "main"
|
|
||||||
agents:
|
|
||||||
queue: private
|
|
||||||
command:
|
|
||||||
- echo +++ Fetch
|
|
||||||
- git branch -D main
|
|
||||||
- git branch main
|
|
||||||
- git checkout main
|
|
||||||
- echo --- Load environment
|
|
||||||
- direnv allow
|
|
||||||
- eval "$(direnv export bash)"
|
|
||||||
- echo +++ Run tests
|
|
||||||
- cd src/alejandra
|
|
||||||
- cargo tarpaulin --coveralls "${COVERALLS_REPO_TOKEN}"
|
|
||||||
|
|
||||||
- label: formatting diff
|
- label: formatting diff
|
||||||
if: build.branch != "main"
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- formatting-before-vs-after.patch.txt
|
- formatting-before-vs-after.patch.txt
|
||||||
command:
|
command:
|
||||||
|
@ -58,7 +24,6 @@ steps:
|
||||||
- git -C nixpkgs diff formatting-before > formatting-before-vs-after.patch.txt
|
- git -C nixpkgs diff formatting-before > formatting-before-vs-after.patch.txt
|
||||||
|
|
||||||
- label: closure diff
|
- label: closure diff
|
||||||
if: build.branch != "main"
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- closure-before.txt
|
- closure-before.txt
|
||||||
- closure-after.txt
|
- closure-after.txt
|
||||||
|
@ -86,7 +51,6 @@ steps:
|
||||||
- grep -c drvPath= closure-after.txt
|
- grep -c drvPath= closure-after.txt
|
||||||
|
|
||||||
- label: lint
|
- label: lint
|
||||||
if: build.branch != "main"
|
|
||||||
command:
|
command:
|
||||||
- echo --- Load environment
|
- echo --- Load environment
|
||||||
- direnv allow
|
- direnv allow
|
||||||
|
@ -95,7 +59,6 @@ steps:
|
||||||
- cargo clippy
|
- cargo clippy
|
||||||
|
|
||||||
- label: flake check
|
- label: flake check
|
||||||
if: build.branch != "main"
|
|
||||||
command:
|
command:
|
||||||
- echo +++
|
- echo +++
|
||||||
- nix flake check
|
- nix flake check
|
Loading…
Add table
Add a link
Reference in a new issue