cerbero ci: Refactor cerbero_before_script
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 21 Sep 2020 18:34:08 +0000 (00:04 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 22 Sep 2020 16:28:59 +0000 (21:58 +0530)
commit98e3c7d8b81a92f4fab9ea4bf39cb7fd472bb4e9
treecb63bccf90d0057787659ed7557b1355b538ddfb
parentef981bafc9540ca795e3ed0a6eb37950859d5da5
cerbero ci: Refactor cerbero_before_script

We were doing a few things suboptimally:

1. Making a symlink from the current directory to
   ../../gstreamer/cerbero so that build-tools kept working, which
   should not be necessary since cerbero relocates all binaries inside
   the cerbero homedir after extracting the cache.

2. Hard-coding the cerbero builddir when building on Windows because
   `pwd` was outputting an MSYS-style path which Python can't read

3. rsync-ing all the contents of $CERBERO_HOST_DIR, which is
   bad because we should be building on top of the artifact cache.
   The only thing we want from $CERBERO_HOST_DIR is cerbero-sources
   (the network cache), and we can setup the toolchain during
   bootstrap with the new --system and --toolchains arguments which
   were split out of --system-only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/350>
docker/cerbero/Dockerfile-fedora
docker/windows/prepare_cerbero_env.sh
gitlab/cerbero_setup.sh
gitlab/ci_template.yml