File: multi-arch.yml

package info (click to toggle)
wolfssl 5.8.4-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 117,604 kB
  • sloc: ansic: 1,584,954; asm: 481,206; sh: 11,586; cs: 6,596; xml: 3,878; perl: 3,291; makefile: 2,058; ada: 1,891; javascript: 748; python: 636; cpp: 131; ruby: 118; objc: 80; tcl: 73
file content (66 lines) | stat: -rw-r--r-- 2,277 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Multiple architectures

# START OF COMMON SECTION
on:
  push:
    branches: [ 'master', 'main', 'release/**' ]
  pull_request:
    branches: [ '*' ]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
# END OF COMMON SECTION

jobs:
  my_matrix:
    name: Multi-arch test
    strategy:
      fail-fast: false
      matrix:
        include:
          - HOST: aarch64-linux-gnu
            CC: aarch64-linux-gnu-gcc
            ARCH: arm64
            EXTRA_OPTS: --enable-sp-asm --enable-armasm
          - HOST: arm-linux-gnueabihf
            CC: arm-linux-gnueabihf-gcc
            ARCH: armhf
            EXTRA_OPTS: --enable-sp-asm
          - HOST: riscv64-linux-gnu
            CC: riscv64-linux-gnu-gcc
            ARCH: riscv64
            EXTRA_OPTS: --enable-riscv-asm
          # Config to ensure CPUs without Thumb instructions compiles
          - HOST: arm-linux-gnueabi
            CC: arm-linux-gnueabi-gcc
            CFLAGS: -marm -DWOLFSSL_SP_ARM_ARCH=6
            ARCH: armel
            EXTRA_OPTS: --enable-sp-asm
        opts: [ '-O2', '-O3', '-O1 -UFP_ECC', '-O0', '-Os', '-Ofast' ]
    if: github.repository_owner == 'wolfssl'
    runs-on: ubuntu-22.04
    # This should be a safe limit for the tests to run.
    timeout-minutes: 10
    steps:
      - name: Install Compiler
        run: |
          sudo apt update
          sudo apt install -y crossbuild-essential-${{ matrix.ARCH }} qemu-user
      - uses: actions/checkout@v4
      - name: Build for ${{ matrix.ARCH }} with Opt Level ${{ matrix.opts }}
        env:
            CC: ${{ matrix.CC }}
            CFLAGS: ${{ matrix.CFLAGS }} ${{ matrix.opts }}
            QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
        run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples CPPFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFCRYPT_TEST_LINT" ${{ matrix.EXTRA_OPTS }} && make
      - name: Print errors
        if: ${{ failure() }}
        run: |
          if [ -f config.log ] ; then
            cat config.log
          fi
      - name: Run WolfCrypt Tests
        env:
            QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
        run: ./wolfcrypt/test/testwolfcrypt