On Sunday, 7 June 2020 at 12:24:13 UTC, Russel Winder wrote:
On Sun, 2020-06-07 at 10:30 +0000, Basile B. via Digitalmars-d-learn wrote: […]
What is the docker image that you use ? If it is an older version maybe that the $DUB env variable is not yet supported by the dub version that's installed (it exists since 2.084.0 according to [1]).

I am using ubuntu:focal. ubuntu:bionic has ldc 1.8 which is far too old. Focal has ldc 1.20.

I think the dub version is 1.19.<something>

I am having to manually symbolically link /usr/bin/gcc and /usr/bin/cc so I suspect the installation of focal is not going quite right. Especially as I have to manually set a TZ variable to avoid a lock up.

In my .gitalab-ci.yml I use 'dlang2/ldc-ubuntu' [2] or 'dlang2/dmd-ubuntu' [3] which give always recent versions of D.

[1] https://dlang.org/changelog/2.084.0.html
[2] https://hub.docker.com/r/dlang2/ldc-ubuntu
[3] https://hub.docker.com/r/dlang2/dmd-ubuntu

I shall have to investigate these docker images in favour of working with a bare Ubuntu.

Yes because that works reasonably well on gitlab.
The only problem is that you might have to setup other things as their ubuntu image is very light. Software like zip or even git are not there by default.

A simple example of `.gitlab-ci.yml` file to support D is

---
job:
  image: dlang2/dmd-ubuntu
  before_script:
  # tools that are not in their base ubuntu image
  - apt-get update -y
  - apt-get install -y supplemental_package_x
  - apt-get install -y supplemental_package_y
  # similarly to what's done on most of the other CI services
  script:
  - bash some_script.sh
  - dub build
  - dub test
  # - etc.
---

Reply via email to