This now behaves similar to other CI build jobs, which always run on the main branches, but only conditionally on PRs, depending on which files changed.
38 lines
961 B
YAML
38 lines
961 B
YAML
freebsd_instance:
|
|
image_family: freebsd-14-0
|
|
|
|
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: |
|
|
$CIRRUS_TAG != '' || $CIRRUS_BRANCH == 'main' || $CIRRUS_BRANCH =~ 'v*' ||
|
|
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
|
|
reupload_on_changes: false
|
|
|
|
build_script: |
|
|
stack build -j 1 --local-bin-path . --copy-bins
|
|
strip postgrest
|
|
|
|
bin_artifacts:
|
|
path: postgrest
|