From f27806ec35c19273aa1e856a4642b5b2632ba1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Mon, 22 Jul 2024 16:25:02 +0200 Subject: [PATCH 1/2] Start FreeBSD CI --- .cirrus.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000..0db65d7 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,8 @@ +task: + name: FreeBSD + freebsd_instance: + image_family: freebsd-14-0 + install_script: pkg install -y ghc hs-cabal-install git autoconf + script: + - cabal update + - cabal test --project-file=cabal.release.project --test-show-details=direct all From 92bac3a25ffe601084a2b5c6a35dd11bca9d5ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Mon, 22 Jul 2024 16:44:43 +0200 Subject: [PATCH 2/2] strike 2 --- .cirrus.yml | 5 ++--- .cirrus/ci.sh | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100755 .cirrus/ci.sh diff --git a/.cirrus.yml b/.cirrus.yml index 0db65d7..a9b5cad 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,7 +2,6 @@ task: name: FreeBSD freebsd_instance: image_family: freebsd-14-0 - install_script: pkg install -y ghc hs-cabal-install git autoconf + install_script: pkg install -y ghc hs-cabal-install git autoconf bash script: - - cabal update - - cabal test --project-file=cabal.release.project --test-show-details=direct all + - ./.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