diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000..a9b5cad --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,7 @@ +task: + name: FreeBSD + freebsd_instance: + image_family: freebsd-14-0 + install_script: pkg install -y ghc hs-cabal-install git autoconf bash + script: + - ./.cirrus/ci.sh build_freebd diff --git a/.cirrus/ci.sh b/.cirrus/ci.sh new file mode 100755 index 0000000..18ba687 --- /dev/null +++ b/.cirrus/ci.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -xEeuo pipefail + +build_freebsd() { + export GHCUP_INSTALL_BASE_PREFIX="/opt/ghc/" + mkdir -p ~/.local/ghcup/bin/ + curl -L https://downloads.haskell.org/~ghcup/x86_64-portbld-freebsd-ghcup --output /opt/ghcup/bin/ghcup + chmod +x /opt/ghcup/bin/ghcup + ghcup install ghc 9.8.2 + ghcup set ghc 9.8.2 + ghcup install cabal 3.12.1.0 +} + +help() { + echo "Run with \`build_freebsd\`" +} + +case ${1:-help} in + help) help ;; + build_frebsd) build_freebsd ;; + +esac