Compare commits

..

3 Commits

Author SHA1 Message Date
Smaug123
2f1e6e2d31 Names are magic?
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/ci-specific Pipeline failed
ci/woodpecker/push/run Pipeline failed
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/pr/ci-specific Pipeline failed
ci/woodpecker/pr/run Pipeline failed
ci/woodpecker/push/all-checks-complete unknown status
ci/woodpecker/pr/all-checks-complete unknown status
2023-07-20 18:22:53 +01:00
Smaug123
92ca8f0be3 Skip clone 2023-07-20 18:19:32 +01:00
Smaug123
9e910a651e Woodpecker pipelines 2023-07-20 18:12:07 +01:00
5 changed files with 21 additions and 18 deletions

View File

@@ -1,10 +1,12 @@
pipeline:
echo:
nix:
image: alpine
commands:
- echo "All required checks complete"
depends_on:
- run
- build
- ci-specific
skip_clone: true

View File

@@ -2,21 +2,10 @@ 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")'
lint:
image: nixos/nix
commands:
- nix develop --command cargo -- fmt --all -- --check
- nix develop --command cargo -- clippy -- -D warnings -W clippy::must_use_candidate

View File

@@ -0,0 +1,7 @@
pipeline:
alejandra:
image: nixos/nix
commands:
- nix develop .#ci --command alejandra -- --check .
- nix develop .#ci --command markdown-link-check README.md

6
.woodpecker/.run.yml Normal file
View File

@@ -0,0 +1,6 @@
pipeline:
nix:
image: nixos/nix
commands:
- nix build
- nix run

View File

@@ -1,6 +1,5 @@
# The Little Learner, in Rust
[![Rust](https://github.com/Smaug123/little_learner/actions/workflows/rust.yml/badge.svg)](https://github.com/Smaug123/little_learner/actions/workflows/rust.yml)
[![CI](https://woodpecker.patrickstevens.co.uk/api/badges/patrick/little_learner/status.svg)](https://woodpecker.patrickstevens.co.uk/api/badges/patrick/little_learner/status.svg)
Me running through [The Little Learner](https://www.thelittlelearner.com/), but in Rust instead of Scheme.