File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 freebsd_instance :
44 image_family : freebsd-14-0
55 install_script : pkg install -y ghc hs-cabal-install git autoconf bash
6+ setup_script :
7+ - export PATH=$HOME/.local/ghcup/bin:/opt/ghcup/bin:$PATH
8+ - ./.cirrus/ci.sh setup_freebsd
9+ - ./.cirrus/ci.sh configure_freebsd
10+ haskell_cache :
11+ folder : ~/.cabal/store
12+ fingerprint_script :
13+ - export PLAN_HASH=$(sha256sum ./dist-newstyle/cache/plan.json | awk '{print $1}')
14+ - echo "ghc-9.8.2-$PLAN_HASH"
15+
616 script :
7- - ./.cirrus/ci.sh build_freebd
17+ - ./.cirrus/ci.sh build_freebsd
18+ - ./.cirrus/ci.sh test_freebsd
Original file line number Diff line number Diff line change 22
33set -xEeuo pipefail
44
5- build_freebsd () {
5+ setup_freebsd () {
66 export GHCUP_INSTALL_BASE_PREFIX=" /opt/ghc/"
7- mkdir -p ~ /.local/ghcup/bin/
7+ mkdir -p $HOME /.local/ghcup/bin/
8+ mkdir -p /opt/ghcup/bin/
9+ export PATH=$HOME /.local/ghcup/bin:/opt/ghcup/bin:$PATH
810 curl -L https://downloads.haskell.org/~ghcup/x86_64-portbld-freebsd-ghcup --output /opt/ghcup/bin/ghcup
911 chmod +x /opt/ghcup/bin/ghcup
1012 ghcup install ghc 9.8.2
1113 ghcup set ghc 9.8.2
1214 ghcup install cabal 3.12.1.0
15+ cabal update
16+ }
17+
18+ configure_freebsd () {
19+ cabal freeze --project-file=cabal.release.project
20+ }
21+
22+ build_freebsd () {
23+ cabal build --project-file=cabal.release.project all -j
24+ }
25+
26+ test_freebsd () {
27+ cabal test --project-file=cabal.release.project all -j
1328}
1429
1530help () {
16- echo " Run with \` build_freebsd\` "
31+ echo " Run with setup_freebsd, configure_freebsd, build_freebsd or test_freebsd. "
1732}
1833
1934case ${1:- help} in
2035 help) help ;;
21- build_frebsd) build_freebsd ;;
22-
36+ setup_freebsd) setup_freebsd ;;
37+ build_freebsd) build_freebsd ;;
38+ test_freebsd) test_freebsd ;;
2339esac
You can’t perform that action at this time.
0 commit comments