Skip to content

Commit

Permalink
[Utils] Installer: Improvements for plugin and platform specific pack…
Browse files Browse the repository at this point in the history
…age management (WasmEdge#2205)

* [Utils] Installer: Cleanup code

- Remove redifined imports and unused imports that were initially
  introduced for compatibility between python2 and python3

- Remove DEPENDENCIES variable as we are not relied on it for now

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Add new plugins

- Ref: WasmEdge#2198

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Fix default plugins version to wasmedge version and
path in env

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Add and Fix CI tests for the previous commit

- Fix: The previous commits allows plugins version to be same as
  wasmedge version. The version used in the tests was not used before
  hence it did not fail. However due to the fix it now fails and is
  restored to the correct version.

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Distinguish default and non system path

Signed-off-by: Shreyas Atre <[email protected]>

* Revert "[Utils] Installer: Distinguish default and non system path"

This reverts commit 42dc1e5.

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer CI: Remove incorrect space

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Deprecate 0.8.x

- Ref: WasmEdge#2062
  WasmEdge#2201

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Provided default choices for platform,os

- Also added same argument names for platform as os and for machine as
  arch

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Make case insensitive argument value for
platform/os,machine/arch,dist

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Remove image-deps installation and related
functionality

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Fix unreachable code/ control flow

Signed-off-by: Shreyas Atre <[email protected]>

* [Utils] Installer: Fix checking of remote version availability for
WasmEdge version

Signed-off-by: Shreyas Atre <[email protected]>

Signed-off-by: Shreyas Atre <[email protected]>
  • Loading branch information
SAtacker authored Jan 9, 2023
1 parent 3726722 commit 4ea40c3
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 323 deletions.
49 changes: 12 additions & 37 deletions .github/workflows/test-install-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,53 +109,28 @@ jobs:
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
- name: Install deprecated WasmEdge specific release (0.8.2)
- name: Install deprecated WasmEdge specific release (0.9.0)
run: |
bash utils/install.sh -v 0.8.2 -D
bash utils/install.sh -v 0.9.0 -D
- name: Uninstall WasmEdge
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge specific release (0.8.2) with all extensions
- name: Install WasmEdge specific release (0.9.0) with all extensions
run: |
bash utils/install.sh -e all -v 0.8.2 -D
bash utils/install.sh -e all -v 0.9.0 -D
- name: Install WasmEdge and test for arm extension installation
run: |
bash utils/install.sh -e all --version=0.9.1-beta.1 \
--tf-version=0.9.1-beta.1 --tf-deps-version=0.9.1-beta.1 --tf-tools-version=0.9.1-beta.1 \
--image-version=0.9.1-beta.1 --image-deps-version=0.9.1-beta.1
--image-version=0.9.1-beta.1
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
- name: Install wasmedge-image-deps with 0.8.2
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
if echo "$(bash utils/install.sh -e image -v 0.8.2 --image-version=0.8.2 --image-deps-version=0.8.2 2>&1 | tee output.log)" | grep -qE deps;then echo "Pass: Deps found in 0.8.2";\
else echo "Failed: Deps not found in 0.8.2" && cat output.log && exit 1; fi;
- name: Uninstall WasmEdge with Image extensions
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Installs wasmedge-image-deps with 0.8.1
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
echo "$(bash utils/install.sh -e image -v 0.8.1 --image-version=0.8.1 --image-deps-version=0.8.1 2>&1 | tee output.log)" | grep -qE deps && echo "Pass: Deps found in 0.8.1" \
|| (echo "Failed: Deps not found in 0.8.1" && cat output.log && exit 1)
- name: Uninstall WasmEdge with Image extensions
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Don't install wasmedge-image-deps with 0.9.0-rc.1
run: |
if echo "$(bash utils/install.sh -e image -v 0.9.0-rc.1 --image-version=0.9.0-rc.1 --image-deps-version=0.9.0-rc.1 2>&1 | tee output.log)" | grep -qE deps;then echo "Failed: Deps found in 0.9.0-rc.1" \
&& cat output.log && exit 1; else echo "Pass: Deps not found in 0.9.0-rc.1"; fi;
- name: Uninstall WasmEdge with Image extensions
run: |
bash utils/uninstall.sh -q -V
bash utils/uninstall.sh -q -V
- name: Install versions multiple times
run: |
bash utils/install.sh -e all -D
bash utils/install.sh -e all -v 0.9.0-rc.1 -D
bash utils/install.sh -e all -v 0.8.1 -D
bash utils/install.sh -e all -v 0.9.1 -D
bash utils/install.sh -e all -v 0.9.0 -D
- name: Uninstall WasmEdge
run: |
bash utils/uninstall.sh -q -V
Expand Down Expand Up @@ -225,15 +200,15 @@ jobs:
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
- name: Install deprecated WasmEdge specific release (0.8.2)
- name: Install deprecated WasmEdge specific release (0.9.0)
run: |
bash utils/install.sh -v 0.8.2 -D
bash utils/install.sh -v 0.9.0 -D
- name: Uninstall WasmEdge
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge specific release (0.8.2) with all extensions
- name: Install WasmEdge specific release (0.9.0) with all extensions
run: |
bash utils/install.sh -e all -v 0.8.2 -D
bash utils/install.sh -e all -v 0.9.0 -D
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
Expand Down
93 changes: 30 additions & 63 deletions .github/workflows/test-python-install-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,64 +108,31 @@ jobs:
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge specific release (0.8.2)
- name: Install WasmEdge specific release (0.9.0)
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
${{ matrix.python2_ex }} utils/install.py -v 0.8.2 -D
${{ matrix.python3_ex }} utils/install.py -v 0.8.2 -D
${{ matrix.python2_ex }} utils/install.py -v 0.9.0 -D
${{ matrix.python3_ex }} utils/install.py -v 0.9.0 -D
- name: Uninstall WasmEdge
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge specific release (0.8.2) with all extensions
- name: Install WasmEdge specific release (0.9.0) with all extensions
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
${{ matrix.python2_ex }} utils/install.py -e all -v 0.8.2 -D
${{ matrix.python3_ex }} utils/install.py -e all -v 0.8.2 -D
${{ matrix.python2_ex }} utils/install.py -e all -v 0.9.0 -D
${{ matrix.python3_ex }} utils/install.py -e all -v 0.9.0 -D
- name: Install WasmEdge with all extensions compatible with min version for all platforms
run: |
${{ matrix.python2_ex }} utils/install.py -e all --version=0.9.1-beta.1 \
--tf-version=0.9.1-beta.1 --tf-deps-version=0.9.1-beta.1 --tf-tools-version=0.9.1-beta.1 \
--image-version=0.9.1-beta.1 --image-deps-version=0.9.1-beta.1 -D
--image-version=0.9.1-beta.1 -D
${{ matrix.python3_ex }} utils/install.py -e all --version=0.9.1-beta.1 \
--tf-version=0.9.1-beta.1 --tf-deps-version=0.9.1-beta.1 --tf-tools-version=0.9.1-beta.1 \
--image-version=0.9.1-beta.1 --image-deps-version=0.9.1-beta.1 -D
--image-version=0.9.1-beta.1 -D
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
- name: Install wasmedge-image-deps with 0.8.2
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
if echo "$(${{ matrix.python2_ex }} utils/install.py -e image -v 0.8.2 --image-version=0.8.2 --image-deps-version=0.8.2 2>&1 | tee output.log)" | grep -qE deps;then echo "Pass: Deps found in 0.8.2";\
else echo "Failed: Deps not found in 0.8.2" && cat output.log && exit 1; fi;
if echo "$(${{ matrix.python3_ex }} utils/install.py -e image -v 0.8.2 --image-version=0.8.2 --image-deps-version=0.8.2 2>&1 | tee output.log)" | grep -qE deps;then echo "Pass: Deps found in 0.8.2";\
else echo "Failed: Deps not found in 0.8.2" && cat output.log && exit 1; fi;
- name: Uninstall WasmEdge with Image extensions
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Installs wasmedge-image-deps with 0.8.1
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
echo "$(${{ matrix.python2_ex }} utils/install.py -e image -v 0.8.1 --image-version 0.8.1 --image-deps-version 0.8.1 2>&1 | tee output.log)" | grep -qE "Installing image deps" && echo "Pass: Deps found in 0.8.1" \
|| (echo "Failed: Deps not found in 0.8.1" && cat output.log && exit 1)
echo "$(${{ matrix.python3_ex }} utils/install.py -e image -v 0.8.1 --image-version 0.8.1 --image-deps-version 0.8.1 2>&1 | tee output.log)" | grep -qE "Installing image deps" && echo "Pass: Deps found in 0.8.1" \
|| (echo "Failed: Deps not found in 0.8.1" && cat output.log && exit 1)
- name: Uninstall WasmEdge with Image extensions
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Don't install wasmedge-image-deps with 0.9.0-rc.1
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
if echo "$(${{ matrix.python2_ex }} utils/install.py -e image -v 0.9.0-rc.1 --image-version=0.9.0-rc.1 --image-deps-version=0.9.0-rc.1 2>&1 | tee output.log)" | grep -qE deps;then echo "Failed: Deps found in 0.9.0-rc.1" \
&& cat output.log && exit 1; else echo "Pass: Deps not found in 0.9.0-rc.1"; fi;
if echo "$(${{ matrix.python3_ex }} utils/install.py -e image -v 0.9.0-rc.1 --image-version=0.9.0-rc.1 --image-deps-version=0.9.0-rc.1 2>&1 | tee output.log)" | grep -qE deps;then echo "Failed: Deps found in 0.9.0-rc.1" \
&& cat output.log && exit 1; else echo "Pass: Deps not found in 0.9.0-rc.1"; fi;
- name: Uninstall WasmEdge with Image extensions
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Install versions multiple times
run: |
${{ matrix.python2_ex }} utils/install.py -e all -D
Expand Down Expand Up @@ -223,19 +190,19 @@ jobs:
if: ${{ matrix.name == 'Ubuntu 20.04' }}
run: |
# Multiple plugin download
${{ matrix.python2_ex }} utils/install.py --plugins wasi_nn-openvino wasi_crypto -D
ls ~/.wasmedge/plugin/ | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -p ~/new_wasmedge --plugins wasi_nn-openvino wasi_crypto -D
ls ~/new_wasmedge/plugin/ | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -p /usr --plugins wasi_nn-openvino wasi_crypto -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py --plugins wasi_nn-openvino wasi_crypto wasi_nn-pytorch wasi_nn-tensorflowlite wasmedge_httpsreq -D
ls ~/.wasmedge/plugin/ | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so\|libwasmedgePluginHttpsReq.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -p ~/new_wasmedge --plugins wasi_nn-openvino wasi_crypto wasi_nn-pytorch wasi_nn-tensorflowlite wasmedge_httpsreq -D
ls ~/new_wasmedge/plugin/ | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so\|libwasmedgePluginHttpsReq.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -p /usr --plugins wasi_nn-openvino wasi_crypto wasi_nn-pytorch wasi_nn-tensorflowlite wasmedge_httpsreq -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so\|libwasmedgePluginHttpsReq.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py --plugins wasi_nn-openvino wasi_crypto -D
ls ~/.wasmedge/plugin/ | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -p ~/new_wasmedge --plugins wasi_nn-openvino wasi_crypto -D
ls ~/new_wasmedge/plugin/ | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -p /usr --plugins wasi_nn-openvino wasi_crypto -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py --plugins wasi_nn-openvino wasi_crypto wasi_nn-pytorch wasi_nn-tensorflowlite wasmedge_httpsreq -D
ls ~/.wasmedge/plugin/ | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so\|libwasmedgePluginHttpsReq.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -p ~/new_wasmedge --plugins wasi_nn-openvino wasi_crypto wasi_nn-pytorch wasi_nn-tensorflowlite wasmedge_httpsreq -D
ls ~/new_wasmedge/plugin/ | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so\|libwasmedgePluginHttpsReq.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -p /usr --plugins wasi_nn-openvino wasi_crypto wasi_nn-pytorch wasi_nn-tensorflowlite wasmedge_httpsreq -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep -E libwasmedgePluginWasiNN.so\|libwasmedgePluginWasiCrypto.so\|libwasmedgePluginHttpsReq.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)

- name: Externally Specified plugins install check (wrong name)(Ubuntu)
if: ${{ matrix.name == 'Ubuntu 20.04' }}
Expand All @@ -250,18 +217,18 @@ jobs:
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
# Single plugin download
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-alpha.1 --plugins wasi_crypto -D
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-rc.1 --plugins wasi_crypto -D
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-alpha.1 -p ~/new_wasmedge --plugins wasi_crypto -D
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-rc.1 -p ~/new_wasmedge --plugins wasi_crypto -D
ls ~/new_wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-alpha.1 -p /usr --plugins wasi_crypto -D
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-rc.1 -p /usr --plugins wasi_crypto -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-alpha.1 --plugins wasi_crypto -D
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-rc.1 --plugins wasi_crypto -D
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-alpha.1 -p ~/new_wasmedge --plugins wasi_crypto -D
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-rc.1 -p ~/new_wasmedge --plugins wasi_crypto -D
ls ~/new_wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-alpha.1 -p /usr --plugins wasi_crypto -D
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-rc.1 -p /usr --plugins wasi_crypto -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)

- name: Check for differences in the installation
Expand Down Expand Up @@ -303,15 +270,15 @@ jobs:
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge specific release (0.8.2)
- name: Install WasmEdge specific release (0.9.0)
run: |
python utils/install.py -v 0.8.2 -D
python utils/install.py -v 0.9.0 -D
- name: Uninstall WasmEdge
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge specific release (0.8.2) with all extensions
- name: Install WasmEdge specific release (0.9.0) with all extensions
run: |
python utils/install.py -e all -v 0.8.2 -D
python utils/install.py -e all -v 0.9.0 -D
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
Expand Down
Loading

0 comments on commit 4ea40c3

Please sign in to comment.