diff --git a/.github/config/android-arm.json b/.github/config/android-arm.json index 9ca34bb905096..92c3163470ae1 100644 --- a/.github/config/android-arm.json +++ b/.github/config/android-arm.json @@ -1,7 +1,7 @@ { "docker_service": "build-android", "on_device_test": { - "enabled": true, + "enabled": false, "tests": [ "0", "1", diff --git a/.github/config/android-arm64.json b/.github/config/android-arm64.json index 92f2e4a7e0112..77c941d1dcf1a 100644 --- a/.github/config/android-arm64.json +++ b/.github/config/android-arm64.json @@ -1,7 +1,7 @@ { "docker_service": "build-android", "on_device_test": { - "enabled": true, + "enabled": false, "tests": [ "0", "1", diff --git a/.github/config/android-x86.json b/.github/config/android-x86.json index 8a7b08bd40759..59c4df7267aaf 100644 --- a/.github/config/android-x86.json +++ b/.github/config/android-x86.json @@ -1,7 +1,7 @@ { "docker_service": "build-android", "on_device_test": { - "enabled": true, + "enabled": false, "tests": [ "0", "1", diff --git a/.github/config/raspi-2.json b/.github/config/raspi-2.json index 4114f2a5c6ded..f5842773665bb 100644 --- a/.github/config/raspi-2.json +++ b/.github/config/raspi-2.json @@ -3,12 +3,7 @@ "on_device_test": { "enabled": true, "tests": [ - "0", - "1", - "2", - "3", - "4", - "5" + "0" ] }, "platforms": [ diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index addeb36d0a178..1573f1d4cc893 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -230,11 +230,14 @@ jobs: # Runs on-host integration and unit tests. on-device-test: needs: [initialize, build] - if: | # Always run if not a PR or if the PR has on_device label - fromJSON(needs.initialize.outputs.on_device_test).enabled == true && ( - github.event_name != 'pull_request' || - contains(github.event.pull_request.labels.*.name, 'on_device') - ) + # Run if PR has on_device label, and on postsubmit and nightlies if + # repositories variables permit. + if: | + fromJSON(needs.initialize.outputs.on_device_test).enabled == true && (( + github.event_name == 'pull_request' && + contains(github.event.pull_request.labels.*.name, 'on_device') ) + || ${{ inputs.nightly == 'true' && vars.RUN_ODT_TESTS_ON_NIGHTLY != 'False' }} || + ${{ github.event_name == 'push' && vars.RUN_ODT_TESTS_ON_POSTSUBMIT != 'False' }} ) runs-on: [self-hosted, linux, X64] name: ${{ matrix.name }}_on_device_${{ matrix.shard }} container: ${{ needs.docker-unittest-image.outputs.docker_unittest_tag }} @@ -249,6 +252,13 @@ jobs: env: COBALT_BOOTLOADER: ${{needs.initialize.outputs.bootloader}} steps: + - name: Print vars + run: | + echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}" + echo "${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }}" + echo 'NEXT' + echo "${{ env.RUN_ODT_TESTS_ON_NIGHTLY }}" + echo "${{ env.RUN_ODT_TESTS_ON_POSTSUBMIT }}" - name: Checkout uses: actions/checkout@v3 - name: Run Tests (${{ matrix.shard }}) diff --git a/.github/workflows/stub.yaml b/.github/workflows/stub.yaml index d387f51882616..6e4c7b2a15525 100644 --- a/.github/workflows/stub.yaml +++ b/.github/workflows/stub.yaml @@ -17,8 +17,22 @@ on: required: true type: boolean default: false +env: + RUN_ODT_TESTS_ON_NIGHTLY: ${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }} + RUN_ODT_TESTS_ON_POSTSUBMIT: ${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }} jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. + echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}" + echo "${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }}" + echo "${{ env.RUN_ODT_TESTS_ON_NIGHTLY }}" + echo "${{ env.RUN_ODT_TESTS_ON_POSTSUBMIT }}" stub: uses: ./.github/workflows/main.yaml permissions: