1
0

zephyr.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. name: Zephyr tests
  2. on:
  3. workflow_call:
  4. jobs:
  5. run_test:
  6. name: Build and run
  7. strategy:
  8. fail-fast: false
  9. matrix:
  10. config:
  11. - zephyr-ref: v3.4.0
  12. zephyr-sdk: 0.16.1
  13. - zephyr-ref: v3.5.0
  14. zephyr-sdk: 0.16.3
  15. runs-on: ubuntu-latest
  16. # This should be a safe limit for the tests to run.
  17. timeout-minutes: 15
  18. steps:
  19. - name: Install dependencies
  20. run: |
  21. # Don't prompt for anything
  22. export DEBIAN_FRONTEND=noninteractive
  23. sudo apt-get update
  24. # most of the ci-base zephyr docker image packages
  25. sudo apt-get install -y zip bridge-utils uml-utilities \
  26. git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget \
  27. python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
  28. make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 \
  29. autoconf automake bison build-essential ca-certificates cargo ccache chrpath cmake \
  30. cpio device-tree-compiler dfu-util diffstat dos2unix doxygen file flex g++ gawk gcc \
  31. gcovr git git-core gnupg gperf gtk-sharp2 help2man iproute2 lcov libcairo2-dev \
  32. libglib2.0-dev libgtk2.0-0 liblocale-gettext-perl libncurses5-dev libpcap-dev \
  33. libpopt0 libsdl1.2-dev libsdl2-dev libssl-dev libtool libtool-bin locales make \
  34. net-tools ninja-build openssh-client parallel pkg-config python3-dev python3-pip \
  35. python3-ply python3-setuptools python-is-python3 qemu rsync socat srecord sudo \
  36. texinfo unzip wget ovmf xz-utils
  37. - name: Install west
  38. run: sudo pip install west
  39. - name: Init west workspace
  40. run: west init --mr ${{ matrix.config.zephyr-ref }} zephyr
  41. - name: Update west.yml
  42. working-directory: zephyr/zephyr
  43. run: |
  44. REF=$(echo '${{ github.ref }}' | sed -e 's/\//\\\//g')
  45. sed -e 's/remotes:/remotes:\n \- name: wolfssl\n url\-base: https:\/\/github.com\/${{ github.repository_owner }}/' -i west.yml
  46. sed -e "s/projects:/projects:\n \- name: wolfssl\n path: modules\/crypto\/wolfssl\n remote: wolfssl\n revision: $REF/" -i west.yml
  47. - name: Update west workspace
  48. working-directory: zephyr
  49. run: west update -n -o=--depth=1
  50. - name: Export zephyr
  51. working-directory: zephyr
  52. run: west zephyr-export
  53. - name: Install pip dependencies
  54. working-directory: zephyr
  55. run: sudo pip install -r zephyr/scripts/requirements.txt
  56. - name: Install zephyr SDK
  57. run: |
  58. wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${{ matrix.config.zephyr-sdk }}/zephyr-sdk-${{ matrix.config.zephyr-sdk }}_linux-x86_64.tar.xz
  59. tar xf zephyr-sdk-${{ matrix.config.zephyr-sdk }}_linux-x86_64.tar.xz
  60. cd zephyr-sdk-${{ matrix.config.zephyr-sdk }}
  61. ./setup.sh -h -c
  62. - name: Run wolfssl test
  63. id: wolfssl-test
  64. working-directory: zephyr
  65. run: |
  66. ./zephyr/scripts/twister --testsuite-root modules/crypto/wolfssl --test zephyr/samples/wolfssl_test/sample.crypto.wolfssl_test -vvv
  67. rm -rf zephyr/twister-out
  68. - name: Run wolfssl TLS sock test
  69. id: wolfssl-tls-sock
  70. working-directory: zephyr
  71. run: |
  72. ./zephyr/scripts/twister --testsuite-root modules/crypto/wolfssl --test zephyr/samples/wolfssl_tls_sock/sample.crypto.wolfssl_tls_sock -vvv
  73. rm -rf zephyr/twister-out
  74. - name: Run wolfssl TLS thread test
  75. id: wolfssl-tls-thread
  76. working-directory: zephyr
  77. run: |
  78. ./zephyr/scripts/twister --testsuite-root modules/crypto/wolfssl --test zephyr/samples/wolfssl_tls_thread/sample.crypto.wolfssl_tls_thread -vvv
  79. rm -rf zephyr/twister-out
  80. - name: Zip failure logs
  81. if: ${{ failure() && (steps.wolfssl-test.outcome == 'failure' || steps.wolfssl-tls-sock.outcome == 'failure' || steps.wolfssl-tls-thread.outcome == 'failure') }}
  82. run: |
  83. zip -9 -r logs.zip zephyr/twister-out
  84. - name: Upload failure logs
  85. if: ${{ failure() && (steps.wolfssl-test.outcome == 'failure' || steps.wolfssl-tls-sock.outcome == 'failure' || steps.wolfssl-tls-thread.outcome == 'failure') }}
  86. uses: actions/upload-artifact@v3
  87. with:
  88. name: zephyr-client-test-logs
  89. path: logs.zip
  90. retention-days: 5