2
0

multi-arch.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. runs-on: ubuntu-latest
  37. # This should be a safe limit for the tests to run.
  38. timeout-minutes: 10
  39. steps:
  40. - name: Install Compiler
  41. run: |
  42. sudo apt update
  43. sudo apt install -y crossbuild-essential-${{ matrix.ARCH }} qemu-user
  44. - uses: actions/checkout@v4
  45. - name: Build
  46. env:
  47. CC: ${{ matrix.CC }}
  48. CFLAGS: ${{ matrix.CFLAGS }}
  49. QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
  50. run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples ${{ matrix.EXTRA_OPTS }} && make
  51. - name: Print errors
  52. if: ${{ failure() }}
  53. run: |
  54. if [ -f config.log ] ; then
  55. cat config.log
  56. fi
  57. - name: Run WolfCrypt Tests
  58. env:
  59. QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
  60. run: ./wolfcrypt/test/testwolfcrypt