From a8b3ea09e27f4031e7ce1b12f4130a725b44ec08 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Mon, 2 May 2022 12:39:01 +0100 Subject: ci: Add job to check that jobs.yaml is up-to-date There have been quite a few situations where jobs.yaml has been out of date. It's better to add a CI job which checks that it's right. We don't want to use a staged pipeline because it obfuscates the structure of the pipeline. --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57535cd2b7..957259619c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -250,6 +250,28 @@ lint-author: - if: $CI_MERGE_REQUEST_ID - *drafts-can-fail-lint +lint-ci-config: + image: "nixos/nix:2.8.0" + extends: .lint + variables: + BUILD_FLAVOUR: default + before_script: + - mkdir -p ~/.cabal + - cp -Rf cabal-cache/* ~/.cabal || true + script: + - nix shell --extra-experimental-features nix-command --extra-experimental-features flakes nixpkgs#cabal-install -c cabal update + - .gitlab/generate_jobs + # 1 if .gitlab/generate_jobs changed the output of the generated config + - nix shell --extra-experimental-features nix-command --extra-experimental-features flakes nixpkgs#git -c git diff --exit-code + after_script: + - rm -Rf cabal-cache + - cp -Rf ~/.cabal cabal-cache + dependencies: [] + cache: + key: lint-ci-$CACHE_REV + paths: + - cabal-cache + lint-submods: extends: .lint-submods # Allow failure on merge requests since any necessary submodule patches may -- cgit v1.2.1