From 6f1b8b4041f578429c26bd7c1f9086675c9f67c7 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 11 Aug 2020 12:12:15 +0200 Subject: [PATCH] Fix build on 32bit --- .gitlab-ci.yml | 3 +++ .gitlab/script/ghcup_version.sh | 12 +++++++++--- ghcup-0.0.2.yaml | 8 ++++++-- ghcup.cabal | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 990daf2..d5c46ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,7 @@ variables: - x86_64-linux variables: OS: "LINUX" + BIT: "64" .alpine:64bit: image: "alpine:edge" @@ -36,12 +37,14 @@ variables: - x86_64-darwin variables: OS: "DARWIN" + BIT: "64" .freebsd: tags: - x86_64-freebsd variables: OS: "FREEBSD" + BIT: "64" .root_cleanup: after_script: diff --git a/.gitlab/script/ghcup_version.sh b/.gitlab/script/ghcup_version.sh index 1c410a8..baf3c55 100755 --- a/.gitlab/script/ghcup_version.sh +++ b/.gitlab/script/ghcup_version.sh @@ -22,14 +22,20 @@ ecabal update if [ "${OS}" = "DARWIN" ] ; then ecabal build -w ghc-${GHC_VERSION} -ftui +elif [ "${OS}" = "LINUX" ] ; then + if [ "${BIT}" = "32" ] ; then + ecabal build -w ghc-${GHC_VERSION} -finternal-downloader -ftui -ftar + else + ecabal build -w ghc-${GHC_VERSION} -finternal-downloader -ftui + fi else ecabal build -w ghc-${GHC_VERSION} -finternal-downloader -ftui fi -ecabal haddock +ecabal haddock -w ghc-${GHC_VERSION} -ftar -cp "$(ecabal new-exec --enable-tests --verbose=0 --offline sh -- -c 'command -v ghcup')" . -cp "$(ecabal new-exec --enable-tests --verbose=0 --offline sh -- -c 'command -v ghcup-gen')" . +cp "$(ecabal new-exec -w ghc-${GHC_VERSION} --enable-tests --verbose=0 --offline sh -- -c 'command -v ghcup')" . +cp "$(ecabal new-exec -w ghc-${GHC_VERSION} --enable-tests --verbose=0 --offline sh -- -c 'command -v ghcup-gen')" . cp ./ghcup "$CI_PROJECT_DIR"/.local/bin/ghcup cp ./ghcup-gen "$CI_PROJECT_DIR"/.local/bin/ghcup-gen diff --git a/ghcup-0.0.2.yaml b/ghcup-0.0.2.yaml index 873de2f..82eb2ca 100644 --- a/ghcup-0.0.2.yaml +++ b/ghcup-0.0.2.yaml @@ -1305,7 +1305,7 @@ ghcupDownloads: viArch: A_64: Linux_UnknownLinux: - unknown_versioning: + unknown_versioning: &ghcup-64 dlUri: https://downloads.haskell.org/~ghcup/0.1.8/x86_64-linux-ghcup-0.1.8 dlHash: 7ffcd4c3de156e895b648c75a36c762be2a4932883f3cd598f7a483c97d4a8a9 Darwin: @@ -1316,8 +1316,12 @@ ghcupDownloads: unknown_versioning: dlUri: https://downloads.haskell.org/~ghcup/0.1.8/x86_64-portbld-freebsd-ghcup-0.1.8 dlHash: 442cdfe1b4525a327d9566e6270f909f7deba21c16dd4c7912537cf67e6cd521 + Linux_Alpine: + unknown_versioning: *ghcup-64 A_32: Linux_UnknownLinux: - unknown_versioning: + unknown_versioning: &ghcup-32 dlUri: https://downloads.haskell.org/~ghcup/0.1.8/i386-linux-ghcup-0.1.8 dlHash: 18ab162920cea662feae4b08f39d3879e9e416fde7b734afd8072c39d3c43cde + Linux_Alpine: + unknown_versioning: *ghcup-32 diff --git a/ghcup.cabal b/ghcup.cabal index 4f9c0cd..5464209 100644 --- a/ghcup.cabal +++ b/ghcup.cabal @@ -112,7 +112,7 @@ common io-streams build-depends: io-streams >=1.5 common libarchive - build-depends: libarchive >= 2.2.5.2 + build-depends: libarchive >= 2.2.5.0 common lzma build-depends: lzma >=0.0.0.3