2
0

multi-arch.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: Multiple architectures
  2. # START OF COMMON SECTION
  3. on:
  4. push:
  5. branches: [ 'master', 'main', 'release/**' ]
  6. pull_request:
  7. branches: [ '*' ]
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.ref }}
  10. cancel-in-progress: true
  11. # END OF COMMON SECTION
  12. jobs:
  13. my_matrix:
  14. name: Multi-arch test
  15. strategy:
  16. fail-fast: false
  17. matrix:
  18. include:
  19. - HOST: aarch64-linux-gnu
  20. CC: aarch64-linux-gnu-gcc
  21. ARCH: arm64
  22. EXTRA_OPTS: --enable-sp-asm --enable-armasm
  23. - HOST: arm-linux-gnueabihf
  24. CC: arm-linux-gnueabihf-gcc
  25. ARCH: armhf
  26. EXTRA_OPTS: --enable-sp-asm
  27. - HOST: riscv64-linux-gnu
  28. CC: riscv64-linux-gnu-gcc
  29. ARCH: riscv64
  30. # Config to ensure CPUs without Thumb instructions compiles
  31. - HOST: arm-linux-gnueabi
  32. CC: arm-linux-gnueabi-gcc
  33. CFLAGS: -marm -DWOLFSSL_SP_ARM_ARCH=6
  34. ARCH: armel
  35. EXTRA_OPTS: --enable-sp-asm
  36. if: github.repository_owner == 'wolfssl'
  37. runs-on: ubuntu-22.04
  38. # This should be a safe limit for the tests to run.
  39. timeout-minutes: 10
  40. steps:
  41. - name: Install Compiler
  42. run: |
  43. sudo apt update
  44. sudo apt install -y crossbuild-essential-${{ matrix.ARCH }} qemu-user
  45. - uses: actions/checkout@v4
  46. - name: Build
  47. env:
  48. CC: ${{ matrix.CC }}
  49. CFLAGS: ${{ matrix.CFLAGS }}
  50. QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
  51. run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples ${{ matrix.EXTRA_OPTS }} && make
  52. - name: Print errors
  53. if: ${{ failure() }}
  54. run: |
  55. if [ -f config.log ] ; then
  56. cat config.log
  57. fi
  58. - name: Run WolfCrypt Tests
  59. env:
  60. QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
  61. run: ./wolfcrypt/test/testwolfcrypt