Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/ci-images
  • phadej/ci-images
  • cgohla/ci-images
  • samuela/ci-images
  • arrowd/ci-images
  • trommler/ci-images
  • bjaress/ci-images
  • WJWH/ci-images
  • Kleidukos/ci-images
  • maerwald/ci-images
  • adamse/ci-images
  • supersven/ci-images
  • blackgnezdo/ci-images
  • doyougnu/ci-images
  • fp/ci-images
  • lrzlin/ci-images
  • Bodigrim/ci-images
17 results
Show changes
Commits on Source (23)
dockerfiles dockerfiles
.vscode
--| A description of a Docker image --| A description of a Docker image
let let
CF = ./deps/Containerfile.dhall CF = ./deps/Containerfile.dhall
...@@ -7,10 +7,22 @@ let ...@@ -7,10 +7,22 @@ let
--| The name a of a Docker image --| The name a of a Docker image
ImageName = Text ImageName = Text
-- Note [Specifying custom platform]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- For reasons that aren't entirely clear, Kaniko at some point started refusing
-- to use base images that don't match the builder's platform. This affects ARMv7
-- and i386 images as they are built on AArch64 and x86-64 machiners, respectively.
-- To work around this we pass the `--custom-platform` flag to kaniko, forcing it
-- to accept the upstream base images, despite the platform mis-match.
--
-- See https://github.com/GoogleContainerTools/kaniko/issues/1995
let let
type: Type = type: Type =
{ name: ImageName { name: ImageName
, runnerTags: List Text , runnerTags: List Text
-- See Note [Specifying custom platform]
, customPlatform: Optional Text
, jobStage: Text , jobStage: Text
, needs: List ImageName , needs: List ImageName
, image: CF.Type , image: CF.Type
...@@ -18,8 +30,9 @@ let ...@@ -18,8 +30,9 @@ let
in in
{ Type = type { Type = type
, default = , default =
{ needs = [] : List ImageName { customPlatform = None Text
, needs = [] : List ImageName
, jobStage = "build" , jobStage = "build"
} }
, ImageName = ImageName , ImageName = ImageName
} }
\ No newline at end of file
...@@ -9,3 +9,6 @@ dockerfiles: dockerfiles.dhall ...@@ -9,3 +9,6 @@ dockerfiles: dockerfiles.dhall
mkdir -p dockerfiles mkdir -p dockerfiles
${DHALL} to-directory-tree --file=$< --output=$@ ${DHALL} to-directory-tree --file=$< --output=$@
clean:
rm gitlab-pipeline.yaml || echo "Skipping"
rm -r dockerfiles || echo "Skipping"
let bootGhcVersion : Text = "9.10.1"
in bootGhcVersion
let
CF = ../deps/Containerfile.dhall
let
Llvm = ./Llvm.dhall
let
BinariesSpec: Type =
{ version : Text
}
let
installArm64ECToWine: Text -> BinariesSpec -> CF.Type =
\(wineDest: Text) -> \(binSpec: BinariesSpec) ->
let
package: Text = "fex-emu-wine_${binSpec.version}_arm64.deb"
let
url: Text = "https://gitlab.haskell.org/api/v4/projects/3815/packages/generic/fex-emu-wine/${binSpec.version}_arm64/fex-emu-wine_${binSpec.version}_arm64.deb"
in
CF.run "install FEX"
[ "mkdir /tmp/fex"
, "pushd /tmp/fex"
, "wget ${url}"
, "ar xv ./${package}"
, "tar --zstd -xvf ./data.tar.zst"
, "cp ./usr/lib/wine/aarch64-windows/* ${wineDest}/lib/wine/aarch64-windows/"
, "popd"
, "rm -Rf /tmp/fex"
]
in
{ BinariesSpec = BinariesSpec
, install = installArm64ECToWine
}
...@@ -13,12 +13,12 @@ let Bindist = < BindistSpec : BindistSpec | BindistURL : Text > ...@@ -13,12 +13,12 @@ let Bindist = < BindistSpec : BindistSpec | BindistURL : Text >
let let
Options = Options =
{ Type = { Type =
{ bindist : Bindist { bindist : Bindist
, destDir : Text , destDir : Text
, configureOpts : List Text , configureOpts : List Text
} }
, default = , default =
{ configureOpts = [] : List Text { configureOpts = [] : List Text
} }
} }
......
...@@ -14,6 +14,7 @@ let ...@@ -14,6 +14,7 @@ let
, out_llc : Text , out_llc : Text
, out_opt : Text , out_opt : Text
, out_clang : Text , out_clang : Text
, out_clang_cpp : Text
} }
, default = {} , default = {}
} }
...@@ -36,7 +37,8 @@ let ...@@ -36,7 +37,8 @@ let
] ]
, out_llc = "${destDir}/bin/llc" , out_llc = "${destDir}/bin/llc"
, out_opt = "${destDir}/bin/opt" , out_opt = "${destDir}/bin/opt"
, out_clang="${destDir}/bin/clang" } , out_clang="${destDir}/bin/clang"
, out_clang_cpp="${destDir}/bin/clang++" }
let let
llvmInstall: Optional Output.Type -> CF.Type = llvmInstall: Optional Output.Type -> CF.Type =
......
let
CF = ../deps/Containerfile.dhall
let
Archive: Type = <TAR_XZ | ZIP>
let
BindistSpec: Type =
{ -- there are two sources of such toolchain:
-- https://github.com/mstorsjo/llvm-mingw (it has msvcrt but no arm64ec)
-- https://github.com/bylaws/llvm-mingw (it has arm64ec but no msvcrt)
-- for all our purposes we need ucrt (not msvscrt) and arm64ec, so, `bylaws` is more suitable
source : Text
, version : Text
, crt : Text
, os : Text
, archive : Archive
}
let
installFromBindistTo: Text -> BindistSpec -> CF.Type =
\(destDir: Text) -> \(bindist: BindistSpec) ->
let
url: Text = "https://github.com/${bindist.source}/llvm-mingw/releases/download/${bindist.version}/llvm-mingw-${bindist.version}-${bindist.crt}-${bindist.os}."
++ merge { TAR_XZ = "tar.xz", ZIP = "zip" } bindist.archive
let
unpack : List Text = merge
{ TAR_XZ = [ "curl -L ${url} | tar -xJC ."
]
, ZIP = [ "wget -q -O llvm-mingw-tmp.zip '${url}'"
, "unzip llvm-mingw-tmp.zip -d ."
, "rm llvm-mingw-tmp.zip"
]
} bindist.archive
in
CF.run "install LLVM MinGW for ${bindist.os}"
(unpack # [ "mkdir ${destDir}"
, "cp -R llvm-mingw-*/* ${destDir}"
, "rm -R llvm-mingw-*"
])
in
{ BindistSpec = BindistSpec
, Archive = Archive
, installFromBindistTo = installFromBindistTo
}
let
Prelude = ../deps/Prelude.dhall
let
CF = ../deps/Containerfile.dhall
let
BindistSpec: Type =
{ version_year : Text
, version_month : Text
, version_day : Text
, wine_version : Text
, build_date : Text
, build_time : Text
}
let
installFromBindistTo: Text -> BindistSpec -> Text -> CF.Type =
\(userHome: Text) -> \(bindist: BindistSpec) -> \(winePrefix: Text) ->
let
url: Text = "https://gitlab.haskell.org/api/v4/projects/3815/packages/generic/wine-msys2-env/${bindist.wine_version}-${bindist.version_year}_${bindist.version_month}_${bindist.version_day}-${bindist.build_date}_${bindist.build_time}/wine-msys2-env-deb12.tar.xz"
let
drive_c: Text = "${userHome}/.wine/drive_c"
let
runMSYS: Text = "${winePrefix}/bin/wine c:/msys64/usr/bin/bash.exe -l -c" -- option `-l` is strictly important
in
CF.env (toMap { MSYSTEM = "CLANGARM64" })
# CF.run "download & install MSYS2"
[ "curl -L ${url} | tar -Jx -C ${drive_c}"
-- Test MSYS2 works
, "${runMSYS} ' '"
]
in
{ BindistSpec = BindistSpec
, install = installFromBindistTo
}
let
CF = ../deps/Containerfile.dhall
let
BindistSpec: Type =
{ version : Text
}
let
installForArm64EC: BindistSpec -> CF.Type =
\(spec: BindistSpec) ->
let
url: Text = "https://gitlab.haskell.org/api/v4/projects/3815/packages/generic/wine-arm64ec-msys2/${spec.version}/wine-arm64ec-msys2-deb12.tar.xz"
in
CF.run "install Wine"
[ "curl -L ${url} | tar -xJC /"
]
in
{ BindistSpec = BindistSpec
, installForArm64EC = installForArm64EC
, installedPath = "/opt/wine-arm64ec-msys2-deb12"
}
...@@ -21,11 +21,20 @@ let ...@@ -21,11 +21,20 @@ let
let let
toJob: Image.Type -> Prelude.Map.Entry Text GitLab.Job.Type = toJob: Image.Type -> Prelude.Map.Entry Text GitLab.Job.Type =
\(image: Image.Type) -> \(image: Image.Type) ->
let let
docker_base_url: Text = "registry.gitlab.haskell.org/$CI_PROJECT_PATH" docker_base_url: Text = "registry.gitlab.haskell.org/$CI_PROJECT_PATH"
let let
imageName: Text = "${docker_base_url}/${image.name}" imageName: Text = "${docker_base_url}/${image.name}"
let
customPlatform: Text =
Prelude.Optional.fold
Text
image.customPlatform
Text
(\(plat: Text) -> "--custom-platform ${plat}")
""
-- N.B. https://docs.gitlab.com/ee/ci/docker/using_kaniko.html -- N.B. https://docs.gitlab.com/ee/ci/docker/using_kaniko.html
let job: GitLab.Job.Type = let job: GitLab.Job.Type =
GitLab.Job:: GitLab.Job::
...@@ -40,6 +49,9 @@ let ...@@ -40,6 +49,9 @@ let
, DOCKER_TLS_CERTDIR = "/certs" , DOCKER_TLS_CERTDIR = "/certs"
-- See https://gitlab.haskell.org/ghc/ci-images/-/issues/3 -- See https://gitlab.haskell.org/ghc/ci-images/-/issues/3
, container = "docker" , container = "docker"
-- HTTP2 is extremely slow, so it is disabled.
-- https://gitlab.haskell.org/ghc/ci-images/-/issues/7
, GODEBUG = "http2client=0"
} }
, needs = image.needs # [ "generate-dockerfiles" ] , needs = image.needs # [ "generate-dockerfiles" ]
, dependencies = [ "generate-dockerfiles" ] , dependencies = [ "generate-dockerfiles" ]
...@@ -53,7 +65,8 @@ let ...@@ -53,7 +65,8 @@ let
--context $CI_PROJECT_DIR \ --context $CI_PROJECT_DIR \
--dockerfile $CI_PROJECT_DIR/dockerfiles/${image.name}/Dockerfile \ --dockerfile $CI_PROJECT_DIR/dockerfiles/${image.name}/Dockerfile \
--destination $CI_REGISTRY_IMAGE/${image.name}:$CI_COMMIT_SHA \ --destination $CI_REGISTRY_IMAGE/${image.name}:$CI_COMMIT_SHA \
--destination $CI_REGISTRY_IMAGE/${image.name}:latest --destination $CI_REGISTRY_IMAGE/${image.name}:latest \
${customPlatform}
'' ''
] ]
} }
...@@ -85,7 +98,7 @@ let ...@@ -85,7 +98,7 @@ let
{ stage = Some "lint" { stage = Some "lint"
, image = Some (GitLab.Image :: { name = "hadolint/hadolint:latest-debian" }) , image = Some (GitLab.Image :: { name = "hadolint/hadolint:latest-debian" })
, tags = Some [ "x86_64-linux" ] , tags = Some [ "x86_64-linux" ]
, script = , script =
[ "find dockerfiles -name Dockerfile -print0 | xargs -0 -n1 hadolint" ] [ "find dockerfiles -name Dockerfile -print0 | xargs -0 -n1 hadolint" ]
} }
...@@ -98,7 +111,7 @@ let top: GitLab.Top.Type = ...@@ -98,7 +111,7 @@ let top: GitLab.Top.Type =
-- N.B. Jobs sadly can only depend upon jobs in previous stages. Hence the -- N.B. Jobs sadly can only depend upon jobs in previous stages. Hence the
-- `build-derived` stage, which exists only for the `linter` job. -- `build-derived` stage, which exists only for the `linter` job.
{ stages = Some [ "prepare", "lint", "build", "build-derived" ] { stages = Some [ "prepare", "lint", "build", "build-derived" ]
, jobs = jobs # toMap , jobs = jobs # toMap
{ generate-dockerfiles = dockerfilesJob { generate-dockerfiles = dockerfilesJob
-- , lint = lintJob -- , lint = lintJob
} }
......
...@@ -78,20 +78,21 @@ let installGhcDepsStep: CF.Type = ...@@ -78,20 +78,21 @@ let installGhcDepsStep: CF.Type =
let installWasmDepsStep: CF.Type = let installWasmDepsStep: CF.Type =
CF.run "Installing wasm backend dependencies" CF.run "Installing wasm backend dependencies"
[ "curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/4c0adc97c512642d9a24898249bec22b43d49a69/ghc-wasm-meta-4c0adc97c512642d9a24898249bec22b43d49a69.tar.gz | tar xz" [ "curl -f -L --retry 5 https://gitlab.haskell.org/haskell-wasm/ghc-wasm-meta/-/archive/45f73c3e075fa38efe84055b0dba87996948101d/ghc-wasm-meta-45f73c3e075fa38efe84055b0dba87996948101d.tar.gz | tar xz"
, "cd ghc-wasm-meta-*" , "cd ghc-wasm-meta-*"
, "SKIP_GHC=1 ./setup.sh" , "SKIP_GHC=1 ./setup.sh"
, "cd .." , "cd .."
, "rm -r ghc-wasm-meta-*" ] , "rm -r ghc-wasm-meta-*"
, "sudo apk add --no-cache chromium firefox" ]
let let
ghcVersion: Text = "9.6.4" bootGhcVersion: Text = ../boot_ghc_version.dhall
let let
fetchGhcStep: Ghc.Bindist -> CF.Type = fetchGhcStep: Ghc.Bindist -> CF.Type =
\(ghcBindist: Ghc.Bindist) -> \(ghcBindist: Ghc.Bindist) ->
let let
destDir: Text = "/opt/ghc/${ghcVersion}" destDir: Text = "/opt/ghc"
in in
Ghc.install Ghc.install
{ bindist = ghcBindist { bindist = ghcBindist
...@@ -120,7 +121,7 @@ let ...@@ -120,7 +121,7 @@ let
CF.from "alpine:3.12.12" CF.from "alpine:3.12.12"
# [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ] # [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ]
# installGhcDepsStep # installGhcDepsStep
# fetchGhcStep (Ghc.Bindist.BindistSpec { version = ghcVersion, triple = "x86_64-alpine3_12-linux" }) # fetchGhcStep (Ghc.Bindist.BindistSpec { version = bootGhcVersion, triple = "x86_64-alpine3_12-linux" })
# Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-alpine3_12" }) # Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-alpine3_12" })
# CF.run "update cabal index" [ "$CABAL update"] # CF.run "update cabal index" [ "$CABAL update"]
# HaskellTools.installGhcBuildDeps # HaskellTools.installGhcBuildDeps
...@@ -128,11 +129,11 @@ let ...@@ -128,11 +129,11 @@ let
# [ CF.Statement.Cmd ["bash"] ] # [ CF.Statement.Cmd ["bash"] ]
} }
, Image :: , Image ::
{ name = "x86_64-linux-alpine3_18-wasm" { name = "x86_64-linux-alpine3_20-wasm"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, needs = [ "x86_64-linux-alpine3_18" ] , needs = [ "x86_64-linux-alpine3_20" ]
, image = , image =
CF.from "${docker_base_url}/x86_64-linux-alpine3_18:latest" CF.from "${docker_base_url}/x86_64-linux-alpine3_20:latest"
# [ CF.Statement.User "root" ] # [ CF.Statement.User "root" ]
# [ CF.Statement.User "ghc" # [ CF.Statement.User "ghc"
, CF.Statement.Cmd ["bash"] , CF.Statement.Cmd ["bash"]
...@@ -160,7 +161,7 @@ let ...@@ -160,7 +161,7 @@ let
CF.from "alpine:3.15.8" CF.from "alpine:3.15.8"
# [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ] # [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ]
# installGhcDepsStep # installGhcDepsStep
# fetchGhcStep (Ghc.Bindist.BindistSpec { version = ghcVersion, triple = "x86_64-alpine3_12-linux" }) # fetchGhcStep (Ghc.Bindist.BindistSpec { version = bootGhcVersion, triple = "x86_64-alpine3_12-linux" })
# Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-alpine3_12" }) # Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-alpine3_12" })
# CF.run "update cabal index" [ "$CABAL update"] # CF.run "update cabal index" [ "$CABAL update"]
# HaskellTools.installGhcBuildDeps # HaskellTools.installGhcBuildDeps
...@@ -181,6 +182,36 @@ let ...@@ -181,6 +182,36 @@ let
# createUserStep # createUserStep
# [ CF.Statement.Cmd ["bash"] ] # [ CF.Statement.Cmd ["bash"] ]
} }
, Image ::
{ name = "i386-linux-alpine3_17"
, runnerTags = [ "x86_64-linux" ]
, image =
CF.from "i386/alpine:3.17.3"
# [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ]
# installGhcDepsStep
# installPkgs ["llvm15"]
# fetchGhcStep (Ghc.Bindist.BindistURL "https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/9.0.1/ghc-9.0.1-i386-alpine-linux.tar.xz")
# Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-alpine3_12" })
# CF.run "update cabal index" [ "$CABAL update"]
# HaskellTools.installGhcBuildDeps
# createUserStep
# [ CF.Statement.Cmd ["bash"] ]
}
, Image ::
{ name = "i386-linux-alpine3_20"
, runnerTags = [ "x86_64-linux" ]
, image =
CF.from "i386/alpine:3.20.1"
# [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ]
# installGhcDepsStep
# installPkgs (["llvm17", "clang17"] # docsBuildDepends320)
# fetchGhcStep (Ghc.Bindist.BindistURL "https://downloads.haskell.org/ghcup/unofficial-bindists/ghc/9.10.1/ghc-9.10.1-i386-linux-alpine-3.17.7.tar.xz")
# Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-alpine3_12" })
# CF.run "update cabal index" [ "$CABAL update"]
# HaskellTools.installGhcBuildDeps
# createUserStep
# [ CF.Statement.Cmd ["bash"] ]
}
, Image :: , Image ::
{ name = "x86_64-linux-alpine3_18" { name = "x86_64-linux-alpine3_18"
...@@ -190,7 +221,7 @@ let ...@@ -190,7 +221,7 @@ let
# [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ] # [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ]
# installGhcDepsStep # installGhcDepsStep
# installPkgs ["llvm15", "clang15"] # installPkgs ["llvm15", "clang15"]
# fetchGhcStep (Ghc.Bindist.BindistSpec { version = ghcVersion, triple = "x86_64-alpine3_12-linux" }) # fetchGhcStep (Ghc.Bindist.BindistSpec { version = bootGhcVersion, triple = "x86_64-alpine3_12-linux" })
# Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-alpine3_12" }) # Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-alpine3_12" })
# CF.run "update cabal index" [ "$CABAL update"] # CF.run "update cabal index" [ "$CABAL update"]
...@@ -206,7 +237,7 @@ let ...@@ -206,7 +237,7 @@ let
# [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ] # [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ]
# installGhcDepsStep # installGhcDepsStep
# installPkgs (["llvm17", "clang17"] # docsBuildDepends320) # installPkgs (["llvm17", "clang17"] # docsBuildDepends320)
# fetchGhcStep (Ghc.Bindist.BindistSpec { version = ghcVersion, triple = "x86_64-alpine3_12-linux" }) # fetchGhcStep (Ghc.Bindist.BindistSpec { version = bootGhcVersion, triple = "x86_64-alpine3_12-linux" })
# Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-alpine3_12" }) # Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-alpine3_12" })
# CF.run "update cabal index" [ "$CABAL update"] # CF.run "update cabal index" [ "$CABAL update"]
...@@ -221,7 +252,7 @@ let ...@@ -221,7 +252,7 @@ let
CF.from "arm64v8/alpine:3.18.0" CF.from "arm64v8/alpine:3.18.0"
# [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ] # [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ]
# installGhcDepsStep # installGhcDepsStep
# fetchGhcStep (Ghc.Bindist.BindistSpec { version = "9.8.2", triple = "aarch64-alpine3_18-linux" }) # fetchGhcStep (Ghc.Bindist.BindistSpec { version = bootGhcVersion, triple = "aarch64-alpine3_18-linux" })
# installPkgs ["cabal", "llvm15", "clang15"] # installPkgs ["cabal", "llvm15", "clang15"]
# CF.env (toMap { CABAL = "/usr/bin/cabal" }) # CF.env (toMap { CABAL = "/usr/bin/cabal" })
# CF.run "update cabal index" [ "$CABAL update"] # CF.run "update cabal index" [ "$CABAL update"]
...@@ -229,21 +260,6 @@ let ...@@ -229,21 +260,6 @@ let
# createUserStep # createUserStep
# [ CF.Statement.Cmd ["bash"] ] # [ CF.Statement.Cmd ["bash"] ]
} }
, Image ::
{ name = "i386-linux-alpine3_17"
, runnerTags = [ "x86_64-linux" ]
, image =
CF.from "i386/alpine:3.17.3"
# [ CF.Statement.Shell ["/bin/ash", "-eo", "pipefail", "-c"] ]
# installGhcDepsStep
# installPkgs ["llvm15"]
# fetchGhcStep (Ghc.Bindist.BindistURL "https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/9.0.1/ghc-9.0.1-i386-alpine-linux.tar.xz")
# Cabal.install (Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-alpine3_12" })
# CF.run "update cabal index" [ "$CABAL update"]
# HaskellTools.installGhcBuildDeps
# createUserStep
# [ CF.Statement.Cmd ["bash"] ]
}
] ]
in images in images
...@@ -166,12 +166,14 @@ let ...@@ -166,12 +166,14 @@ let
, toDocker = toDocker , toDocker = toDocker
} }
let bootGhcVersion = ../boot_ghc_version.dhall
let images: List Image.Type = let images: List Image.Type =
[ CentosImage.toDocker [ CentosImage.toDocker
{ name = "x86_64-linux-centos7" { name = "x86_64-linux-centos7"
, fromImage = "centos:7" , fromImage = "centos:7"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-centos7-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-centos7-linux" }
} }
] ]
in images in images
...@@ -14,6 +14,14 @@ let ...@@ -14,6 +14,14 @@ let
Cabal = ../components/Cabal.dhall Cabal = ../components/Cabal.dhall
let let
Image = ../Image.dhall Image = ../Image.dhall
let
LlvmMinGW = ../components/LlvmMingw.dhall
let
Wine = ../components/Wine.dhall
let
FEX = ../components/FEX.dhall
let
MSYS2 = ../components/MSYS2.dhall
let let
docker_base_url: Text = "registry.gitlab.haskell.org/ghc/ci-images" docker_base_url: Text = "registry.gitlab.haskell.org/ghc/ci-images"
...@@ -143,8 +151,8 @@ let ...@@ -143,8 +151,8 @@ let
] ]
let let
installLlvmFromApt : Text -> Optional Llvm.Config = installLlvmFromAptStrict : Text -> Llvm.Config =
\(ver : Text) -> Some \(ver : Text) ->
{ action = CF.run "install llvm" [ "apt-get install -qy wget software-properties-common gnupg lsb-release" { action = CF.run "install llvm" [ "apt-get install -qy wget software-properties-common gnupg lsb-release"
, "wget https://apt.llvm.org/llvm.sh" , "wget https://apt.llvm.org/llvm.sh"
, "chmod +x llvm.sh" , "chmod +x llvm.sh"
...@@ -153,8 +161,13 @@ let ...@@ -153,8 +161,13 @@ let
, out_llc = "/usr/bin/llc-${ver}" , out_llc = "/usr/bin/llc-${ver}"
, out_opt = "/usr/bin/opt-${ver}" , out_opt = "/usr/bin/opt-${ver}"
, out_clang = "/usr/bin/clang-${ver}" , out_clang = "/usr/bin/clang-${ver}"
, out_clang_cpp = "/usr/bin/clang++-${ver}"
} }
let
installLlvmFromApt : Text -> Optional Llvm.Config =
\(ver : Text) -> Some (installLlvmFromAptStrict ver)
-- Workaround for https://github.com/llvm/llvm-project/issues/62475 -- Workaround for https://github.com/llvm/llvm-project/issues/62475
let let
installLlvmFromAptBookworm : Text -> Optional Llvm.Config = installLlvmFromAptBookworm : Text -> Optional Llvm.Config =
...@@ -168,6 +181,7 @@ let ...@@ -168,6 +181,7 @@ let
, out_llc = "/usr/bin/llc-${ver}" , out_llc = "/usr/bin/llc-${ver}"
, out_opt = "/usr/bin/opt-${ver}" , out_opt = "/usr/bin/opt-${ver}"
, out_clang = "/usr/bin/clang-${ver}" , out_clang = "/usr/bin/clang-${ver}"
, out_clang_cpp = "/usr/bin/clang++-${ver}"
} }
...@@ -224,6 +238,41 @@ let ...@@ -224,6 +238,41 @@ let
, "sudo make prefix=/usr install -j$(curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc/-/raw/master/mk/detect-cpu-count.sh | sh)" , "sudo make prefix=/usr install -j$(curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc/-/raw/master/mk/detect-cpu-count.sh | sh)"
] ]
let
-- See https://wiki.debian.org/RISC-V#Cross_compilation
installRiscv64: CF.Type =
CF.run "install RISCV64 cross-compilation toolchain"
[ "sudo apt-get update"
, "sudo dpkg --add-architecture riscv64"
, "sudo apt-get install -yq gcc-riscv64-linux-gnu g++-riscv64-linux-gnu"
, "sudo ln -s /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib"
, ''
sudo tee /etc/ld.so.conf.d/riscv64-linux-gnu.conf > /dev/null <<EOF
/usr/local/lib/riscv64-linux-gnu
/lib/riscv64-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/riscv64-linux-gnu/lib/
EOF
''
]
let
installLoongArch64: CF.Type =
CF.run "install LoongArch64 cross-compilation toolchain"
[ "sudo apt update"
, "sudo apt install -yq gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu rename"
, "sudo rename 's/-14$//' /usr/bin/loongarch64-linux-gnu-*-14"
, "sudo ln -s /usr/loongarch64-linux-gnu/lib/ld-linux-loongarch-lp64d.so.1 /lib"
, ''
sudo tee /etc/ld.so.conf.d/loongarch64-linux-gnu.conf > /dev/null <<EOF
/usr/local/lib/loongarch64-linux-gnu
/lib/loongarch64-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/loongarch64-linux-gnu/lib/
EOF
''
]
let let
bootLlvmDir: Text = "/opt/llvm-bootstrap" bootLlvmDir: Text = "/opt/llvm-bootstrap"
let let
...@@ -240,6 +289,8 @@ let ...@@ -240,6 +289,8 @@ let
{ name: Text { name: Text
, fromImage : Text , fromImage : Text
, runnerTags : List Text , runnerTags : List Text
-- See Note [Specifying custom platform]
, customPlatform : Optional Text
, bootstrapLlvm : Optional Llvm.Config , bootstrapLlvm : Optional Llvm.Config
, bootstrapGhc : Ghc.BindistSpec , bootstrapGhc : Ghc.BindistSpec
, llvm : Optional Llvm.Config , llvm : Optional Llvm.Config
...@@ -253,6 +304,8 @@ let ...@@ -253,6 +304,8 @@ let
, withLatestPython : Bool , withLatestPython : Bool
, withLibzstd : Bool , withLibzstd : Bool
, repoType : RepoType , repoType : RepoType
, withRiscv64 : Bool
, withLoongArch64 : Bool
} }
let let
...@@ -303,12 +356,19 @@ let ...@@ -303,12 +356,19 @@ let
# (if opts.withLatestPython then installLatestPython else [] : CF.Type) # (if opts.withLatestPython then installLatestPython else [] : CF.Type)
# (if opts.withLibzstd then installLibzstd else [] : CF.Type) # (if opts.withLibzstd then installLibzstd else [] : CF.Type)
# [ CF.Statement.Cmd ["bash"] ] # [ CF.Statement.Cmd ["bash"] ]
# (if opts.withRiscv64 then installRiscv64 else [] : CF.Type)
in Image::{ name = opts.name, runnerTags = opts.runnerTags, image = image } # (if opts.withLoongArch64 then installLoongArch64 else [] : CF.Type)
in Image::{ name = opts.name
, runnerTags = opts.runnerTags
, customPlatform = opts.customPlatform
, image = image
}
in in
{ Type = type { Type = type
, default = , default =
{ withStack = False { customPlatform = None Text
, withStack = False
, withEMSDK = False , withEMSDK = False
, withClosure = False , withClosure = False
, withLatestPython = False , withLatestPython = False
...@@ -316,16 +376,20 @@ let ...@@ -316,16 +376,20 @@ let
, repoType = RepoType.Standard , repoType = RepoType.Standard
, bootstrapLlvm = None Llvm.Config , bootstrapLlvm = None Llvm.Config
, llvm = None Llvm.Config , llvm = None Llvm.Config
, withRiscv64 = False
, withLoongArch64 = False
} }
, toDocker = toDocker , toDocker = toDocker
} }
let bootGhcVersion = ../boot_ghc_version.dhall
let debian11Images: List Image.Type = let debian11Images: List Image.Type =
[ DebianImage.toDocker DebianImage:: [ DebianImage.toDocker DebianImage::
{ name = "x86_64-linux-deb11" { name = "x86_64-linux-deb11"
, fromImage = "amd64/debian:bullseye" , fromImage = "amd64/debian:bullseye"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb10-linux" }
, llvm = installLlvmFromApt "15" , llvm = installLlvmFromApt "15"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb10" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb10" }
, extraPackages = , extraPackages =
...@@ -338,30 +402,18 @@ let debian11Images: List Image.Type = ...@@ -338,30 +402,18 @@ let debian11Images: List Image.Type =
{ name = "x86_64-linux-deb11-emsdk-closure" { name = "x86_64-linux-deb11-emsdk-closure"
, fromImage = "amd64/debian:bullseye" , fromImage = "amd64/debian:bullseye"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb10-linux" }
, llvm = installLlvmFromApt "15" , llvm = installLlvmFromApt "15"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb10" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb10" }
, extraPackages = [] : List Text , extraPackages = [] : List Text
, withEMSDK = True , withEMSDK = True
, withClosure = True , withClosure = True
} }
, DebianImage.toDocker DebianImage::
{ name = "armv7-linux-deb11"
, fromImage = "arm32v7/debian:bullseye"
, runnerTags = [ "armv7-linux" ]
, bootstrapLlvm = bootLlvmConfig { version = "12.0.1", triple = "armv7a-linux-gnueabihf" }
, bootstrapGhc = { version = "9.4.3", triple = "armv7-deb10-linux" }
-- MP: I guess this won't work, but getting newer version that 13 is hard because the bindists are
-- built against newer glibc. Perhaps get it from llvm-13 package?
, llvm = llvmConfig { version = "12.0.1", triple = "armv7a-linux-gnueabihf" }
, cabalSource = (Cabal.Type.FromBindist "https://downloads.haskell.org/~ghcup/unofficial-bindists/cabal/3.6.2.0/cabal-install-3.6.2.0-armv7-linux-deb10.tar.xz")
, extraPackages = [ "libnuma-dev", "libtinfo5" ] # debian11OrHigherBuildDepends
}
, DebianImage.toDocker DebianImage:: , DebianImage.toDocker DebianImage::
{ name = "aarch64-linux-deb11" { name = "aarch64-linux-deb11"
, fromImage = "arm64v8/debian:bullseye" , fromImage = "arm64v8/debian:bullseye"
, runnerTags = [ "aarch64-linux" ] , runnerTags = [ "aarch64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "aarch64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "aarch64-deb10-linux" }
, llvm = installLlvmFromApt "15" , llvm = installLlvmFromApt "15"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "aarch64-linux-deb10" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "aarch64-linux-deb10" }
, extraPackages = [ ] : List Text , extraPackages = [ ] : List Text
...@@ -370,7 +422,8 @@ let debian11Images: List Image.Type = ...@@ -370,7 +422,8 @@ let debian11Images: List Image.Type =
{ name = "i386-linux-deb11" { name = "i386-linux-deb11"
, fromImage = "i386/debian:bullseye" , fromImage = "i386/debian:bullseye"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.8.2", triple = "i386-deb10-linux" } , customPlatform = Some "linux/386"
, bootstrapGhc = { version = bootGhcVersion, triple = "i386-deb10-linux" }
, llvm = None Llvm.Config , llvm = None Llvm.Config
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-deb9" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-deb9" }
, extraPackages = debian11OrHigherBuildDepends , extraPackages = debian11OrHigherBuildDepends
...@@ -382,8 +435,8 @@ let x86_deb12_base : DebianImage.Type = ...@@ -382,8 +435,8 @@ let x86_deb12_base : DebianImage.Type =
{ name = "x86_64-linux-deb12" { name = "x86_64-linux-deb12"
, fromImage = "amd64/debian:bookworm" , fromImage = "amd64/debian:bookworm"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb10-linux" }
, llvm = installLlvmFromAptBookworm "18" , llvm = installLlvmFromAptBookworm "19"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb11" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb11" }
, extraPackages = , extraPackages =
debian11OrHigherBuildDepends debian11OrHigherBuildDepends
...@@ -400,21 +453,145 @@ let debian12Images: List Image.Type = ...@@ -400,21 +453,145 @@ let debian12Images: List Image.Type =
with withLibzstd = True with withLibzstd = True
with withStack = True ) with withStack = True )
, DebianImage.toDocker
(x86_deb12_base with name = "x86_64-linux-deb12-riscv"
with extraPackages = x86_deb12_base.extraPackages # ["qemu-user"]
with withRiscv64 = True )
, DebianImage.toDocker DebianImage:: , DebianImage.toDocker DebianImage::
{ name = "aarch64-linux-deb12" { name = "aarch64-linux-deb12"
, fromImage = "arm64v8/debian:bookworm" , fromImage = "arm64v8/debian:bookworm"
, runnerTags = [ "aarch64-linux" ] , runnerTags = [ "aarch64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "aarch64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "aarch64-deb10-linux" }
, llvm = installLlvmFromApt "15" , llvm = installLlvmFromApt "19"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "aarch64-linux-deb11" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "aarch64-linux-deb11" }
, extraPackages = [ ] : List Text , extraPackages = [ ] : List Text
} }
, ( let
home_dir = "/home/ghc"
let
cabal_index_state = "2025-03-20T17:30:02Z"
let
msys_cabal_version = "3.14.1.1"
let deb = DebianImage.toDocker DebianImage::
{ name = "aarch64-linux-deb12-wine"
, fromImage = "arm64v8/debian:bookworm"
, runnerTags = [ "aarch64-linux" ]
, bootstrapGhc = { version = "9.12.2", triple = "aarch64-deb12-linux" }
, llvm = installLlvmFromApt "19"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.14.1.1", triple = "aarch64-linux-deb12" }
, extraPackages = [
, "zstd" -- uncompress debs for FEX dlls
] : List Text
}
in deb with image = deb.image
# [CF.Statement.User "root"]
# CF.workdir "/root/"
-- Its purpose is to test the building of cross-compiled GHC for Aarch64 Windows from Linux
-- At the moment GHC supports LLVM =< 19, where 20250114@mstorsjo is 19.1.7
# LlvmMinGW.installFromBindistTo "/opt/llvm-mingw-linux"
{ source = "mstorsjo", version = "20250114", crt = "ucrt"
, os = "ubuntu-20.04-aarch64", archive = LlvmMinGW.Archive.TAR_XZ
}
# Wine.installForArm64EC { version = "10.7" }
# FEX.install Wine.installedPath { version = "2505_j" }
# [CF.Statement.User "ghc"]
# CF.workdir "${home_dir}/"
# CF.env (toMap { WINEPREFIX = "${home_dir}/.wine", WINEDEBUG = "-all" })
# CF.run "init Wine drives for selected user with FEX registry preinstall"
[ "${Wine.installedPath}/bin/wine reg.exe ADD 'HKLM\\Software\\Microsoft\\Wow64\\amd64' /ve /t REG_SZ /d 'libarm64ecfex.dll' /f"
-- Forcely keep all registry changes are persistent
, "${Wine.installedPath}/bin/wineserver -k 15"
]
# MSYS2.install home_dir { wine_version = "10.7", version_year = "2025", version_month = "02", version_day = "21", build_date = "20250512", build_time = "1031" } Wine.installedPath
# CF.run "install GHC"
[ "mkdir ${home_dir}/.wine/drive_c/msys64/opt/ghc-bootstrap"
, "curl -L https://downloads.haskell.org/~ghc/9.12.2/ghc-9.12.2-x86_64-unknown-mingw32.tar.xz | tar -Jx -C ${home_dir}/.wine/drive_c/msys64/opt/ghc-bootstrap --strip-components=1"
, "echo 'export PATH=/opt/ghc-bootstrap/bin:$PATH' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
, "echo 'export GHC=/opt/ghc-bootstrap/bin/ghc' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
, "${Wine.installedPath}/bin/wine c:/msys64/usr/bin/bash.exe -l -c 'ghc --version'"
]
# CF.run "install Cabal"
[ "mkdir -p ${home_dir}/.wine/drive_c/msys64/opt/cabal/{bin,dir}"
, "wget -q -O tmp.zip https://downloads.haskell.org/cabal/cabal-install-${msys_cabal_version}/cabal-install-${msys_cabal_version}-x86_64-windows.zip"
, "unzip tmp.zip -d Cabal-msys2"
, "cp ./Cabal-msys2/cabal.exe ${home_dir}/.wine/drive_c/msys64/opt/cabal/bin/"
, "rm tmp.zip"
, "rm -r ./Cabal-msys2"
, "echo 'export PATH=/opt/cabal/dir/bin:/opt/cabal/bin:$PATH' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
, "echo 'export CABAL=/opt/cabal/bin/cabal' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
-- Double escaping: one for Dhall, second for Bash
, "echo 'export CABAL_CONFIG=C:\\\\msys64\\\\opt\\\\cabal\\\\cabal.conf' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
, "echo 'export CABAL_DIR=C:\\\\msys64\\\\opt\\\\cabal\\\\dir' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
, "${Wine.installedPath}/bin/wine c:/msys64/usr/bin/bash.exe -l -c 'cabal user-config init'"
-- The install method should be COPY because MSYS2 does not support symlinking under Wine
, "sed -i 's/-- install-method:/install-method: copy/g' ${home_dir}/.wine/drive_c/msys64/opt/cabal/cabal.conf"
-- Set Cabal registry to specific revision, yep, we need pass same index state reference twice.
, "sed -i 's/-- index-state:/index-state: ${cabal_index_state}/g' ${home_dir}/.wine/drive_c/msys64/opt/cabal/cabal.conf"
, "${Wine.installedPath}/bin/wine c:/msys64/usr/bin/bash.exe -l -c 'cabal update \"hackage.haskell.org,${cabal_index_state}\"'"
]
-- We are going to replace GHC's prepacked mingw toolchain with new one.
-- At the moment GHC supports LLVM =< 19, where 20250114@mstorsjo is 19.1.7
# CF.run "Remove prepared MinGW toolchain"
[ "rm -rf ${home_dir}/.wine/drive_c/msys64/opt/ghc-bootstrap/mingw"
]
# LlvmMinGW.installFromBindistTo "${home_dir}/.wine/drive_c/msys64/opt/ghc-bootstrap/mingw"
{ source = "mstorsjo", version = "20250114", crt = "ucrt"
, os = "aarch64", archive = LlvmMinGW.Archive.ZIP
}
# CF.run "Setup Clang"
[ -- We should pass the full path to the linker. Also be warn:
-- > lld is a generic driver.
-- > Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
-- So, let's use ld.lld because we are in msys2 environment. lld-link will not work.
''
sed -i 's#-fuse-ld=lld#-fuse-ld=$topdir/../mingw/bin/ld.lld#g' \
${home_dir}/.wine/drive_c/msys64/opt/ghc-bootstrap/lib/settings \
''
-- msys2's environment has different location for libs
, ''
sed -i 's#clang64/opt/llvm-16/x86_64-w64-mingw32/lib#clang64/lib#g' \
${home_dir}/.wine/drive_c/msys64/opt/ghc-bootstrap/lib/settings \
''
-- windress is platform-dependent
, ''
sed -i 's#/llvm-windres.exe#/x86_64-w64-mingw32-windres.exe#g' \
${home_dir}/.wine/drive_c/msys64/opt/ghc-bootstrap/lib/settings
''
]
# CF.run "install GHC build deps"
[ ''
${Wine.installedPath}/bin/wine c:/msys64/usr/bin/bash.exe -l -c 'cabal v2-install \
--constraint="alex ^>= 3.5.2.0" \
--constraint="happy ^>= 2.1.5" \
--constraint="hscolour ^>= 1.25" \
'' ++ Prelude.Text.concatSep " " [ "hscolour", "happy", "alex" ] ++ "'"
, "echo 'export ALEX=/opt/cabal/dir/bin/alex' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
, "echo 'export HAPPY=/opt/cabal/dir/bin/happy' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
, "echo 'export HSCOLOUR=/opt/cabal/dir/bin/HsColour' >> ${home_dir}/.wine/drive_c/msys64/home/ghc/.bash_profile"
]
)
, DebianImage.toDocker DebianImage:: , DebianImage.toDocker DebianImage::
{ name = "i386-linux-deb12" { name = "i386-linux-deb12"
, fromImage = "i386/debian:bookworm" , fromImage = "i386/debian:bookworm"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.8.2", triple = "i386-deb10-linux" } , customPlatform = Some "linux/386"
, bootstrapGhc = { version = bootGhcVersion, triple = "i386-deb10-linux" }
, llvm = None Llvm.Config , llvm = None Llvm.Config
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-deb9" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-deb9" }
, extraPackages = , extraPackages =
...@@ -427,29 +604,17 @@ let debian10Images: List Image.Type = ...@@ -427,29 +604,17 @@ let debian10Images: List Image.Type =
{ name = "aarch64-linux-deb10" { name = "aarch64-linux-deb10"
, fromImage = "arm64v8/debian:buster" , fromImage = "arm64v8/debian:buster"
, runnerTags = [ "aarch64-linux" ] , runnerTags = [ "aarch64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "aarch64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "aarch64-deb10-linux" }
, llvm = installLlvmFromApt "15" , llvm = installLlvmFromApt "15"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "aarch64-linux-deb10" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "aarch64-linux-deb10" }
, extraPackages = [] : List Text , extraPackages = [] : List Text
} }
, DebianImage.toDocker DebianImage::
{ name = "armv7-linux-deb10"
, fromImage = "arm32v7/debian:buster"
, runnerTags = [ "armv7-linux" ]
, bootstrapLlvm = bootLlvmConfig { version = "12.0.1", triple = "armv7a-linux-gnueabihf" }
, bootstrapGhc = { version = "9.4.3", triple = "armv7-deb10-linux" }
-- MP: I guess this won't work, but getting newer version that 13 is hard because the bindists are
-- built against newer glibc. llvm-13 package doesn't exist on deb10 so perhaps we are stuck.
, llvm = llvmConfig { version = "12.0.1", triple = "armv7a-linux-gnueabihf" }
, cabalSource = (Cabal.Type.FromBindist "https://downloads.haskell.org/~ghcup/unofficial-bindists/cabal/3.6.2.0/cabal-install-3.6.2.0-armv7-linux-deb10.tar.xz")
, extraPackages = [ "libnuma-dev", "libtinfo5", "lld" ] # debianBuildDepends
}
-- N.B. Need GHC bindist for deb10 i386
, DebianImage.toDocker DebianImage:: , DebianImage.toDocker DebianImage::
{ name = "i386-linux-deb10" { name = "i386-linux-deb10"
, fromImage = "i386/debian:buster" , fromImage = "i386/debian:buster"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "i386-deb9-linux" } , customPlatform = Some "linux/386"
, bootstrapGhc = { version = bootGhcVersion, triple = "i386-deb10-linux" }
, llvm = None Llvm.Config , llvm = None Llvm.Config
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-deb9" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-deb9" }
, extraPackages = , extraPackages =
...@@ -461,7 +626,7 @@ let debian10Images: List Image.Type = ...@@ -461,7 +626,7 @@ let debian10Images: List Image.Type =
{ name = "x86_64-linux-deb10" { name = "x86_64-linux-deb10"
, fromImage = "amd64/debian:buster" , fromImage = "amd64/debian:buster"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb10-linux" }
, llvm = installLlvmFromApt "15" , llvm = installLlvmFromApt "15"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb10" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb10" }
, extraPackages = , extraPackages =
...@@ -475,32 +640,32 @@ let debian9Images: List Image.Type = ...@@ -475,32 +640,32 @@ let debian9Images: List Image.Type =
{ name = "x86_64-linux-deb9" { name = "x86_64-linux-deb9"
, fromImage = "amd64/debian:stretch" , fromImage = "amd64/debian:stretch"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb9-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb9-linux" }
-- No debian 9 build for cabal 3.10.1.0 -- No debian 9 build for cabal 3.10.1.0
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.1.0", triple = "x86_64-linux-deb9" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.1.0", triple = "x86_64-linux-deb9" }
, extraPackages = debianBuildDepends : List Text , extraPackages = debianBuildDepends : List Text
, withLatestPython = True , withLatestPython = True
, repoType = RepoType.Archive , repoType = RepoType.Archive
} }
, DebianImage.toDocker DebianImage::
{ name = "i386-linux-deb9"
, fromImage = "i386/debian:stretch"
, runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "i386-deb9-linux" }
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "i386-linux-deb9" }
, extraPackages = debianBuildDepends # [ "libtinfo5", "cabal-install" ] : List Text
, withLatestPython = True
, repoType = RepoType.Archive
}
] ]
let ubuntuImages: List Image.Type = let ubuntuImages: List Image.Type =
[ [
DebianImage.toDocker DebianImage:: DebianImage.toDocker DebianImage::
{ name = "x86_64-linux-ubuntu24_04-loongarch"
, fromImage = "amd64/ubuntu:24.04"
, runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb11-linux" }
, llvm = installLlvmFromApt "19"
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb11" }
, extraPackages = ubuntuBuildDepends # [ "qemu-user" ]
, withLoongArch64 = True
}
, DebianImage.toDocker DebianImage::
{ name = "x86_64-linux-ubuntu24_04" { name = "x86_64-linux-ubuntu24_04"
, fromImage = "amd64/ubuntu:24.04" , fromImage = "amd64/ubuntu:24.04"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb11-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb11-linux" }
, llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" } , llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" }
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb11" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb11" }
, extraPackages = ubuntuBuildDepends , extraPackages = ubuntuBuildDepends
...@@ -509,7 +674,7 @@ let ubuntuImages: List Image.Type = ...@@ -509,7 +674,7 @@ let ubuntuImages: List Image.Type =
{ name = "x86_64-linux-ubuntu22_04" { name = "x86_64-linux-ubuntu22_04"
, fromImage = "amd64/ubuntu:22.04" , fromImage = "amd64/ubuntu:22.04"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb10-linux" }
, llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" } , llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" }
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb10" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-deb10" }
, extraPackages = ubuntuBuildDepends , extraPackages = ubuntuBuildDepends
...@@ -518,7 +683,7 @@ let ubuntuImages: List Image.Type = ...@@ -518,7 +683,7 @@ let ubuntuImages: List Image.Type =
{ name = "x86_64-linux-ubuntu20_04" { name = "x86_64-linux-ubuntu20_04"
, fromImage = "amd64/ubuntu:20.04" , fromImage = "amd64/ubuntu:20.04"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb10-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb10-linux" }
, llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" } , llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" }
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-ubuntu20_04" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-ubuntu20_04" }
, extraPackages = ubuntuBuildDepends , extraPackages = ubuntuBuildDepends
...@@ -527,7 +692,7 @@ let ubuntuImages: List Image.Type = ...@@ -527,7 +692,7 @@ let ubuntuImages: List Image.Type =
{ name = "x86_64-linux-ubuntu18_04" { name = "x86_64-linux-ubuntu18_04"
, fromImage = "amd64/ubuntu:18.04" , fromImage = "amd64/ubuntu:18.04"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb9-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-deb9-linux" }
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-ubuntu18_04" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-ubuntu18_04" }
, extraPackages = [ "libtinfo5" ] # ubuntuBuildDepends , extraPackages = [ "libtinfo5" ] # ubuntuBuildDepends
, withLatestPython = True , withLatestPython = True
...@@ -561,18 +726,6 @@ let linterImages: List Image.Type = ...@@ -561,18 +726,6 @@ let linterImages: List Image.Type =
let bootstrapImages: List Image.Type = let bootstrapImages: List Image.Type =
[ DebianImage.toDocker (x86_deb12_base [ DebianImage.toDocker (x86_deb12_base
with name = "x86_64-linux-deb12-ghc9_2"
with bootstrapGhc = { version = "9.2.8", triple = "x86_64-deb10-linux" })
, DebianImage.toDocker (x86_deb12_base
with name = "x86_64-linux-deb12-ghc9_4"
with bootstrapGhc = { version = "9.4.8", triple = "x86_64-deb10-linux" })
, DebianImage.toDocker (x86_deb12_base
with name = "x86_64-linux-deb12-ghc9_6"
with bootstrapGhc = { version = "9.6.4", triple = "x86_64-deb10-linux" })
, DebianImage.toDocker (x86_deb12_base
with name = "x86_64-linux-deb12-ghc9_8" with name = "x86_64-linux-deb12-ghc9_8"
with bootstrapGhc = { version = "9.8.1", triple = "x86_64-deb10-linux" } ) with bootstrapGhc = { version = "9.8.1", triple = "x86_64-deb10-linux" } )
......
...@@ -179,20 +179,22 @@ let ...@@ -179,20 +179,22 @@ let
, toDocker = toDocker , toDocker = toDocker
} }
let bootGhcVersion = ../boot_ghc_version.dhall
let images: List Image.Type = let images: List Image.Type =
[ FedoraImage.toDocker FedoraImage:: [ FedoraImage.toDocker FedoraImage::
{ name = "x86_64-linux-fedora33" { name = "x86_64-linux-fedora33"
, fromImage = "amd64/fedora:33" , fromImage = "amd64/fedora:33"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" } , llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" }
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-fedora33-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-fedora33-linux" }
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-fedora33" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-fedora33" }
} }
, FedoraImage.toDocker FedoraImage:: , FedoraImage.toDocker FedoraImage::
{ name = "x86_64-linux-fedora36" { name = "x86_64-linux-fedora36"
, fromImage = "amd64/fedora:36" , fromImage = "amd64/fedora:36"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-fedora33-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-fedora33-linux" }
, llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" } , llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" }
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-fedora33" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-fedora33" }
} }
...@@ -200,7 +202,7 @@ let images: List Image.Type = ...@@ -200,7 +202,7 @@ let images: List Image.Type =
{ name = "x86_64-linux-fedora38" { name = "x86_64-linux-fedora38"
, fromImage = "amd64/fedora:38" , fromImage = "amd64/fedora:38"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-fedora33-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-fedora33-linux" }
, llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" } , llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" }
, cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-fedora33" } , cabalSource = Cabal.fromUpstreamBindist { version = "3.10.2.0", triple = "x86_64-linux-fedora33" }
} }
......
...@@ -171,12 +171,14 @@ let ...@@ -171,12 +171,14 @@ let
let let
llvmConfig = \(bd : Llvm.BindistSpec) -> Some (Llvm.installFromBindistTo llvmDir bd) llvmConfig = \(bd : Llvm.BindistSpec) -> Some (Llvm.installFromBindistTo llvmDir bd)
let bootGhcVersion = ../boot_ghc_version.dhall
let images: List Image.Type = let images: List Image.Type =
[ RockyImage.toDocker [ RockyImage.toDocker
{ name = "x86_64-linux-rocky8" { name = "x86_64-linux-rocky8"
, fromImage = "amd64/rockylinux:8" , fromImage = "amd64/rockylinux:8"
, runnerTags = [ "x86_64-linux" ] , runnerTags = [ "x86_64-linux" ]
, bootstrapGhc = { version = "9.6.4", triple = "x86_64-rocky8-linux" } , bootstrapGhc = { version = bootGhcVersion, triple = "x86_64-rocky8-linux" }
, llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" } , llvm = llvmConfig { version = "15.0.6" , triple = "x86_64-linux-gnu-ubuntu-18.04" }
} }
] ]
......