Commit Graph

4 Commits

Author SHA1 Message Date
ridiculousfish
44d45a22e3 Rename Dockerfile tags
Remove the fish_ prefix. Instead, tag them with
ghcr.io/fish-shell/fish-ci/
2022-11-01 16:44:46 -07:00
ridiculousfish
54a60d8dab Enable DOCKER_BUILDKIT
It just seems better without any major disadvantages.
2022-10-23 13:53:36 -07:00
Johannes Altmanninger
d96a2e7052 Make docker script work when CDPATH is set
Since #3914 we convert empty CDPATH entries to ".", which makes them
easier to use in fish scripts. This has backfired here, because bash's
cd prints the directory if the "." entry from CDPATH is used.
From bash(1) on cd:

> If a non-empty directory name from CDPATH is used, or  if  -  is
> the  first argument, and the directory change is successful, the
> absolute pathname of the new working directory is written to the
> standard output.

My preferred fix would be to convince bash to amend "non-empty
directory" to "non-empty directory other than .".
2021-04-17 22:53:34 +02:00
ridiculousfish
a6383002c3 Introduce Docker-based build and test environments
This is the start of an effort to make it easier to build and run tests in
various Linux environments. The idea is to reduce our reliance on CI and
also allow an easy to way capture tricky environments like musl or gcc 5.

This adds two initial Dockerfiles corresponding to Ubuntu Bionic, and
Ubuntu Bionic with Thread Sanitizer enabled. It also adds a new script
`docker/docker_run_tests.sh`. An example of usage:

    docker/docker_run_tests.sh docker/bionic-tsan.Dockerfile

When run, this builds a Docker image (which is cached after the first
build) and sets its entry point to a new script `fish_run_tests.sh`. It
then launches a container with that image, with a directory `/fish-source`
bound to the fish-shell source directory on the host. Note it is a bind
mount, not a copy, so changes to host files are instantly visible inside
the container. It then configures with CMake and runs the tests.

The Docker user is `fishuser` with password `fish`.

The script also supports two arguments `--shell-before` and
`--shell-after`. These drop the user into a bash shell before (or after)
the tests are run, to aid in debugging.

Note there's no automation for invoking this script yet; it must be run
manually. But it runs on both Mac and Linux!
2020-11-23 20:08:36 -08:00