multi-arch.yml 1.7 KB

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