75 lines
1.5 KiB
Bash
Executable File
75 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
#set -euo pipefail
|
|
|
|
|
|
SCRIPT_PATH=$(dirname "$0")
|
|
DESTINATION="$1"
|
|
|
|
echo "Workspace: $GITHUB_WORKSPACE"
|
|
echo "Script Path: $SCRIPT_PATH"
|
|
echo "Destination: $DESTINATION"
|
|
|
|
|
|
URL="https://gitea.psi.ch/python/pixi/releases/download/latest/pixi-x86_64-unknown-linux-musl.tar.gz"
|
|
curl --location --silent --show-error --remote-name "$URL"
|
|
|
|
ARCHIVE=$(basename "$URL")
|
|
tar xzf "$ARCHIVE"
|
|
|
|
|
|
cd "$DESTINATION"
|
|
|
|
# enforce glibc version of target system (consoles) instead of runner system
|
|
export CONDA_OVERRIDE_GLIBC=2.28
|
|
|
|
if [[ -f "pixi.toml" ]]; then
|
|
echo "pixi already initialized"
|
|
else
|
|
echo "pixi init"
|
|
"$GITHUB_WORKSPACE/pixi" init
|
|
fi
|
|
|
|
echo pixi config pypi mirror
|
|
"$GITHUB_WORKSPACE/pixi" config set pypi-config.index-url https://pypi.psi.ch/simple
|
|
|
|
ls -la .pixi/envs/default/bin/python3.14
|
|
|
|
scanelf -BF 'file=%F
|
|
machine=%a
|
|
class=%M
|
|
type=%t
|
|
osabi=%o
|
|
interpreter=%i
|
|
needed=%n
|
|
rpath=%r
|
|
runpath=%p
|
|
soname=%S
|
|
' .pixi/envs/default/bin/python3.14
|
|
|
|
scanelf -i .pixi/envs/default/bin/python3.14
|
|
ls -l /lib64/ld-linux-x86-64.so.*
|
|
ls -l /lib/ld-musl-x86_64.so.*
|
|
|
|
.pixi/envs/default/bin/python3.14 -c 'print("python ran ?!?")'
|
|
|
|
echo "pixi install"
|
|
"$GITHUB_WORKSPACE/pixi" install --all --no-progress
|
|
|
|
|
|
#echo "copy owner group from level above"
|
|
#group=$(stat -c '%g' ..)
|
|
#echo "=> group ID: $group"
|
|
#chgrp -R "$group" .pixi
|
|
|
|
#echo "copy permissions from owner to owner group"
|
|
#chmod -R g=u .pixi
|
|
|
|
"$SCRIPT_PATH/symlink.sh" "$DESTINATION/.pixi/envs" "$DESTINATION/../../envs"
|
|
|
|
|
|
echo "setup.sh done 🚀"
|
|
|
|
|
|
|