From aefac8467049947e4c1ee96694e7aec3e0648d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Sat, 5 Mar 2022 10:04:36 +0800 Subject: [PATCH 1/5] Clear stack cache and make cache-key more fine-grained Attempt at fixing #137 --- .github/workflows/build-all-versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 9ab8a0622..33cc3668d 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -84,7 +84,7 @@ jobs: name: Cache ~/.stack with: path: ~/.stack - key: ${{ runner.os }}-${{ matrix.ghc }}-stack + key: ${{ runner.os }}-${{ matrix.ghc }}-stack--${{ hashFiles(format('stack-ghc{0}', matrix.ghc)) }} - name: Build run: | From bfd8f9c16db01da0b0ed31186f4388ccebde56ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Sat, 5 Mar 2022 10:42:10 +0800 Subject: [PATCH 2/5] Upgrade haskell setup action --- .github/workflows/build-all-versions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 33cc3668d..45b14ee77 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: haskell/actions/setup@v1 + - uses: haskell/actions/setup@v1.2.9 id: setup-haskell-cabal name: Setup Haskell with: @@ -73,7 +73,7 @@ jobs: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: haskell/actions/setup@v1 + - uses: haskell/actions/setup@v1.2.9 name: Setup Haskell Stack with: ghc-version: ${{ matrix.ghc }} From 4caf6d684e1c236600563b4a9f3ed698111a05f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Sat, 5 Mar 2022 11:20:39 +0800 Subject: [PATCH 3/5] Another attempt at fixing linker errors --- .github/workflows/build-all-versions.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 45b14ee77..2217388db 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -80,6 +80,11 @@ jobs: stack-version: 'latest' enable-stack: true + + # Fix linker errrors on ghc-7.10.3 for ubuntu (see https://github.com/commercialhaskell/stack/blob/255cd830627870cdef34b5e54d670ef07882523e/doc/faq.md#i-get-strange-ld-errors-about-recompiling-with--fpic) + - run: sed -i.bak 's/"C compiler link flags", "/&-no-pie /' /home/runner/.ghcup/ghc/7.10.3/lib/ghc-7.10.3/settings + if: matrix.ghc == '7.10.3' + - uses: actions/cache@v1 name: Cache ~/.stack with: From 05fc093b5e067ea7250398647fd074acb79e4f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Sat, 5 Mar 2022 11:47:46 +0800 Subject: [PATCH 4/5] Add restore key to cache --- .github/workflows/build-all-versions.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 2217388db..3472fa92b 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -90,6 +90,8 @@ jobs: with: path: ~/.stack key: ${{ runner.os }}-${{ matrix.ghc }}-stack--${{ hashFiles(format('stack-ghc{0}', matrix.ghc)) }} + restore-keys: | + ${{ runner.os }}-${{ matrix.ghc }}-stack - name: Build run: | From 308f4773dc8f939ca66977382047f734752d1ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Sat, 5 Mar 2022 12:13:45 +0800 Subject: [PATCH 5/5] Upgrade to ghc-8.10.7 This version has better support for m1 macbooks --- .github/workflows/build-all-versions.yml | 4 ++-- stack-ghc8.10.4.yaml | 14 -------------- stack-ghc8.10.7.yaml | 12 ++++++++++++ stack.yaml | 9 +++------ 4 files changed, 17 insertions(+), 22 deletions(-) delete mode 100644 stack-ghc8.10.4.yaml create mode 100644 stack-ghc8.10.7.yaml diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 3472fa92b..445493065 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -18,7 +18,7 @@ jobs: ghc: - "8.6.5" - "8.8.3" - - "8.10.1" + - "8.10.7" exclude: - os: macos-latest ghc: 8.8.3 @@ -66,7 +66,7 @@ jobs: strategy: matrix: stack: ["latest"] - ghc: ["7.10.3","8.0.2", "8.2.2", "8.4.4", "8.6.5", "8.8.4"] + ghc: ["7.10.3","8.0.2", "8.2.2", "8.4.4", "8.6.5", "8.8.4", "8.10.7"] # ghc: ["8.8.3"] steps: diff --git a/stack-ghc8.10.4.yaml b/stack-ghc8.10.4.yaml deleted file mode 100644 index b10f66e4f..000000000 --- a/stack-ghc8.10.4.yaml +++ /dev/null @@ -1,14 +0,0 @@ -resolver: lts-18.0 # ghc 8.10.4 - -extra-deps: -- network-2.6.3.6 -- httpd-shed-0.4.0.3 -- cgi-3001.5.0.0@sha256:3d1193a328d5f627a021a0ef3927c1ae41dd341e32dba612fed52d0e3a6df056,2990 -- json-0.10@sha256:d9fc6b07ce92b8894825a17d2cf14799856767eb30c8bf55962baa579207d799,3210 -- multipart-0.2.0@sha256:b8770e3ff6089be4dd089a8250894b31287cca671f3d258190a505f9351fa8a9,1084 - -# flags: -# gf: -# c-runtime: true -# extra-lib-dirs: -# - /usr/local/lib diff --git a/stack-ghc8.10.7.yaml b/stack-ghc8.10.7.yaml new file mode 100644 index 000000000..4b3f6643a --- /dev/null +++ b/stack-ghc8.10.7.yaml @@ -0,0 +1,12 @@ +resolver: lts-18.27 # ghc 8.10.7 + +extra-deps: +- network-2.6.3.6 +- httpd-shed-0.4.0.3 + +# flags: +# gf: +# server: true +# c-runtime: true +# extra-lib-dirs: +# - /usr/local/lib diff --git a/stack.yaml b/stack.yaml index 3a79afdf0..128b91f8a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,18 +1,15 @@ -# This default stack file is a copy of stack-ghc8.10.4.yaml +# This default stack file is a copy of stack-ghc8.10.7.yaml # But committing a symlink can be problematic on Windows, so it's a real copy. # See: https://github.com/GrammaticalFramework/gf-core/pull/106 - -resolver: lts-18.0 # ghc 8.10.4 +resolver: lts-18.27 # ghc 8.10.7 extra-deps: - network-2.6.3.6 - httpd-shed-0.4.0.3 -- cgi-3001.5.0.0@sha256:3d1193a328d5f627a021a0ef3927c1ae41dd341e32dba612fed52d0e3a6df056,2990 -- json-0.10@sha256:d9fc6b07ce92b8894825a17d2cf14799856767eb30c8bf55962baa579207d799,3210 -- multipart-0.2.0@sha256:b8770e3ff6089be4dd089a8250894b31287cca671f3d258190a505f9351fa8a9,1084 # flags: # gf: +# server: true # c-runtime: true # extra-lib-dirs: # - /usr/local/lib