ci: CI should handle also arrays in meson cross-file
authorDavid Heidelberg <david.heidelberg@collabora.com>
Sat, 26 Nov 2022 20:29:38 +0000 (21:29 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Dec 2022 00:33:10 +0000 (00:33 +0000)
The new meson env2mfile generates everything in the arrays.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19863>

.gitlab-ci/container/create-cross-file.sh
.gitlab-ci/prepare-artifacts.sh

index dddb9a2..abfe72f 100755 (executable)
@@ -13,8 +13,9 @@ fi
 # shellcheck disable=SC1003 # how this sed doesn't seems to work for me locally
 sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
 
-# Add a line for rustc, which debcrossgen is missing.
-cc=$(sed -n 's|c = .\(.*\).|\1|p' < "$cross_file")
+# Add a line for rustc, which meson env2mfile is missing.
+cc=$(sed -n "s|^c\s*=\s*\[?'\(.*\)'\]?|\1|p" < "$cross_file")
+
 if [[ "$arch" = "arm64" ]]; then
     rust_target=aarch64-unknown-linux-gnu
 elif [[ "$arch" = "armhf" ]]; then
index bd098d5..1f24356 100755 (executable)
@@ -10,7 +10,7 @@ rm -rf install/bin install/include
 
 # Strip the drivers in the artifacts to cut 80% of the artifacts size.
 if [ -n "$CROSS" ]; then
-    STRIP=`sed -n -E "s/strip\s*=\s*'(.*)'/\1/p" "$CROSS_FILE"`
+    STRIP=$(sed -n -E "s/strip\s*=\s*\[?'(.*)'\]?/\1/p" "$CROSS_FILE")
     if [ -z "$STRIP" ]; then
         echo "Failed to find strip command in cross file"
         exit 1