This commit is contained in:
2022-12-20 20:49:10 +08:00
parent 9c4cec0e3f
commit 64eaa720c0
2 changed files with 18 additions and 2 deletions

View File

@@ -11,6 +11,10 @@ if ! command -v ghcup ; then
install_ghcup
fi
if [ "${RUNNER_OS}" = "macOS" ] ; then
rm -rf "${CABAL_DIR}"/store/*
fi
# ensure ghc
ghcup install ghc --set 8.10.7
@@ -21,10 +25,15 @@ cabal --version
cabal update
git clone --single-branch --branch main https://github.com/hasufell/cabal-cache.git
git clone --single-branch --branch main https://github.com/haskell-works/cabal-cache.git
cd cabal-cache
cabal build
if [ "${DISTRO}" = "Alpine" ] ; then
cabal build --ghc-options='-split-sections -optl-static'
else
cabal build
fi
binary=$(cabal list-bin cabal-cache)
cd ..

View File

@@ -146,6 +146,12 @@ jobs:
path: |
./out/*
- if: always()
uses: docker://arm64v8/ubuntu:focal
name: Cleanup (aarch64 linux)
with:
args: rm -rf .ghcup/ cabal/ dist-newstyle/ out/ cabal-cache
build-macwin:
name: Build binary (Mac/Win)
runs-on: ${{ matrix.os }}
@@ -197,3 +203,4 @@ jobs:
name: artifacts
path: |
./out/*