From af289c2f5415f1923d59e2543649230dd96fe239 Mon Sep 17 00:00:00 2001 From: Misha Puzanov Date: Wed, 19 Oct 2022 14:42:35 +0200 Subject: [PATCH 1/2] Switch to GHC 8.10.7 --- .github/workflows/ci.yml | 2 +- .github/workflows/static-build.yml | 2 +- package.yaml | 5 +---- src/RPKI/Orphans/Serialise.hs | 3 --- stack.yaml | 3 ++- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d318274..485e474f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v2 - uses: haskell/actions/setup@v1 with: - ghc-version: '8.10.4' + ghc-version: '8.10.7' enable-stack: true stack-version: 'latest' - name: Cache diff --git a/.github/workflows/static-build.yml b/.github/workflows/static-build.yml index f0e80d02..179c157f 100644 --- a/.github/workflows/static-build.yml +++ b/.github/workflows/static-build.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v2 - uses: haskell/actions/setup@v1 with: - ghc-version: '8.10.4' + ghc-version: '8.10.7' enable-stack: true stack-version: 'latest' - diff --git a/package.yaml b/package.yaml index ce8cfcdf..6dac61d8 100644 --- a/package.yaml +++ b/package.yaml @@ -168,10 +168,7 @@ tests: - -threaded - -rtsopts - -with-rtsopts=-N - # - -static - - -O2 - # cc-options: -static - # ld-options: -static -pthread + - -O2 dependencies: - rpki-prover - QuickCheck diff --git a/src/RPKI/Orphans/Serialise.hs b/src/RPKI/Orphans/Serialise.hs index 3263f074..e1073894 100644 --- a/src/RPKI/Orphans/Serialise.hs +++ b/src/RPKI/Orphans/Serialise.hs @@ -109,9 +109,6 @@ deriving instance (Ord a, Serialise a) => Serialise (NESet a) deriving instance (Ord a, Serialise a, Serialise b) => Serialise (MonoidalMap a b) -deriving instance (Serialise a, Serialise b) => Serialise (These a b) - - instance (Serialise CPid) where encode (CPid i) = encode i decode = CPid <$> decode diff --git a/stack.yaml b/stack.yaml index afa92502..1f1fb30a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -20,7 +20,8 @@ # resolver: https://example.com/snapshots/2018-01-01.yaml # resolver: lts-16.31 # resolver: nightly-2022-03-20 -resolver: lts-18.6 +resolver: lts-18.28 +# resolver: lts-18.6 # User packages to be built. # Various formats can be used as shown in the example below. From 20302fd865ff8d5ad3551d886fef0b3f82a93ee5 Mon Sep 17 00:00:00 2001 From: Misha Puzanov Date: Wed, 19 Oct 2022 14:42:47 +0200 Subject: [PATCH 2/2] Update LMDB source link --- Dockerfile.static-builder | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile.static-builder b/Dockerfile.static-builder index b99a069c..4808ec60 100644 --- a/Dockerfile.static-builder +++ b/Dockerfile.static-builder @@ -1,10 +1,11 @@ -FROM utdemir/ghc-musl:v20-ghc8104 as rpki-prover-builder +# FROM utdemir/ghc-musl:v20-ghc8104 as rpki-prover-builder +FROM utdemir/ghc-musl:v24-ghc8107 as rpki-prover-builder RUN apk add --update --no-cache expat-dev lmdb-dev lmdb expat-static lmdb # There's no statically linked version of LMDB, so we build it from the sources here -RUN wget https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz && \ - tar xzf openldap-LMDB_0.9.29.tar.gz && \ - cd openldap-LMDB_0.9.29/libraries/liblmdb && \ +RUN wget https://github.com/LMDB/lmdb/archive/refs/tags/LMDB_0.9.29.tar.gz && \ + tar xzf LMDB_0.9.29.tar.gz && \ + cd lmdb-LMDB_0.9.29/libraries/liblmdb && \ make && cp liblmdb.a /usr/lib