ghcup-hs/.gitlab-ci.yml

440 lines
8.8 KiB
YAML
Raw Normal View History

2021-02-25 13:12:07 +00:00
stages:
2021-03-11 16:03:51 +00:00
- hlint
2021-02-25 13:12:07 +00:00
- test
- release
2020-04-15 07:45:18 +00:00
variables:
GIT_SSL_NO_VERIFY: "1"
# Commit of ghc/ci-images repository from which to pull Docker images
2020-06-26 12:51:30 +00:00
DOCKER_REV: 1ac7f435c9312f10422a82d304194778378e2a1a
2020-04-15 07:45:18 +00:00
############################################################
# CI Step
############################################################
.debian:
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
tags:
- x86_64-linux
2020-04-19 15:00:05 +00:00
variables:
OS: "LINUX"
2021-02-24 14:19:29 +00:00
ARCH: "64"
2021-05-14 21:09:45 +00:00
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
2020-04-19 15:00:05 +00:00
2020-04-19 17:23:54 +00:00
.alpine:64bit:
2020-09-21 10:23:14 +00:00
image: "alpine:3.12"
2020-04-19 15:00:05 +00:00
tags:
- x86_64-linux
variables:
OS: "LINUX"
2021-02-24 14:19:29 +00:00
ARCH: "64"
2021-05-14 21:09:45 +00:00
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
2020-04-19 17:23:54 +00:00
.alpine:32bit:
2020-09-21 10:23:14 +00:00
image: "i386/alpine:3.12"
2020-04-19 17:23:54 +00:00
tags:
- x86_64-linux
variables:
OS: "LINUX"
2021-02-24 14:19:29 +00:00
ARCH: "32"
2021-05-14 21:09:45 +00:00
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
2021-02-24 14:19:29 +00:00
.linux:armv7:
image: "arm32v7/fedora"
tags:
- armv7-linux
variables:
OS: "LINUX"
ARCH: "ARM"
2021-05-14 21:09:45 +00:00
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
2021-02-24 14:19:29 +00:00
.linux:aarch64:
image: "arm64v8/fedora"
tags:
- aarch64-linux
variables:
OS: "LINUX"
ARCH: "ARM64"
2021-05-14 21:09:45 +00:00
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
2020-04-15 07:45:18 +00:00
.darwin:
tags:
- x86_64-darwin
2020-04-19 15:00:05 +00:00
variables:
OS: "DARWIN"
2021-02-24 14:19:29 +00:00
ARCH: "64"
2021-05-14 21:09:45 +00:00
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
2020-04-15 07:45:18 +00:00
.darwin:aarch64:
tags:
- aarch64-darwin-m1
variables:
OS: "DARWIN"
ARCH: "ARM64"
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
.freebsd:
tags:
- x86_64-freebsd
2020-04-19 15:00:05 +00:00
variables:
OS: "FREEBSD"
2021-02-24 14:19:29 +00:00
ARCH: "64"
2021-05-14 21:09:45 +00:00
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
.windows:
tags:
- new-x86_64-windows
variables:
OS: "WINDOWS"
ARCH: "64"
CABAL_DIR: "$CI_PROJECT_DIR/cabal"
2020-04-19 15:00:05 +00:00
.root_cleanup:
after_script:
2021-05-14 21:09:45 +00:00
- bash ./.gitlab/after_script.sh
2020-04-15 07:45:18 +00:00
.test_ghcup_version:
script:
2021-05-14 21:09:45 +00:00
- bash ./.gitlab/script/ghcup_version.sh
2020-04-15 07:45:18 +00:00
variables:
2021-05-14 21:09:45 +00:00
JSON_VERSION: "0.0.5"
artifacts:
expire_in: 2 week
paths:
- golden
when: on_failure
2020-04-15 07:45:18 +00:00
.test_ghcup_version:linux:
extends:
- .test_ghcup_version
- .debian
before_script:
- ./.gitlab/before_script/linux/install_deps.sh
2020-08-09 09:21:49 +00:00
.test_ghcup_version:linux32:
extends:
- .test_ghcup_version
- .alpine:32bit
before_script:
- ./.gitlab/before_script/linux/alpine/install_deps.sh
2021-02-24 14:19:29 +00:00
.test_ghcup_version:armv7:
extends:
- .test_ghcup_version
- .linux:armv7
before_script:
- ./.gitlab/before_script/linux/install_deps_manual.sh
.test_ghcup_version:aarch64:
extends:
- .test_ghcup_version
- .linux:aarch64
before_script:
- ./.gitlab/before_script/linux/install_deps_manual.sh
2020-04-15 07:45:18 +00:00
.test_ghcup_version:darwin:
extends:
- .test_ghcup_version
- .darwin
2020-04-19 15:00:05 +00:00
- .root_cleanup
2020-04-15 07:45:18 +00:00
before_script:
- ./.gitlab/before_script/darwin/install_deps.sh
.test_ghcup_version:darwin:aarch64:
extends:
- .test_ghcup_version
- .darwin:aarch64
- .root_cleanup
before_script:
- ./.gitlab/before_script/darwin/install_deps.sh
.test_ghcup_version:freebsd:
extends:
- .test_ghcup_version
- .freebsd
2020-04-19 15:00:05 +00:00
- .root_cleanup
before_script:
- ./.gitlab/before_script/freebsd/install_deps.sh
2021-05-14 21:09:45 +00:00
.test_ghcup_version:windows:
extends:
- .test_ghcup_version
- .windows
- .root_cleanup
before_script:
- set CABAL_DIR="$CI_PROJECT_DIR/cabal"
- bash ./.gitlab/before_script/windows/install_deps.sh
2020-04-19 15:00:05 +00:00
.release_ghcup:
script:
2021-05-14 21:09:45 +00:00
- bash ./.gitlab/script/ghcup_release.sh
2020-04-19 15:00:05 +00:00
artifacts:
expire_in: 2 week
paths:
- out
only:
- tags
2021-02-24 14:19:29 +00:00
variables:
2021-05-14 21:09:45 +00:00
JSON_VERSION: "0.0.5"
2020-04-15 07:45:18 +00:00
2020-09-30 21:42:30 +00:00
######## stack test ########
test:linux:stack:
2021-02-25 13:12:07 +00:00
stage: test
2020-09-30 21:42:30 +00:00
before_script:
- ./.gitlab/before_script/linux/install_deps_minimal.sh
script:
- ./.gitlab/script/ghcup_stack.sh
extends:
- .debian
2021-03-11 16:03:51 +00:00
needs: []
2020-09-30 21:42:30 +00:00
2020-09-29 08:23:11 +00:00
######## bootstrap test ########
test:linux:bootstrap_script:
2021-02-25 13:12:07 +00:00
stage: test
2020-09-29 08:23:11 +00:00
before_script:
2020-09-29 08:57:21 +00:00
- ./.gitlab/before_script/linux/install_deps_minimal.sh
2020-09-29 08:23:11 +00:00
script:
- ./.gitlab/script/ghcup_bootstrap.sh
variables:
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2020-09-29 08:23:11 +00:00
extends:
- .debian
2021-03-11 16:03:51 +00:00
needs: []
2020-09-29 08:23:11 +00:00
######## linux test ########
2020-04-15 07:45:18 +00:00
test:linux:recommended:
2021-02-25 13:12:07 +00:00
stage: test
2020-04-15 07:45:18 +00:00
extends: .test_ghcup_version:linux
variables:
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2021-03-11 16:03:51 +00:00
needs: []
2020-04-15 07:45:18 +00:00
test:linux:latest:
2021-02-25 13:12:07 +00:00
stage: test
2020-04-15 07:45:18 +00:00
extends: .test_ghcup_version:linux
variables:
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2021-03-11 16:03:51 +00:00
needs: []
2020-04-15 07:45:18 +00:00
2020-08-09 09:21:49 +00:00
######## linux 32bit test ########
test:linux:recommended:32bit:
2021-02-25 13:12:07 +00:00
stage: test
2020-08-09 09:21:49 +00:00
extends: .test_ghcup_version:linux32
variables:
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2020-08-09 09:21:49 +00:00
CABAL_VERSION: "3.2.0.0"
2021-03-11 16:03:51 +00:00
needs: []
2020-04-15 07:45:18 +00:00
2021-02-24 14:19:29 +00:00
######## arm tests ########
test:linux:recommended:armv7:
2021-03-11 16:03:51 +00:00
stage: test
2021-02-24 14:19:29 +00:00
extends: .test_ghcup_version:armv7
variables:
GHC_VERSION: "8.10.4"
CABAL_VERSION: "3.4.0.0"
when: manual
2021-03-11 16:03:51 +00:00
needs: []
2021-02-24 14:19:29 +00:00
test:linux:recommended:aarch64:
2021-03-11 16:03:51 +00:00
stage: test
2021-02-24 14:19:29 +00:00
extends: .test_ghcup_version:aarch64
variables:
GHC_VERSION: "8.10.4"
CABAL_VERSION: "3.4.0.0"
when: manual
2021-03-11 16:03:51 +00:00
needs: []
2021-02-24 14:19:29 +00:00
######## darwin test ########
2020-04-15 07:45:18 +00:00
test:mac:recommended:
2021-02-25 13:12:07 +00:00
stage: test
2020-04-15 07:45:18 +00:00
extends: .test_ghcup_version:darwin
variables:
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2021-03-11 16:03:51 +00:00
needs: []
2020-04-15 07:45:18 +00:00
test:mac:latest:
2021-02-25 13:12:07 +00:00
stage: test
2020-04-15 07:45:18 +00:00
extends: .test_ghcup_version:darwin
variables:
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2021-03-11 16:03:51 +00:00
needs: []
test:mac:recommended:aarch64:
stage: test
extends: .test_ghcup_version:darwin:aarch64
variables:
GHC_VERSION: "8.10.5"
CABAL_VERSION: "3.4.0.0"
needs: []
######## freebsd test ########
test:freebsd:recommended:
2021-02-25 13:12:07 +00:00
stage: test
extends: .test_ghcup_version:freebsd
variables:
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2021-03-11 16:03:51 +00:00
allow_failure: true # freebsd runners are unreliable
when: manual
needs: []
test:freebsd:latest:
2021-02-25 13:12:07 +00:00
stage: test
extends: .test_ghcup_version:freebsd
variables:
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2021-03-11 16:03:51 +00:00
allow_failure: true # freebsd runners are unreliable
when: manual
needs: []
2020-04-15 07:45:18 +00:00
2021-05-14 21:09:45 +00:00
######## windows test ########
test:windows:recommended:
stage: test
extends: .test_ghcup_version:windows
variables:
GHC_VERSION: "8.10.4"
CABAL_VERSION: "3.4.0.0"
needs: []
2020-04-19 15:00:05 +00:00
######## linux release ########
2020-04-19 17:23:54 +00:00
release:linux:64bit:
2021-02-25 13:12:07 +00:00
stage: release
needs: ["test:linux:recommended", "test:linux:latest"]
2020-04-19 17:23:54 +00:00
extends:
- .alpine:64bit
- .release_ghcup
before_script:
- ./.gitlab/before_script/linux/alpine/install_deps.sh
variables:
ARTIFACT: "x86_64-linux-ghcup"
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2020-04-19 17:23:54 +00:00
release:linux:32bit:
2021-02-25 13:12:07 +00:00
stage: release
needs: ["test:linux:recommended:32bit"]
2020-04-19 15:00:05 +00:00
extends:
2020-04-19 17:23:54 +00:00
- .alpine:32bit
2020-04-19 15:00:05 +00:00
- .release_ghcup
before_script:
- ./.gitlab/before_script/linux/alpine/install_deps.sh
variables:
2020-04-27 14:23:44 +00:00
ARTIFACT: "i386-linux-ghcup"
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2020-04-19 17:23:54 +00:00
CABAL_VERSION: "3.2.0.0"
2020-04-19 15:00:05 +00:00
2021-02-24 14:19:29 +00:00
release:linux:armv7:
2021-02-25 13:12:07 +00:00
stage: release
needs: ["test:linux:recommended:armv7"]
2021-02-24 14:19:29 +00:00
extends:
- .linux:armv7
- .release_ghcup
before_script:
- ./.gitlab/before_script/linux/install_deps_manual.sh
variables:
ARTIFACT: "armv7-linux-ghcup"
GHC_VERSION: "8.10.4"
CABAL_VERSION: "3.4.0.0"
release:linux:aarch64:
2021-02-25 13:12:07 +00:00
stage: release
needs: ["test:linux:recommended:aarch64"]
2021-02-24 14:19:29 +00:00
extends:
- .linux:aarch64
- .release_ghcup
before_script:
- ./.gitlab/before_script/linux/install_deps_manual.sh
variables:
ARTIFACT: "aarch64-linux-ghcup"
GHC_VERSION: "8.10.4"
CABAL_VERSION: "3.4.0.0"
2020-04-19 15:00:05 +00:00
######## darwin release ########
release:darwin:
2021-02-25 13:12:07 +00:00
stage: release
needs: ["test:mac:recommended", "test:mac:latest"]
2020-04-19 15:00:05 +00:00
extends:
- .darwin
- .release_ghcup
- .root_cleanup
before_script:
- ./.gitlab/before_script/darwin/install_deps.sh
variables:
ARTIFACT: "x86_64-apple-darwin-ghcup"
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2020-04-19 15:00:05 +00:00
MACOSX_DEPLOYMENT_TARGET: "10.7"
######## freebsd release ########
release:freebsd:
2021-02-25 13:12:07 +00:00
stage: release
needs: ["test:freebsd:recommended", "test:freebsd:latest"]
2020-04-19 15:00:05 +00:00
extends:
- .freebsd
- .release_ghcup
- .root_cleanup
before_script:
- ./.gitlab/before_script/freebsd/install_deps.sh
variables:
ARTIFACT: "x86_64-portbld-freebsd-ghcup"
2021-02-24 14:19:29 +00:00
GHC_VERSION: "8.10.4"
2021-02-20 22:03:44 +00:00
CABAL_VERSION: "3.4.0.0"
2020-04-19 15:00:05 +00:00
2021-05-14 21:09:45 +00:00
######## windows release ########
release:windows:
stage: release
needs: ["test:windows:recommended"]
extends:
- .windows
- .release_ghcup
- .root_cleanup
before_script:
- bash ./.gitlab/before_script/windows/install_deps.sh
variables:
ARTIFACT: "x86_64-mingw64-ghcup"
GHC_VERSION: "8.10.4"
CABAL_VERSION: "3.4.0.0"
2021-03-11 16:03:51 +00:00
######## hlint ########
hlint:
stage: hlint
extends:
- .alpine:64bit
before_script:
- ./.gitlab/before_script/linux/alpine/install_deps.sh
script:
- ./.gitlab/script/hlint.sh
variables:
GHC_VERSION: "8.10.4"
CABAL_VERSION: "3.4.0.0"
JSON_VERSION: "0.0.4"
allow_failure: true
artifacts:
expire_in: 2 week
paths:
- report.html
when: on_failure