From d9e3a3f09ff82fafab85f1d8631c9e8689850510 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 30 May 2024 17:00:30 -0400 Subject: CI: make cuda tests even run to begin with Arch profile.d scripts were converted to use an appending function that disappears when /etc/profile exits, and overall are simply not suitable -- any more -- for sourcing individually. (I will freely admit I'm not really sure what the overall goal of refraining from sourcing /etc/profile itself is. Arguably it's kind of misuse of the profile...) This silently broke the cuda tests, which never ran because the cuda compiler was not detected as available. While we are at it, I guess we can convert gentoo to use the same trick of appending it in install.sh --- ci/ciimage/build.py | 5 ----- ci/ciimage/cuda/install.sh | 2 +- ci/ciimage/gentoo/install.sh | 2 ++ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ci/ciimage/build.py b/ci/ciimage/build.py index b355c47a7..b9d318158 100755 --- a/ci/ciimage/build.py +++ b/ci/ciimage/build.py @@ -80,11 +80,6 @@ class Builder(BuilderBase): fi ''' - if self.data_dir.name == 'gentoo': - out_data += ''' - source /etc/profile - ''' - out_file.write_text(out_data, encoding='utf-8') # make it executable diff --git a/ci/ciimage/cuda/install.sh b/ci/ciimage/cuda/install.sh index 7c79d28ec..6c4fd3b09 100755 --- a/ci/ciimage/cuda/install.sh +++ b/ci/ciimage/cuda/install.sh @@ -18,4 +18,4 @@ install_minimal_python_packages # Manually remove cache to avoid GitHub space restrictions rm -rf /var/cache/pacman -echo "source /etc/profile.d/cuda.sh" >> /ci/env_vars.sh +echo "source /etc/profile" >> /ci/env_vars.sh diff --git a/ci/ciimage/gentoo/install.sh b/ci/ciimage/gentoo/install.sh index b2a697fcb..8f7aa33f5 100755 --- a/ci/ciimage/gentoo/install.sh +++ b/ci/ciimage/gentoo/install.sh @@ -156,3 +156,5 @@ rm /usr/lib/python/EXTERNALLY-MANAGED python3 -m ensurepip install_python_packages python3 -m pip install "${base_python_pkgs[@]}" + +echo "source /etc/profile" >> /ci/env_vars.sh -- cgit v1.2.3