67 lines
1.4 KiB
Bash
Executable File
67 lines
1.4 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
|
|
|
|
which readelf
|
|
which scanelf
|
|
which xxd
|
|
which hexdump
|
|
which od
|
|
which strings
|
|
which unzip
|
|
|
|
ls -la .pixi/envs/default/bin/python3.14
|
|
readelf -h .pixi/envs/default/bin/python3.14
|
|
.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 🚀"
|
|
|
|
|
|
|