Skip to content

Commit eb80184

Browse files
committed
Try something naive
1 parent 836f1cd commit eb80184

2 files changed

Lines changed: 29 additions & 5 deletions

File tree

.cirrus.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,15 @@ task:
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+
- ./.cirrus/ci.sh setup_freebsd
8+
- ./.cirrus/ci.sh configure_freebsd
9+
haskell_cache:
10+
folder: ~/.cabal/store
11+
fingerprint_script:
12+
- export PLAN_HASH=$(sha256sum ./dist-newstyle/cache/plan.json | awk '{print $1}')
13+
- echo "ghc-9.8.2-$PLAN_HASH"
14+
615
script:
7-
- ./.cirrus/ci.sh build_freebd
16+
- ./.cirrus/ci.sh build_freebsd
17+
- ./.cirrus/ci.sh test_freebsd

.cirrus/ci.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,36 @@
22

33
set -xEeuo pipefail
44

5-
build_freebsd() {
5+
setup_freebsd() {
66
export GHCUP_INSTALL_BASE_PREFIX="/opt/ghc/"
77
mkdir -p ~/.local/ghcup/bin/
88
curl -L https://downloads.haskell.org/~ghcup/x86_64-portbld-freebsd-ghcup --output /opt/ghcup/bin/ghcup
99
chmod +x /opt/ghcup/bin/ghcup
1010
ghcup install ghc 9.8.2
1111
ghcup set ghc 9.8.2
1212
ghcup install cabal 3.12.1.0
13+
cabal update
14+
}
15+
16+
configure_freebsd() {
17+
cabal freeze --project-file=cabal.release.project
18+
}
19+
20+
build_freebsd() {
21+
cabal build --project-file=cabal.release.project all -j
22+
}
23+
24+
test_freebsd() {
25+
cabal test --project-file=cabal.release.project all -j
1326
}
1427

1528
help() {
16-
echo "Run with \`build_freebsd\`"
29+
echo "Run with setup_freebsd, configure_freebsd, build_freebsd or test_freebsd."
1730
}
1831

1932
case ${1:-help} in
2033
help) help ;;
21-
build_frebsd) build_freebsd ;;
22-
34+
setup_freebsd) setup_freebsd ;;
35+
build_freebsd) build_freebsd ;;
36+
test_freebsd) test_freebsd ;;
2337
esac

0 commit comments

Comments
 (0)