1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# One job, because the flake is the build.
#
# This used to be a kaniko pipeline whose only purpose was to publish the
# container image buck2's remote executor pulled; nothing about it ran the
# build. `nix flake check` runs fmt, clippy, the test suite and all three
# shared objects, and it pins what it runs with.
stages: [check]
check:
stage: check
image: nixos/nix:latest
variables:
# The flake is fetched from the checkout, so the runner needs the git tree
# rather than a shallow single commit.
GIT_DEPTH: "0"
before_script:
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
script:
- nix flake check -L
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|