Skip to content

Commit

Permalink
root: updated Package CI job for the application
Browse files Browse the repository at this point in the history
Since this is a special shell script application in which AutomataCI
is yet to support, I need to modify the Package CI job and make sure
everything is working fine. Hence, let's do this.

This patch updates Package CI job for the application in root
repository.

Signed-off-by: (Holloway) Chew, Kean Ho <[email protected]>
  • Loading branch information
hollowaykeanho committed Mar 31, 2024
1 parent 91237a3 commit 41d3541
Show file tree
Hide file tree
Showing 37 changed files with 655 additions and 165 deletions.
59 changes: 53 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Holloway's HiAI
[![hiAI](src/icons/banner_1200x330.svg)](#holloways-hiai)
[![hollowayHIAI](src/icons/banner_1200x330.svg)](#holloways-hiai)

A local terminal polygot (POSIX Shell x PowerShell) bridging LLM AI prompt
interaction capabilities directly to your computer!

Turn every computer's terminal into an interactive AI prompt.

[![hiAi-demo-debian](src/screenshots/hiAI-demo-debian.gif)](#holloways-hiai)
[![hollowayHIAI-demo-debian](src/screenshots/hiAI-demo-debian.gif)](#holloways-hiai)



Expand Down Expand Up @@ -77,11 +77,57 @@ $ powershell.exe -noprofile `



## To Install

The software is packaged based on available OSes.



### Debian-based OS (`linux`, `hurd`, etc)

1. Download the latest `.deb` package from the [release section](https://github.com/ChewKeanHo/APP_hiAI/releases)
2. perform `$ dpkg -i <package>.deb`.

Don't worry, the package will setup the upstream apt repository list source
alongside the required GPG key for future `apt update`.



### Red-Hat Linux (`redhat`, `fedora`, etc)

1. Download the latest `.rpm` package from the [release section](https://github.com/ChewKeanHo/APP_hiAI/releases)
2. perform `$ rpm -i <package>.rpm`.

Don't worry, the package will setup the upstream apt repository list source
alongside the required GPG key for future `apt update`.



### Flatpak

*Coming Soon*

Note that the command to use is: `flatpak run [TBD] ...` due to how Flatpak
works.


### Docker / Podman

Please refer to [GitHub Packages Section](https://github.com/ChewKeanHo/APP_hiAI/pkgs/container/hollowayhiai).


### Plain Script

Use the `tar.gz` package.




## To Contribute

AutomataCI cannot be made successfully without contributions from (Holloway)
Chew, Kean Ho, his teams, and supports from external folks. If you had been
using AutomataCI and wish to contribute back, there are 2 ways to do so:
Holloway's HiAI! cannot be made successfully without contributions from
(Holloway) Chew, Kean Ho, his teams, and supports from external folks. If you
had been using it and wish to contribute back, there are 2 ways to do so:



Expand All @@ -105,4 +151,5 @@ free to refer the PDF Handbook and execute accordingly.


## License
AutomataCI is licensed under OSI compatible [Apache 2.0 License](LICENSE.txt).
Holloway's HiAI! is licensed under OSI compatible
[Apache 2.0 License](LICENSE.txt).
4 changes: 2 additions & 2 deletions automataCI/_package-deb_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ PACKAGE_Run_DEB() {
I18N_Check_Availability "DEB"
DEB_Is_Available "$_target_os" "$_target_arch"
case $? in
2|3)
2)
I18N_Check_Incompatible_Skipped
return 0
;;
0)
0|3)
# accepted
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions automataCI/_package-deb_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ function PACKAGE-Run-DEB {
$null = I18N-Check-Availability "DEB"
$___process = DEB-Is-Available "${_target_os}" "${_target_arch}"
switch ($___process) {
{ $_ -in 2, 3 } {
2 {
$null = I18N-Check-Incompatible-Skipped
return 0
} 0 {
} {$_ -in 0, 3} {
# accepted
} Default {
$null = I18N-Check-Failed
Expand Down
5 changes: 3 additions & 2 deletions automataCI/_package-flatpak_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ PACKAGE_Run_FLATPAK() {
I18N_Check_Availability "FLATPAK"
FLATPAK_Is_Available "$_target_os" "$_target_arch"
case $? in
2|3)
2)
I18N_Check_Incompatible_Skipped
return 0
;;
0)
0|3)
# accepted
;;
*)
I18N_Check_Failed
Expand Down
4 changes: 2 additions & 2 deletions automataCI/_package-flatpak_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ function PACKAGE-Run-FLATPAK {
$null = I18N-Check-Availability "FLATPAK"
$___process = FLATPAK-Is-Available "${_target_os}" "${_target_arch}"
switch ($___process) {
{ $_ -in 2, 3 } {
2 {
$null = I18N-Check-Incompatible-Skipped
return 0
} 0 {
} { $_ -in 0, 3 } {
break
} Default {
$null = I18N-Check-Failed
Expand Down
4 changes: 2 additions & 2 deletions automataCI/_package-ipk_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ PACKAGE_Run_IPK() {
I18N_Check_Availability "IPK"
IPK_Is_Available "$_target_os" "$_target_arch"
case $? in
2|3)
2)
I18N_Check_Incompatible_Skipped
return 0
;;
0)
0|3)
# accepted
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions automataCI/_package-ipk_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ function PACKAGE-Run-IPK {
$null = I18N-Check-Availability "IPK"
$___process = IPK-Is-Available "${_target_os}" "${_target_arch}"
switch ($___process) {
{ $_ -in 2, 3 } {
2 {
$null = I18N-Check-Incompatible-Skipped
return 0
} 0 {
} {$_ -in 0, 3} {
# accepted
} Default {
$null = I18N-Check-Failed
Expand Down
4 changes: 2 additions & 2 deletions automataCI/_package-rpm_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ PACKAGE_Run_RPM() {
I18N_Check_Availability "RPM"
RPM_Is_Available "$_target_os" "$_target_arch"
case $? in
2|3)
2)
I18N_Check_Incompatible_Skipped
return 0
;;
0)
0|3)
# accepted
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions automataCI/_package-rpm_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ function PACKAGE-Run-RPM {
$null = I18N-Check-Availability "RPM"
$___process = RPM-Is-Available "${_target_os}" "${_target_arch}"
switch ($___process) {
{ $_ -in 2, 3 } {
2 {
$null = I18N-Check-Incompatible-Skipped
return 0
} 0 {
} { $_ -in 0, 3} {
# accepted
} Default {
$null = I18N-Check-Failed-Skipped
Expand Down
2 changes: 2 additions & 0 deletions automataCI/package_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ for i in "${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}"/*; do
TARGET_OS="${TARGET_FILENAME##*_}"
TARGET_FILENAME="${TARGET_FILENAME%%_*}"
TARGET_ARCH="${TARGET_OS##*-}"
TARGET_ARCH="${TARGET_ARCH%%.*}"
TARGET_OS="${TARGET_OS%%-*}"
TARGET_OS="${TARGET_OS%%.*}"

if [ "$(STRINGS_Is_Empty "$TARGET_OS")" -eq 0 ] ||
[ "$(STRINGS_Is_Empty "$TARGET_ARCH")" -eq 0 ] ||
Expand Down
2 changes: 2 additions & 0 deletions automataCI/package_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ foreach ($file in (Get-ChildItem -Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_P
$TARGET_OS = $TARGET_FILENAME -replace ".*_"
$TARGET_FILENAME = $TARGET_FILENAME -replace "_.*"
$TARGET_ARCH = $TARGET_OS -replace ".*-"
$TARGET_ARCH = $TARGET_ARCH -replace "\..*$"
$TARGET_OS = $TARGET_OS -replace "-.*"
$TARGET_OS = $TARGET_OS -replace "\..*$"

if (($(STRINGS-Is-Empty "${TARGET_OS}") -eq 0) -or
($(STRINGS-Is-Empty "${TARGET_ARCH}") -eq 0) -or
Expand Down
26 changes: 14 additions & 12 deletions automataCI/services/compilers/deb.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -401,34 +401,36 @@ function DEB-Get-Architecture {
# process os
switch ($___os) {
"dragonfly" {
$___output="dragonflybsd"
$___output="dragonflybsd-"
} "linux" {
$___output=""
} default {
$___output="${___os}"
$___output="${___os}-"
}}


# process arch
switch ($___arch) {
{ $_ -in "386", "i386", "486", "i486", "586", "i586", "686", "i686" } {
$___output = "${___output}-i386"
$___output = "${___output}i386"
} "mipsle" {
$___output = "${___output}-mipsel"
$___output = "${___output}mipsel"
} "mipsr6le" {
$___output = "${___output}-mipsr6el"
$___output = "${___output}mipsr6el"
} "mips32le" {
$___output = "${___output}-mips32el"
$___output = "${___output}mips32el"
} "mips32r6le" {
$___output = "${___output}-mips32r6el"
$___output = "${___output}mips32r6el"
} "mips64le" {
$___output = "${___output}-mips64el"
$___output = "${___output}mips64el"
} "mips64r6le" {
$___output = "${___output}-mips64r6el"
$___output = "${___output}mips64r6el"
} "powerpcle" {
$___output = "${___output}-powerpcel"
$___output = "${___output}powerpcel"
} "ppc64le" {
$___output = "${___output}-ppc64el"
$___output = "${___output}ppc64el"
} default {
$___output = "${___output}-${___arch}"
$___output = "${___output}${___arch}"
}}


Expand Down
27 changes: 15 additions & 12 deletions automataCI/services/compilers/deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -384,46 +384,49 @@ DEB_Get_Architecture() {

# process os
case "$1" in
linux)
___output=""
;;
dragonfly)
___output="dragonflybsd"
___output="dragonflybsd-"
;;
*)
___output="$1"
___output="${1}-"
;;
esac


# process arch
case "$2" in
386|i386|486|i486|586|i586|686|i686)
___output="${___output}-i386"
___output="${___output}i386"
;;
mipsle)
___output="${___output}-mipsel"
___output="${___output}mipsel"
;;
mipsr6le)
___output="${___output}-mipsr6el"
___output="${___output}mipsr6el"
;;
mips32le)
___output="${___output}-mips32el"
___output="${___output}mips32el"
;;
mips32r6le)
___output="${___output}-mips32r6el"
___output="${___output}mips32r6el"
;;
mips64le)
___output="${___output}-mips64el"
___output="${___output}mips64el"
;;
mips64r6le)
___output="${___output}-mips64r6el"
___output="${___output}mips64r6el"
;;
powerpcle)
___output="${___output}-powerpcel"
___output="${___output}powerpcel"
;;
ppc64le)
___output="${___output}-ppc64el"
___output="${___output}ppc64el"
;;
*)
___output="${___output}-${2}"
___output="${___output}${2}"
;;
esac

Expand Down
2 changes: 1 addition & 1 deletion automataCI/services/compilers/flatpak.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function FLATPAK-Is-Available {

# check compatible target os
switch ($___os) {
linux {
{ $_ -in "linux", "any" } {
# accepted
} Default {
return 2
Expand Down
2 changes: 1 addition & 1 deletion automataCI/services/compilers/flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ FLATPAK_Is_Available() {

# check compatible target os
case "$___os" in
linux)
linux|any)
# accepted
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion automataCI/services/compilers/rpm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ function RPM-Is-Available {

# check compatible target os
switch ($___os) {
linux {
{ $_ -in "linux", "any" } {
break
} default {
return 2
Expand Down
2 changes: 1 addition & 1 deletion automataCI/services/compilers/rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ RPM_Is_Available() {

# check compatible target cpu architecture
case "$___os" in
linux)
linux|any)
;;
*)
return 2
Expand Down
Loading

0 comments on commit 41d3541

Please sign in to comment.