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

23 lines
1.2 KiB
YAML

pipeline:
build:
image: nixos/nix
commands:
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
- nix run --store 'unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' --eval-store local nixpkgs#bashInteractive -- -c 'echo Installed'
# Lint
- nix develop --store 'unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' --eval-store local --command cargo -- fmt --all -- --check
- nix 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 develop --store 'unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' --eval-store local .#ci --command alejandra -- --check .
- nix develop --store 'unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' --eval-store local .#ci --command markdown-link-check README.md
# Test
- nix develop --command cargo test --verbose --release
- nix develop --command cargo test --verbose
# Run through Nix
- nix build
- nix run
volumes:
- "/nix:/mnt/nix:ro"
when:
evaluate: '(CI_BUILD_EVENT == "push" && CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) || (CI_BUILD_EVENT == "pull_request")'