From 7692f4237438b57e8d48e1cf45eef855d4e07dfa Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 29 Feb 2024 20:59:49 +0100 Subject: [PATCH] ci: Build on FreeBSD only when build workflow runs This prevents running the freebsd build when only tests or docs change. --- .cirrus.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 271c05751a..cee5d37563 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -5,6 +5,24 @@ build_task: name: Build FreeBSD (Stack) install_script: pkg install -y postgresql16-client hs-stack git + # This also includes nix and cabal related files, because the + # Github Actions build workflow will run on those and the + # "Fetch from FreeBSD" job should not fail. + only_if: | + changesInclude( + '.github/workflows/build.yaml', + '.github/actions/setup-nix/**', + '.github/scripts/**', + '.github/*', + '*.nix', + 'nix/**', + '.cirrus.yml', + 'cabal.project*', + 'postgrest.cabal', + 'stack.yaml*', + '**.hs' + ) + stack_cache: folders: /.stack fingerprint_script: cat postgrest.cabal stack.yaml.lock