Skip to content

Commit

Permalink
Merge pull request #19 from tchoutri/use-cirrus-for-bsd-ci
Browse files Browse the repository at this point in the history
Start FreeBSD CI
  • Loading branch information
tchoutri committed Jul 22, 2024
2 parents 85a3eb5 + 92bac3a commit 836f1cd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions .cirrus/ci.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 836f1cd

Please sign in to comment.