Skip to content

Commit

Permalink
Added CI step to check installed python files
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Engel <[email protected]>
  • Loading branch information
engelmi committed Feb 10, 2025
1 parent 56f146c commit c56a632
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/install_ramalama.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ jobs:
run: |
chmod +x install.sh
sudo ./install.sh -l
- name: Verify RamaLama installation
run: |
install_dir=$(sudo ./install.sh get_installation_dir)/ramalama/
ls -f -A ramalama/ | while read file; do ls -f -A $install_dir | grep $file; done
- name: Ramalama info
run: |
ramalama info
Expand Down
22 changes: 14 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ check_platform() {
return 0
}

get_installation_dir() {
local sharedirs=("/opt/homebrew/share" "/usr/local/share" "/usr/share")
for dir in "${sharedirs[@]}"; do
if [ -d "$dir" ]; then
echo "$dir/ramalama"
break
fi
done
}

setup_ramalama() {
local binfile="ramalama"
local from_file="${binfile}"
Expand All @@ -114,13 +124,7 @@ setup_ramalama() {
download "$url" "$to_file"
local ramalama_bin="${1}/${binfile}"
local sharedirs=("/opt/homebrew/share" "/usr/local/share" "/usr/share")
local syspath
for dir in "${sharedirs[@]}"; do
if [ -d "$dir" ]; then
syspath="$dir/ramalama"
break
fi
done
local syspath=$(get_installation_dir)

$sudo install -m755 -d "$syspath"
syspath="$syspath/ramalama"
Expand Down Expand Up @@ -154,6 +158,9 @@ main() {
local_install="true"
shift
;;
get_*)
get_installation_dir
return;;
*)
break
esac
Expand Down Expand Up @@ -184,4 +191,3 @@ main() {
}

main "$@"

0 comments on commit c56a632

Please sign in to comment.