Skip to content

QA Integration Test #748

QA Integration Test

QA Integration Test #748

# Copyright (c) 2021-2022 TiaC Systems
# Copyright (c) 2021 Li-Pro.Net
# SPDX-License-Identifier: Apache-2.0
name: QA Integration Test
on:
schedule:
- cron: "0 2 * * *" # run at 2 AM UTC
workflow_dispatch: # And manually on button click
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'applications/**'
- 'arch/**'
- 'boards/**'
- 'cmake/**'
- 'drivers/**'
- 'dts/**'
- 'include/**'
- 'lib/**'
- 'modules/**'
- 'samples/**'
- 'tests/**'
- 'soc/**'
- 'subsys/**'
- '**/CMakeLists.txt'
- '**/Kconfig*'
- '**.conf'
- '**.defconfig'
- '**.overlay'
- '**.yaml'
- 'scripts/requirements-*'
- 'scripts/requirements.txt'
- 'west.yml'
- '.github/workflows/qa-integration.yml'
jobs:
# qa-runner-github-inspections:
# name: Runner inspections (github)
# if: github.repository_owner == 'tiacsys'
# runs-on: ubuntu-latest
# steps:
# - name: Inspections
# run: |
# echo "============================================================================="
# echo "github.workspace: ${{ github.workspace }}"
# echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}"
# echo "============================================================================="
# env
# echo "============================================================================="
# id
# pwd
# df -hT $(pwd)
# echo "============================================================================="
# df -hT
# qa-container-github-inspections:
# name: Container inspections (github)
# if: github.repository_owner == 'tiacsys'
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/zephyrproject-rtos/ci-base:v0.26.5
# options: '-e /bin/bash'
# env:
# ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.3
# steps:
# - name: Inspections
# run: |
# echo "============================================================================="
# echo "github.workspace: ${{ github.workspace }}"
# echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}"
# echo "============================================================================="
# env
# echo "============================================================================="
# id
# pwd
# df -hT $(pwd)
# echo "============================================================================="
# df -hT
# qa-runner-ghashr-inspections:
# name: Runner inspections (ghashr)
# if: github.repository_owner == 'tiacsys'
# runs-on: [self-hosted, ci-32g-x8, linux, x64, zephyr-sdk]
# steps:
# - name: Inspections
# run: |
# echo "============================================================================="
# echo "github.workspace: ${{ github.workspace }}"
# echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}"
# echo "============================================================================="
# env
# echo "============================================================================="
# id
# pwd
# df -hT $(pwd)
# echo "============================================================================="
# df -hT
# qa-container-ghashr-inspections:
# name: Container inspections (ghashr)
# if: github.repository_owner == 'tiacsys'
# runs-on: [self-hosted, ci-32g-x8, linux, x64, zephyr-sdk]
# container:
# image: ghcr.io/zephyrproject-rtos/ci-base:v0.26.5
# options: '-e /bin/bash'
# env:
# ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.3
# steps:
# - name: Inspections
# run: |
# echo "============================================================================="
# echo "github.workspace: ${{ github.workspace }}"
# echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}"
# echo "============================================================================="
# env
# echo "============================================================================="
# id
# pwd
# df -hT $(pwd)
# echo "============================================================================="
# df -hT
# - name: Checkout the code
# uses: actions/checkout@v3
# with:
# path: workspace/bridle
# submodules: recursive
# ref: ${{ github.ref }}
# /usr/bin/docker create
# --name 88c5f1268fc943ecb57facf71d02df65_ghcriozephyrprojectrtosciv0265_c50a65
# --label 94351b
# --workdir /__w/bridle/bridle
# --network github_network_5837bcac7da54269a0e706cb2fec3306
# -e /bin/bash
# -e "HOME=/github/home"
# -e GITHUB_ACTIONS=true
# -e CI=true
# -v "/var/run/docker.sock":"/var/run/docker.sock"
# -v "/home/runner/work":"/__w"
# -v "/home/runner/runners/2.309.0/externals":"/__e":ro
# -v "/home/runner/work/_temp":"/__w/_temp"
# -v "/home/runner/work/_actions":"/__w/_actions"
# -v "/opt/hostedtoolcache":"/__t"
# -v "/home/runner/work/_temp/_github_home":"/github/home"
# -v "/home/runner/work/_temp/_github_workflow":"/github/workflow"
# --entrypoint "tail" ghcr.io/zephyrproject-rtos/ci:v0.26.5 "-f" "/dev/null"
# qa-container-inspections:
# name: Container inspections
# if: github.repository_owner == 'tiacsys'
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/zephyrproject-rtos/ci-base:v0.26.5
# options: '-e /bin/bash'
# options: '-u user -e /bin/bash'
# volumes:
# - ${{ github.workspace }}:${HOME}/${{ github.repository }}
# env:
# ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.3
# steps:
# - name: Inspections
# run: |
# echo "============================================================================="
# echo "github.repository: ${{ github.repository }}"
# echo "github.workspace: ${{ github.workspace }}"
# echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}"
# echo "============================================================================="
# env
# echo "============================================================================="
# id
# pwd
# echo "============================================================================="
# mount
# echo "============================================================================="
# df -hT
# echo "===================================================== GITHUB_WORKSPACE ======"
# ls -alR "${GITHUB_WORKSPACE}"
# echo "===================================================== RUNNER_WORKSPACE ======"
# ls -alR "${RUNNER_WORKSPACE}"
# echo "===================================================== HOME =================="
# ls -alR "${HOME}"
# - name: Fill disk
# run: |
# echo "============================================================================="
# id
# pwd
# df -hT $(pwd)
# echo "============================================================================="
# dd if=/dev/zero of=10gb bs=15M count=1K status=progress
# echo "============================================================================="
# df -hT $(pwd)
qa-samples-integration:
name: Run integration tests for samples
if: github.repository_owner == 'tiacsys'
runs-on: [self-hosted, ci-32g-x8, linux, x64, container]
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.5
options: '--entrypoint /bin/bash'
# volumes:
# - /repo-cache/zephyrproject:/github/cache/zephyrproject
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.3
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update GitHub PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Clean working directory
run: |
rm -rf "workspace"
- name: Checkout the code
uses: actions/checkout@v3
with:
path: workspace/bridle
submodules: recursive
ref: ${{ github.ref }}
- name: Restore PIP Cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-qa-pip
- name: Install base dependencies
working-directory: workspace
run: |
pip3 install --upgrade pip
pip3 install --upgrade setuptools
pip3 install --upgrade --requirement bridle/scripts/requirements-base.txt
- name: West init and update
working-directory: workspace
run: |
west init -l bridle
west update
west zephyr-export
west bridle-export
- name: Install build and test dependencies
working-directory: workspace
run: |
pip3 install --upgrade --requirement zephyr/scripts/requirements-base.txt
pip3 install --upgrade --requirement zephyr/scripts/requirements-build-test.txt
pip3 install --upgrade --requirement zephyr/scripts/requirements-run-test.txt
pip3 install --upgrade --requirement zephyr/scripts/requirements-extras.txt
pip3 install --upgrade --requirement zephyr/scripts/requirements-compliance.txt
pip3 install --upgrade --requirement bridle/scripts/requirements-build.txt
- name: Build samples
working-directory: workspace
run: |
west twister --verbose --jobs 4 --integration \
--outdir twister-out --no-clean --inline-logs \
--enable-size-report --platform-reports \
--testsuite-root bridle/samples/button \
--testsuite-root bridle/samples/helloshell
- name: Upload integration test results
uses: actions/upload-artifact@v3
with:
name: twister-samples.xml
path: workspace/twister-out/twister.xml
- name: Convert integration test reports to annotations
uses: mikepenz/action-junit-report@v3
with:
check_name: twister-report (samples)
report_paths: "**/twister-out/twister.xml"
require_tests: true
fail_on_failure: false
if: always()
qa-shield-integration:
name: Run integration tests for shields
if: github.repository_owner == 'tiacsys'
runs-on: [self-hosted, ci-32g-x8, linux, x64, container]
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.5
options: '--entrypoint /bin/bash'
# volumes:
# - /repo-cache/zephyrproject:/github/cache/zephyrproject
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.3
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update GitHub PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Clean working directory
run: |
rm -rf "workspace"
- name: Checkout the code
uses: actions/checkout@v3
with:
path: workspace/bridle
submodules: recursive
ref: ${{ github.ref }}
- name: Restore PIP Cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-qa-pip
- name: Install base dependencies
working-directory: workspace
run: |
pip3 install --upgrade pip
pip3 install --upgrade setuptools
pip3 install --upgrade --requirement bridle/scripts/requirements-base.txt
- name: West init and update
working-directory: workspace
run: |
west init -l bridle
west update
west zephyr-export
west bridle-export
- name: Install build and test dependencies
working-directory: workspace
run: |
pip3 install --upgrade --requirement zephyr/scripts/requirements-base.txt
pip3 install --upgrade --requirement zephyr/scripts/requirements-build-test.txt
pip3 install --upgrade --requirement zephyr/scripts/requirements-run-test.txt
pip3 install --upgrade --requirement zephyr/scripts/requirements-extras.txt
pip3 install --upgrade --requirement zephyr/scripts/requirements-compliance.txt
pip3 install --upgrade --requirement bridle/scripts/requirements-build.txt
- name: Build integration tests for shields
working-directory: workspace
run: |
#
# Disabled in the meantime because the execution time is still
# too high:
#
# --testsuite-root bridle/tests/shields/grove_btn/dts_bindings \
# --testsuite-root bridle/tests/shields/grove_led/dts_bindings \
#
west twister --verbose --jobs 4 \
--outdir twister-out --no-clean --inline-logs \
--enable-size-report --platform-reports \
--platform arduino_zero \
--testsuite-root bridle/tests/shields/x_grove_testbed/dts_bindings
# --platform arduino_zero \
# --platform mimxrt1010_evk \
# --platform mimxrt1060_evk \
# --platform mimxrt1060_evkb \
# --platform nucleo_f303re \
# --platform nucleo_f401re \
# --platform nucleo_f413zh \
# --platform nucleo_f767zi \
# --platform rpi_pico \
# --platform seeed_xiao_samd21 \
# --platform seeeduino_xiao \
# --platform seeeduino_lotus \
# --platform waveshare_rp2040_plus \
# --platform waveshare_rp2040_plus@16mb \
# --testsuite-root bridle/tests/shields/grove/dts_bindings \
# --testsuite-root bridle/tests/shields/x_grove_testbed/dts_bindings
- name: Upload integration test results
uses: actions/upload-artifact@v3
with:
name: twister-shields.xml
path: workspace/twister-out/twister.xml
- name: Convert integration test reports to annotations
uses: mikepenz/action-junit-report@v3
with:
check_name: twister-report (shields)
report_paths: "**/twister-out/twister.xml"
require_tests: true
fail_on_failure: false
if: always()
# qa-target-integration:
# name: Run integration tests on targets
# if: github.repository_owner == 'tiacsys'
# runs-on: [self-hosted, linux, gnuarmemb, zephyr-sdk, tiac_magpie]
# strategy:
# matrix:
# board: [tiac_magpie]
# steps:
# - name: Update GitHub PATH for west
# run: |
# echo "$HOME/.local/bin" >> $GITHUB_PATH
# - name: Clean working directory
# run: |
# rm -rf "${{ github.workspace }}/workspace"
# - name: Checkout the code
# uses: actions/checkout@v3
# with:
# path: workspace/bridle
# submodules: recursive
# ref: ${{ github.ref }}
# - name: Install base dependencies
# working-directory: workspace
# run: |
# pip3 install --upgrade pip
# pip3 install --upgrade setuptools
# pip3 install --upgrade --requirement bridle/scripts/requirements-base.txt
# - name: West init and update
# working-directory: workspace
# run: |
# west init -l bridle
# west update
# west zephyr-export
# west bridle-export
# - name: Install build and test dependencies
# working-directory: workspace
# run: |
# pip3 install --upgrade --requirement zephyr/scripts/requirements-base.txt
# pip3 install --upgrade --requirement zephyr/scripts/requirements-build-test.txt
# pip3 install --upgrade --requirement zephyr/scripts/requirements-run-test.txt
# pip3 install --upgrade --requirement zephyr/scripts/requirements-extras.txt
# pip3 install --upgrade --requirement zephyr/scripts/requirements-compliance.txt
# pip3 install --upgrade --requirement bridle/scripts/requirements-build.txt
# - name: Execute integration tests on target
# working-directory: workspace
# env:
# HARDWARE_MAP: bridle/.github/${{ github.job }}/map-${{ matrix.board }}.yml
# run: |
# #
# # Disabled in the meantime because the execution time is still
# # too high and most of the core tests are already performed by
# # Zephyr in any case:
# #
# # --tag arm \
# # --tag vector_relay \
# # --tag kernel \
# #
# west twister --verbose --jobs 4 \
# --retry-failed 5 --retry-interval 120 \
# --outdir twister-out --no-clean --inline-logs \
# --enable-size-report --platform-reports \
# --device-testing --hardware-map ${HARDWARE_MAP} \
# --extra-args SHIELD="loopback_test_tmph" \
# --alt-config-root bridle/zephyr/alt-config \
# --testsuite-root bridle/tests \
# --testsuite-root zephyr/tests \
# --tag bridle \
# --tag hwinfo \
# --tag random \
# --tag entropy \
# --tag watchdog \
# --tag counter \
# --tag gpio \
# --tag spi \
# --tag uart \
# --tag can
# - name: Upload integration test results
# uses: actions/upload-artifact@v3
# with:
# name: twister-targets.xml
# path: workspace/twister-out/twister.xml
# - name: Convert integration test reports to annotations
# uses: mikepenz/action-junit-report@v3
# with:
# check_name: twister-report (${{ matrix.board }})
# report_paths: "**/twister-out/twister.xml"
# require_tests: true
# fail_on_failure: false
# if: always()