Files
little_learner/.woodpecker/.build.yml
Smaug123 bf2e98d3f2
Some checks failed
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/pr/all-checks-complete unknown status
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/all-checks-complete unknown status
MaybE
2023-07-23 21:00:14 +01:00

21 lines
1.4 KiB
YAML

pipeline:
build:
image: nixos/nix
commands:
# Lint
- nix --experimental-features 'nix-command flakes' develop --store 'unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' --eval-store local --command cargo -- fmt --all -- --check
- nix --experimental-features 'nix-command flakes' develop --store 'unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' --eval-store local --command cargo -- clippy -- -D warnings -W clippy::must_use_candidate
- nix --experimental-features 'nix-command flakes' develop --store 'unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' --eval-store local .#ci --command alejandra -- --check .
- nix --experimental-features 'nix-command flakes' develop --store 'unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' --eval-store local .#ci --command markdown-link-check README.md
# Test
- nix --experimental-features 'nix-command flakes' develop --command cargo test --verbose --release
- nix --experimental-features 'nix-command flakes' develop --command cargo test --verbose
# Run through Nix
- nix --experimental-features 'nix-command flakes' build
- nix --experimental-features 'nix-command flakes' run
volumes:
- "/nix:/mnt/nix:ro"
when:
evaluate: '(CI_BUILD_EVENT == "push" && CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) || (CI_BUILD_EVENT == "pull_request")'