Skip to content
Snippets Groups Projects
Verified Commit 26975eeb authored by Julian Ospald's avatar Julian Ospald :tea:
Browse files

Run 'cabal update' only once

parent a79ca077
No related branches found
No related tags found
2 merge requests!86Bump GHC 9.0,!80Reduce image size
Pipeline #41884 failed
Pipeline: ci-images

#41885

    ......@@ -11,7 +11,6 @@ let
    CF.run "build haskell tools"
    [ "mkdir -p ${outDir}/store"
    , "$CABAL user-config update"
    , "$CABAL v2-update"
    -- We must override store-dir lest data files end up in
    -- /root/.cabal, which isn't accessible to the build user
    , ''
    ......
    ......@@ -97,9 +97,9 @@ let
    # installDepsStep
    # fetchGhcStep (Ghc.Bindist.BindistSpec { version = ghcVersion, triple = "x86_64-alpine3.10-linux-integer-simple" })
    # Cabal.install (Cabal.Type.FromBindist "https://downloads.haskell.org/~cabal/cabal-install-3.4.0.0/cabal-install-3.4.0.0-x86_64-alpine-3.11.6-static-noofd.tar.xz")
    # CF.run "update cabal index" [ "$CABAL update"]
    # HaskellTools.build
    # createUserStep
    # CF.run "update cabal index" [ "$CABAL update"]
    # [ CF.Statement.Cmd ["bash"] ]
    },
    Image ::
    ......@@ -111,9 +111,9 @@ let
    # installDepsStep
    # fetchGhcStep (Ghc.Bindist.BindistURL "https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/8.10.2/ghc-8.10.2-i386-alpine-linux.tar.xz")
    # Cabal.install (Cabal.Type.FromBindist "https://downloads.haskell.org/~ghcup/unofficial-bindists/cabal/3.4.0.0/cabal-install-3.4.0.0-i386-alpine-linux-musl.tar.gz")
    # CF.run "update cabal index" [ "$CABAL update"]
    # HaskellTools.build
    # createUserStep
    # CF.run "update cabal index" [ "$CABAL update"]
    # [ CF.Statement.Cmd ["bash"] ]
    }
    ]
    ......
    ......@@ -133,11 +133,11 @@ let
    # Cabal.install (Cabal.fromUpstreamBindist { version = "3.2.0.0", triple = "x86_64-unknown-linux" })
    -- install hscolour, alex, and happy
    # CF.run "update cabal index" [ "$CABAL update"]
    # HaskellTools.build
    # nsswitchWorkaround
    # createUserStep
    # CF.run "update cabal index" [ "$CABAL update"]
    # [ CF.Statement.Cmd ["bash"] ]
    in
    ......
    ......@@ -169,10 +169,10 @@ let
    # Cabal.install opts.cabalSource
    -- install hscolour, alex, and happy
    # CF.run "update cabal index" [ "$CABAL update"]
    # HaskellTools.build
    # createUserStep
    # CF.run "update cabal index" [ "$CABAL update"]
    # [ CF.Statement.Cmd ["bash"] ]
    in Image::{ name = opts.name, runnerTags = opts.runnerTags, image = image }
    ......
    ......@@ -142,11 +142,11 @@ let
    # Cabal.install opts.cabalSource
    -- install hscolour, alex, and happy
    # CF.run "update cabal index" [ "$CABAL update"]
    # HaskellTools.build
    # nsswitchWorkaround
    # createUserStep
    # CF.run "update cabal index" [ "$CABAL update"]
    # [ CF.Statement.Cmd ["bash"] ]
    in Image::{ name = opts.name, runnerTags = opts.runnerTags, image = image }
    ......
    • Ben Gamari :turtle: @bgamari

      mentioned in commit d8352b7f

      ·

      mentioned in commit d8352b7f

      Toggle commit list
    • Maintainer

      @maerwald, this commit is actually breaking. Specifically, we must cabal update at least twice: once as root to build the bootstrap tools and again as the ghc user (which will be used by downstream GHC builds).

    • Ben Gamari :turtle: @bgamari

      mentioned in commit 97efce6b

      ·

      mentioned in commit 97efce6b

      Toggle commit list
    • Ben Gamari :turtle: @bgamari

      mentioned in commit 2ecc06df

      ·

      mentioned in commit 2ecc06df

      Toggle commit list
    • Ben Gamari :turtle: @bgamari

      mentioned in commit 4b114d05

      ·

      mentioned in commit 4b114d05

      Toggle commit list
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment