From 813c3324f001a43be1f9fbadbffe6942e243bc4d Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 11 Jun 2021 15:54:34 +0100 Subject: [PATCH] ci: Be consistent about install path Make both LAVA and bare-metal untar into $CI_PROJECT_DIR/install/, and symlink /install/ to it during init. Signed-off-by: Daniel Stone Acked-by: Martin Peres Acked-by: Emma Anholt Reviewed-by: Tomeu Vizoso Part-of: --- .gitlab-ci/bare-metal/rootfs-setup.sh | 1 - .gitlab-ci/common/init.sh | 4 ++++ .gitlab-ci/lava/lava.yml.jinja2 | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/bare-metal/rootfs-setup.sh b/.gitlab-ci/bare-metal/rootfs-setup.sh index 48fd05ec890..4d1cf83c5d0 100644 --- a/.gitlab-ci/bare-metal/rootfs-setup.sh +++ b/.gitlab-ci/bare-metal/rootfs-setup.sh @@ -21,4 +21,3 @@ set -x # Add the Mesa drivers we built, and make a consistent symlink to them. mkdir -p $rootfs_dst/$CI_PROJECT_DIR rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/ -ln -sf $CI_PROJECT_DIR/install $rootfs_dst/install diff --git a/.gitlab-ci/common/init.sh b/.gitlab-ci/common/init.sh index 3c59de7c195..ef8499c83ac 100755 --- a/.gitlab-ci/common/init.sh +++ b/.gitlab-ci/common/init.sh @@ -21,6 +21,10 @@ for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true # Set up any devices required by the jobs [ -z "$HWCI_KERNEL_MODULES" ] || (echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe) +# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect +# it in /install +ln -sf $CI_PROJECT_DIR/install /install + # Store Mesa's disk cache under /tmp, rather than sending it out over NFS. export XDG_CACHE_HOME=/tmp diff --git a/.gitlab-ci/lava/lava.yml.jinja2 b/.gitlab-ci/lava/lava.yml.jinja2 index 9368bb5bf35..6d8df7379b2 100644 --- a/.gitlab-ci/lava/lava.yml.jinja2 +++ b/.gitlab-ci/lava/lava.yml.jinja2 @@ -82,11 +82,11 @@ actions: - echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts - for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done - - wget -S --progress=dot:giga -O- {{ mesa_build_url }} | tar -xz + - mkdir -p $CI_PROJECT_DIR + - wget -S --progress=dot:giga -O- {{ mesa_build_url }} | tar -xz -C $CI_PROJECT_DIR - wget -S --progress=dot:giga -O- {{ job_rootfs_overlay_url }} | tar -xz -C / - . /set-job-env-vars.sh - - mkdir -p $CI_PROJECT_DIR - - ln -sf /install $CI_PROJECT_DIR/install + - ln -sf $CI_PROJECT_DIR/install /install # Set up our devices - '[ -z "$HWCI_KERNEL_MODULES" ] || (echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe)'