From 7a781b04e50727e0d2fc416b012e0d2f7129e88a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 25 Mar 2022 20:59:28 -1000 Subject: [PATCH] fix: ci: restore stack.yaml as a regular file to fix CI Github actions `hashFiles()` may not like symlinks, see comment in push.yml. --- .github/workflows/push.yml | 3 +++ stack.yaml | 40 +++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) mode change 120000 => 100644 stack.yaml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 25223fa95..0f678e775 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -100,6 +100,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.stack + # XXX if stack.yaml is a symlink, this fails with + # Error: The template is not valid. .github/workflows/push.yml (Line: 103, Col: 14): hashFiles('**.yaml') failed. + # Fail to hash files under directory '/home/runner/work/hledger/hledger' key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }} restore-keys: | ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }} diff --git a/stack.yaml b/stack.yaml deleted file mode 120000 index 8a42bda6b..000000000 --- a/stack.yaml +++ /dev/null @@ -1 +0,0 @@ -stack9.0.yaml \ No newline at end of file diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 000000000..d832ca2de --- /dev/null +++ b/stack.yaml @@ -0,0 +1,39 @@ +# stack build plan using GHC 9.0.2 + +nix: + pure: false + packages: [perl gmp ncurses zlib] + +resolver: nightly-2022-03-03 + +# for https://gitlab.haskell.org/ghc/ghc/-/issues/20592 on mac m1 (adjust path if needed) +extra-include-dirs: +- /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/ffi + +packages: +- hledger-lib +- hledger +- hledger-ui +- hledger-web + +#extra-deps: +# for hledger-lib: +# for hledger: +# for hledger-ui: +# for hledger-web: +# for Shake.hs: + +# for precise profiling, per https://www.tweag.io/posts/2020-01-30-haskell-profiling.html: +# apply-ghc-options: everything +# rebuild-ghc-options: true +# stack build --profile --ghc-options="-fno-prof-auto" + +# tell GHC to write hie files, eg for weeder. Rumoured to be slow. +# ghc-options: +# "$locals": -fwrite-ide-info + +# ghc-options: +# "$locals": -ddump-timings +# "$targets": -Werror +# "$everything": -O2 +# some-package: -DSOME_CPP_FLAG