88 lines
2.3 KiB
YAML
88 lines
2.3 KiB
YAML
when:
|
|
- repo: wvhulle/bootvine
|
|
event: [pull_request, push, manual]
|
|
|
|
variables:
|
|
- &nix_config
|
|
NIX_CONFIG: |
|
|
experimental-features = nix-command flakes
|
|
build-users-group =
|
|
accept-flake-config = true
|
|
- &cache_writing_env
|
|
<<: *nix_config
|
|
CACHIX_AUTH_TOKEN:
|
|
from_secret: cachix_auth_token
|
|
- &on_main_branch
|
|
- event: [push, manual]
|
|
branch: main
|
|
- &off_main_branch
|
|
- event: pull_request
|
|
- event: [push, manual]
|
|
branch:
|
|
exclude: main
|
|
- &on_pull_requests
|
|
- event: pull_request
|
|
|
|
steps:
|
|
- name: build-test-and-cache-bootvine
|
|
image: nixos/nix:latest
|
|
depends_on: []
|
|
when: *on_main_branch
|
|
environment: *cache_writing_env
|
|
commands:
|
|
- nix run .#build-and-push-to-cachix -- .#checks.x86_64-linux.bootvine-build
|
|
|
|
- name: build-and-test-bootvine
|
|
image: nixos/nix:latest
|
|
depends_on: []
|
|
when: *off_main_branch
|
|
environment: *nix_config
|
|
commands:
|
|
- nix build --print-build-logs .#checks.x86_64-linux.bootvine-build
|
|
|
|
- name: build-and-cache-repo-tasks
|
|
image: nixos/nix:latest
|
|
depends_on: []
|
|
when: *on_main_branch
|
|
environment: *cache_writing_env
|
|
commands:
|
|
- nix run .#build-and-push-to-cachix -- .#checks.x86_64-linux.repo-tasks-build
|
|
|
|
- name: build-repo-tasks
|
|
image: nixos/nix:latest
|
|
depends_on: []
|
|
when: *off_main_branch
|
|
environment: *nix_config
|
|
commands:
|
|
- nix build --print-build-logs .#checks.x86_64-linux.repo-tasks-build
|
|
|
|
- name: lint-rust-with-clippy
|
|
image: nixos/nix:latest
|
|
depends_on: []
|
|
environment: *nix_config
|
|
commands:
|
|
- nix build --print-build-logs .#checks.x86_64-linux.clippy-lints
|
|
|
|
- name: check-rust-formatting
|
|
image: nixos/nix:latest
|
|
depends_on: []
|
|
environment: *nix_config
|
|
commands:
|
|
- nix build --print-build-logs .#checks.x86_64-linux.rustfmt-formatting
|
|
|
|
- name: evaluate-flake-outputs
|
|
image: nixos/nix:latest
|
|
depends_on: []
|
|
environment: *nix_config
|
|
commands:
|
|
- nix flake check --no-build
|
|
|
|
- name: check-conventional-commit-messages
|
|
image: nixos/nix:latest
|
|
depends_on: []
|
|
when: *on_pull_requests
|
|
environment: *nix_config
|
|
commands:
|
|
- git fetch --quiet origin "$${CI_COMMIT_TARGET_BRANCH}"
|
|
- nix run .#check-conventional-commits -- FETCH_HEAD..HEAD
|