Add fenrir suggested test cases #97
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Multi-Compiler Tests | |
| on: | |
| push: | |
| branches: [ 'master', 'main', 'release/**' ] | |
| pull_request: | |
| branches: [ '*' ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| compiler_test: | |
| name: ${{ matrix.cc }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - cc: gcc-11 | |
| - cc: gcc-12 | |
| - cc: gcc-13 | |
| - cc: clang-14 | |
| - cc: clang-15 | |
| - cc: clang-17 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install compiler and tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ${{ matrix.cc }} autoconf automake libtool | |
| - name: Cache wolfSSL | |
| id: cache-wolfssl | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/wolfssl-install | |
| key: wolfssl-ubuntu-latest-v2 | |
| - name: Build wolfSSL | |
| if: steps.cache-wolfssl.outputs.cache-hit != 'true' | |
| run: | | |
| cd ~ | |
| git clone --depth 1 https://github.com/wolfssl/wolfssl.git | |
| cd wolfssl | |
| ./autogen.sh | |
| ./configure --enable-enckeys --prefix=$HOME/wolfssl-install | |
| make -j$(nproc) | |
| make install | |
| - name: Install wolfSSL | |
| run: | | |
| echo "$HOME/wolfssl-install/lib" | sudo tee /etc/ld.so.conf.d/wolfssl.conf | |
| sudo ldconfig | |
| - name: autogen | |
| run: ./autogen.sh | |
| - name: configure | |
| run: | | |
| # Add -Wno-gnu-zero-variadic-macro-arguments for clang (##__VA_ARGS__ is widely supported) | |
| EXTRA_CFLAGS="" | |
| if [[ "${{ matrix.cc }}" == clang* ]]; then | |
| EXTRA_CFLAGS="-Wno-gnu-zero-variadic-macro-arguments" | |
| fi | |
| CC=${{ matrix.cc }} ./configure \ | |
| CFLAGS="-Wall -Wextra -Wpedantic $EXTRA_CFLAGS" \ | |
| LDFLAGS="-L$HOME/wolfssl-install/lib" \ | |
| CPPFLAGS="-I$HOME/wolfssl-install/include" | |
| - name: make | |
| run: make -j$(nproc) | |
| - name: make dist | |
| run: make dist | |
| - name: Show logs on failure | |
| if: failure() | |
| run: | | |
| cat config.log || true |