You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# GOAL: get the cabal caches into the mounted folder so they persist outside the Docker run lifetime and we don't needlessly rebuild hundreds of super expensive deps repeatedly forever
60
+
# This is documented but doesn't seem to work https://cabal.readthedocs.io/en/3.6/installing-packages.html#environment-variables
61
+
export CABAL_DIR=/root/cache/cabal
62
+
export STACK_ROOT=/root/cache/stack
63
+
export STACK_WORK=/root/cache/stack-work
64
+
65
+
mkdir -p /root/cache/cabal ||true
66
+
ln -sf /root/cache/cabal ~/.cabal
67
+
68
+
cabal update
21
69
22
-
mkdir -p distribution/dist # Ensure the dist directory is present
70
+
# GOAL: pin our dependencies so we can build them one by one
71
+
# We do this once outside of the build script, see distribution/sync-cabal-freeze.sh
72
+
# We have to freeze the deps to get a cohesive deps set, otherwise `cabal build <dep>` will install the latest version instead of the one we need
# GOAL: get a suitable build environment with GHC & Cabal build for x86_64 in an Alpine container using MUSL instead of GLIBC, so we can build portable static binaries
97
+
98
+
# For manual testing drop a `bash` line wherever you'd like within build_binary_docker and re-run this script
0 commit comments