1# Copyright (c) 2022 Yubico AB. All rights reserved. 2# Use of this source code is governed by a BSD-style 3# license that can be found in the LICENSE file. 4# SPDX-License-Identifier: BSD-2-Clause 5 6name: linux 7 8on: 9 pull_request: 10 branches: 11 - main 12 push: 13 branches: 14 - main 15 - '*-ci' 16 17jobs: 18 build: 19 runs-on: ${{ matrix.os }} 20 strategy: 21 fail-fast: false 22 matrix: 23 include: 24 - { os: ubuntu-20.04, cc: gcc-8 } 25 - { os: ubuntu-22.04, cc: gcc-9 } 26 - { os: ubuntu-22.04, cc: gcc-10 } 27 - { os: ubuntu-22.04, cc: gcc-11 } 28 - { os: ubuntu-22.04, cc: gcc-12 } 29 - { os: ubuntu-22.04, cc: clang-13 } 30 - { os: ubuntu-22.04, cc: clang-14 } 31 - { os: ubuntu-22.04, cc: clang-15 } 32 - { os: ubuntu-22.04, cc: clang-16 } 33 - { os: ubuntu-20.04, cc: i686-w64-mingw32-gcc-9 } 34 - { os: ubuntu-22.04, cc: i686-w64-mingw32-gcc-10 } 35 steps: 36 - uses: actions/checkout@v4 37 - name: dependencies 38 run: | 39 sudo apt -q update 40 sudo apt install -q -y libcbor-dev libudev-dev libz-dev \ 41 original-awk mandoc libpcsclite-dev 42 - name: compiler 43 env: 44 CC: ${{ matrix.cc }} 45 run: | 46 if [ "${CC%-*}" == "clang" ]; then 47 sudo ./.actions/setup_clang "${CC}" 48 elif [ "${CC%-*}" == "i686-w64-mingw32-gcc" ]; then 49 sudo apt install -q -y binutils-mingw-w64-i686 gcc-mingw-w64 \ 50 g++-mingw-w64 mingw-w64-i686-dev 51 else 52 sudo apt install -q -y "${CC}" 53 fi 54 - name: build 55 env: 56 CC: ${{ matrix.cc }} 57 run: ./.actions/build-linux-${CC%-*} 58