Skip to content

Add GitHub Actions workflow for g++ and clang compilation #3

Add GitHub Actions workflow for g++ and clang compilation

Add GitHub Actions workflow for g++ and clang compilation #3

Workflow file for this run

name: Multiple compilers and versions
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_wolfssl:
name: Build wolfSSL
runs-on: ${{ matrix.OS }}
strategy:
fail-fast: false
matrix:
OS: [ubuntu-20.04, ubuntu-22.04]
timeout-minutes: 4
steps:
- name: Checkout, build, and install wolfssl
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfssl/wolfssl
path: wolfssl
configure: --enable-all
check: false
install: true
my_matrix:
name: Compiler test
needs: build_wolfssl
strategy:
fail-fast: false
matrix:
include:
- CC: gcc-9
CXX: g++-9
OS: ubuntu-22.04
- CC: gcc-10
CXX: g++-10
OS: ubuntu-22.04
- CC: gcc-11
CXX: g++-11
OS: ubuntu-22.04
- CC: gcc-12
CXX: g++-12
OS: ubuntu-22.04
- CC: clang-10
CXX: clang++-10
OS: ubuntu-20.04
- CC: clang-11
CXX: clang++-11
OS: ubuntu-20.04
- CC: clang-12
CXX: clang++-12
OS: ubuntu-20.04
- CC: clang-13
CXX: clang++-13
OS: ubuntu-22.04
- CC: clang-14
CXX: clang++-14
OS: ubuntu-22.04
if: github.repository_owner == 'wolfSSL'
runs-on: ${{ matrix.OS }}
timeout-minutes: 4
steps:
- name: Install dependencies
run: export DEBIAN_FRONTEND=noninteractive && sudo apt-get update && sudo apt-get install -y ${{ matrix.CC }}
- uses: actions/checkout@v4
- name: Build
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfssl/wolfssh
path: wolfssh
configure: LDFLAGS="-L${{ github.workspace }}/build-dir/lib" CPPFLAGS="-I${{ github.workspace }}/build-dir/include"
check: true
- name: Show log on errors
if: ${{ failure() }}
run: |
cat config.log