mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 01:40:48 +02:00
7f80896033
- Skip CI for draft PRs and redundant master-push re-runs; membrowse nightly. - Add smoke test (8 configs, CFLAGS=-Werror, post-merge tree, fail-fast on conflicts). - Add wait-for-smoke composite action for downstream CI gating. - Add check-source-text + bash -n + shellcheck workflow (script in make dist). - Cache apt-get update in install-apt-deps composite on cache hit.
81 lines
2.8 KiB
YAML
81 lines
2.8 KiB
YAML
name: Multiple architectures
|
|
|
|
# START OF COMMON SECTION
|
|
on:
|
|
push:
|
|
branches: [ 'release/**' ]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
branches: [ '*' ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
# END OF COMMON SECTION
|
|
|
|
jobs:
|
|
my_matrix:
|
|
name: Multi-arch test (${{ matrix.ARCH }}, ${{ matrix.opts.name }})
|
|
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:
|
|
- name: '-O2'
|
|
OPT_CFLAGS: '-O2'
|
|
- name: '-O2 sp-math'
|
|
OPT_CFLAGS: '-O2'
|
|
OPT_EXTRA_OPTS: '--enable-sp-math'
|
|
- name: '-O1 -UFP_ECC'
|
|
OPT_CFLAGS: '-O1 -UFP_ECC'
|
|
- name: '-O0'
|
|
OPT_CFLAGS: '-O0'
|
|
- name: '-Os'
|
|
OPT_CFLAGS: '-Os'
|
|
- name: '-Ofast'
|
|
OPT_CFLAGS: '-Ofast'
|
|
if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }}
|
|
runs-on: ubuntu-22.04
|
|
# This should be a safe limit for the tests to run.
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Compiler
|
|
uses: ./.github/actions/install-apt-deps
|
|
with:
|
|
packages: crossbuild-essential-${{ matrix.ARCH }} qemu-user
|
|
- name: Build for ${{ matrix.ARCH }} with ${{ matrix.opts.name }}
|
|
env:
|
|
CC: ${{ matrix.CC }}
|
|
CFLAGS: ${{ matrix.CFLAGS }} ${{ matrix.opts.OPT_CFLAGS }}
|
|
QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
|
|
run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples CPPFLAGS="-pedantic -Wdeclaration-after-statement -Wnull-dereference -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFCRYPT_TEST_LINT" ${{ matrix.EXTRA_OPTS }} ${{ matrix.opts.OPT_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
|