【发布时间】:2021-04-17 23:01:53
【问题描述】:
我的 CI 找不到堆栈,我不知道为什么。我正在使用以下 .gitlab-ci.yml 文件为 Haskell Stack 项目设置 gitlab-CI。我是从this other question that claims it worked 那里拿到的。
image: haskell:8.6.5
cache:
paths:
- .stack
- .stack-work
- target
test:
stage: test
script:
- ghc --version
- stack --system-ghc build
- stack test
但是它失败并报告(下面的完整输出):
bash: line 96: ghc: command not found
ERROR: Job failed: exit status 1
很明显,ghc 不见了,但我认为图像上出现了 haskell:8.6.5 不是吗?
我尝试了其他图片,例如image: fpco/stack-build:lts-11.15,但没有任何运气(报告bash: line 96: stack: command not found)。
我最好的猜测是我错过了确保ghc 和stack 在我使用的图像上的关键步骤,但我无法弄清楚它是什么。那么,我错过了什么?
编辑:完整的错误输出
Running with gitlab-runner 13.2.2 (a998cacd)
on karson: Ubuntu 20.04 LTS Shared q_B8_V-j
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:00
Running on karson...
Getting source from Git repository
00:01
Fetching changes with git depth set to 50...
Initialized empty Git repository in /var/lib/gitlab-runner/builds/q_B8_V-j/0/fromager/cheesecloth/MicroRAM/.git/
Created fresh repository.
Checking out 4d7e065d as 39-continuous-integration...
Skipping Git submodules setup
Restoring cache
00:00
Checking cache for default...
Runtime platform arch=amd64 os=linux pid=4053876 revision=a998cacd version=13.2.2
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
Executing "step_script" stage of the job script
00:00
$ ghc --version
bash: line 96: ghc: command not found
ERROR: Job failed: exit status 1
【问题讨论】:
-
你能发布完整的输出日志吗?目前的猜测是它没有使用
haskell:8.6.5和其他一些默认图像,但应该在作业日志的顶部显示。 -
添加了完整的输出。你可能是对的,似乎它没有加载 Haskell,但我不知道如何让它做到这一点。我虽然
image: haskell:8.6.5是执行此操作的命令。
标签: haskell gitlab gitlab-ci ghc haskell-stack