Skip to content

Commit

Permalink
Remove install into build-env from build_python.sh (#27437)
Browse files Browse the repository at this point in the history
* Start removing the option for install_wheel in the build environment

* Move java tests to use a separate build environment

* Update openiotsdk ... i am unclear why the python controller was built at all, but testing out and expecting compile errors.

* Remove force reinstall option as it should not be needed on clean environments

* Restyle

* Fix typo

* Update tests.yaml for the new args as well

* Update openiotsdk to run tests in the configured venv

* Ensure more pip packages available in venv, at least click and probably more

* Update one guide and tests

* update java tests to install basic prerequisites

* Install yaml tests requirement in venv

* Restyle

* Update openiot to not automatically activate every time

* Restyle

* Install colorama in unit test venv

* add colorama to java tests venv as well

* Add pyasn1 to items install by the repl tests

* Install more required items
  • Loading branch information
andy31415 authored and pull[bot] committed Sep 26, 2023
1 parent ad99235 commit 9b8fdf9
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 62 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/examples-openiotsdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ jobs:
- name: Build and install Python controller
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv'
scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.openiotsdk.txt'
- name: Build shell example
id: build_shell
Expand Down Expand Up @@ -116,18 +117,21 @@ jobs:
if: steps.build_shell.outcome == 'success'
timeout-minutes: 5
run: |
scripts/examples/openiotsdk_example.sh -C test shell
scripts/run_in_python_env.sh out/venv \
'scripts/examples/openiotsdk_example.sh --no-activate -C test shell'
- name: "Test: lock-app example"
if: steps.build_lock_app.outcome == 'success'
timeout-minutes: 5
run: |
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh -C test -n ${TEST_NETWORK_NAME}tap lock-app
scripts/run_in_python_env.sh out/venv \
'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app'
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down
- name: "Test: unit-tests"
if: steps.build_unit_tests.outcome == 'success'
timeout-minutes: 40
run: |
scripts/examples/openiotsdk_example.sh -C test unit-tests
scripts/run_in_python_env.sh out/venv \
'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests'
24 changes: 13 additions & 11 deletions .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ jobs:
- name: Build Java Matter Controller and all clusters app
timeout-minutes: 60
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv'
scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.build.txt'
scripts/run_in_python_env.sh out/venv 'pip install colorama'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \
Expand All @@ -120,7 +122,7 @@ jobs:
- name: Run Discover Commissionables Test
timeout-minutes: 15
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -132,7 +134,7 @@ jobs:
- name: Run Pairing Onnetwork Test
timeout-minutes: 15
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -144,7 +146,7 @@ jobs:
- name: Run IM Invoke Test
timeout-minutes: 15
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -156,7 +158,7 @@ jobs:
- name: Run IM Read Test
timeout-minutes: 15
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -168,7 +170,7 @@ jobs:
- name: Run IM Write Test
timeout-minutes: 15
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -180,7 +182,7 @@ jobs:
- name: Run IM Subscribe Test
timeout-minutes: 15
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -192,7 +194,7 @@ jobs:
- name: Run Pairing AlreadyDiscovered Test
timeout-minutes: 25
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -205,7 +207,7 @@ jobs:
# - name: Run Pairing Address-PaseOnly Test
# timeout-minutes: 25
# run: |
# scripts/run_in_build_env.sh \
# scripts/run_in_python_env.sh out/venv \
# './scripts/tests/run_java_test.py \
# --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
# --app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -217,7 +219,7 @@ jobs:
- name: Run Pairing SetupQRCode Test
timeout-minutes: 25
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand All @@ -229,7 +231,7 @@ jobs:
- name: Run Pairing ManualCode Test
timeout-minutes: 25
run: |
scripts/run_in_build_env.sh \
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
Expand Down
Loading

0 comments on commit 9b8fdf9

Please sign in to comment.