Module: Mesa
Branch: main
Commit: bcc0947ed0ddf02dd985dbffc7dff893e3e1a6f5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcc0947ed0ddf02dd985dbffc7dff893e3e1a6f5

Author: David Heidelberg <[email protected]>
Date:   Thu Jun  1 11:35:00 2023 +0200

ci: use bash arrays in Fedora script + shebang change

We not passing very long string, but multiple separate packages, using
the array seems to be more logical and clear solution, without
shellcheck complaining about word spliting and risk making of accidental
mistakes (missed backslash etc.).

Shebang change, because let's have it same everywhere.

Reviewed-by: Eric Engestrom <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23425>

---

 .gitlab-ci/container/fedora/x86_64_build.sh | 127 ++++++++++++++--------------
 .gitlab-ci/image-tags.yml                   |   2 +-
 2 files changed, 65 insertions(+), 64 deletions(-)

diff --git a/.gitlab-ci/container/fedora/x86_64_build.sh 
b/.gitlab-ci/container/fedora/x86_64_build.sh
index 05f0d2b056e..c10a122b777 100644
--- a/.gitlab-ci/container/fedora/x86_64_build.sh
+++ b/.gitlab-ci/container/fedora/x86_64_build.sh
@@ -1,77 +1,78 @@
-#!/bin/bash
-# shellcheck disable=SC2086 # we want word splitting
-
+#!/usr/bin/env bash
+# shellcheck disable=SC1091
 set -e
 set -o xtrace
 
 
-EPHEMERAL="
+EPHEMERAL=(
         autoconf
         automake
         bzip2
         cmake
         git
         libtool
-        pkgconfig(epoxy)
-        pkgconfig(gbm)
-        pkgconfig(openssl)
+        "pkgconfig(epoxy)"
+        "pkgconfig(gbm)"
+        "pkgconfig(openssl)"
         unzip
         xz
-        "
-
-dnf install -y --setopt=install_weak_deps=False \
-    bindgen \
-    bison \
-    clang-devel \
-    flex \
-    gcc \
-    gcc-c++ \
-    gettext \
-    glslang \
-    kernel-headers \
-    llvm-devel \
-    meson \
-    "pkgconfig(LLVMSPIRVLib)" \
-    "pkgconfig(SPIRV-Tools)" \
-    "pkgconfig(dri2proto)" \
-    "pkgconfig(expat)" \
-    "pkgconfig(glproto)" \
-    "pkgconfig(libclc)" \
-    "pkgconfig(libelf)" \
-    "pkgconfig(libglvnd)" \
-    "pkgconfig(libomxil-bellagio)" \
-    "pkgconfig(libselinux)" \
-    "pkgconfig(libva)" \
-    "pkgconfig(pciaccess)" \
-    "pkgconfig(vdpau)" \
-    "pkgconfig(vulkan)" \
-    "pkgconfig(x11)" \
-    "pkgconfig(x11-xcb)" \
-    "pkgconfig(xcb)" \
-    "pkgconfig(xcb-dri2)" \
-    "pkgconfig(xcb-dri3)" \
-    "pkgconfig(xcb-glx)" \
-    "pkgconfig(xcb-present)" \
-    "pkgconfig(xcb-randr)" \
-    "pkgconfig(xcb-sync)" \
-    "pkgconfig(xcb-xfixes)" \
-    "pkgconfig(xdamage)" \
-    "pkgconfig(xext)" \
-    "pkgconfig(xfixes)" \
-    "pkgconfig(xrandr)" \
-    "pkgconfig(xshmfence)" \
-    "pkgconfig(xxf86vm)" \
-    "pkgconfig(zlib)" \
-    procps-ng \
-    python-unversioned-command \
-    python3-devel \
-    python3-mako \
-    python3-ply \
-    rust-packaging \
-    vulkan-headers \
-    spirv-tools-devel \
-    spirv-llvm-translator-devel \
-    $EPHEMERAL
+)
+
+DEPS=(
+    bindgen
+    bison
+    clang-devel
+    flex
+    gcc
+    gcc-c++
+    gettext
+    glslang
+    kernel-headers
+    llvm-devel
+    meson
+    "pkgconfig(LLVMSPIRVLib)"
+    "pkgconfig(SPIRV-Tools)"
+    "pkgconfig(dri2proto)"
+    "pkgconfig(expat)"
+    "pkgconfig(glproto)"
+    "pkgconfig(libclc)"
+    "pkgconfig(libelf)"
+    "pkgconfig(libglvnd)"
+    "pkgconfig(libomxil-bellagio)"
+    "pkgconfig(libselinux)"
+    "pkgconfig(libva)"
+    "pkgconfig(pciaccess)"
+    "pkgconfig(vdpau)"
+    "pkgconfig(vulkan)"
+    "pkgconfig(x11)"
+    "pkgconfig(x11-xcb)"
+    "pkgconfig(xcb)"
+    "pkgconfig(xcb-dri2)"
+    "pkgconfig(xcb-dri3)"
+    "pkgconfig(xcb-glx)"
+    "pkgconfig(xcb-present)"
+    "pkgconfig(xcb-randr)"
+    "pkgconfig(xcb-sync)"
+    "pkgconfig(xcb-xfixes)"
+    "pkgconfig(xdamage)"
+    "pkgconfig(xext)"
+    "pkgconfig(xfixes)"
+    "pkgconfig(xrandr)"
+    "pkgconfig(xshmfence)"
+    "pkgconfig(xxf86vm)"
+    "pkgconfig(zlib)"
+    procps-ng
+    python-unversioned-command
+    python3-devel
+    python3-mako
+    python3-ply
+    rust-packaging
+    vulkan-headers
+    spirv-tools-devel
+    spirv-llvm-translator-devel
+)
+
+dnf install -y --setopt=install_weak_deps=False "${DEPS[@]}" "${EPHEMERAL[@]}"
 
 
 . .gitlab-ci/container/container_pre_build.sh
@@ -104,6 +105,6 @@ popd
 
 ############### Uninstall the build software
 
-dnf remove -y $EPHEMERAL
+dnf remove -y "${EPHEMERAL[@]}"
 
 . .gitlab-ci/container/container_post_build.sh
diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml
index c515af3b1c7..0c19721ef38 100644
--- a/.gitlab-ci/image-tags.yml
+++ b/.gitlab-ci/image-tags.yml
@@ -20,7 +20,7 @@ variables:
    DEBIAN_X86_64_TEST_VK_TAG: "2023-05-25-vkd3d-proton"
 
    ALPINE_X86_64_BUILD_TAG: "2023-05-01-3.18-bump-1"
-   FEDORA_X86_64_BUILD_TAG: "2023-04-26-rusticl"
+   FEDORA_X86_64_BUILD_TAG: "2023-05-05-ccache-on"
    KERNEL_ROOTFS_TAG: "2023-05-31-vvl"
 
    WINDOWS_X64_VS_PATH: "windows/x64_vs"

Reply via email to