1# Copyright (c) 2022-2024 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-22.04, cc: gcc-10 } 25 - { os: ubuntu-22.04, cc: gcc-11 } 26 - { os: ubuntu-24.04, cc: gcc-12 } 27 - { os: ubuntu-24.04, cc: gcc-13 } 28 - { os: ubuntu-22.04, cc: clang-16 } 29 - { os: ubuntu-22.04, cc: clang-17 } 30 - { os: ubuntu-24.04, cc: clang-18 } 31 - { os: ubuntu-24.04, cc: clang-19 } 32 - { os: ubuntu-22.04, cc: i686-w64-mingw32-gcc-10 } 33 - { os: ubuntu-24.04, cc: i686-w64-mingw32-gcc-11 } 34 steps: 35 - uses: actions/checkout@v4 36 - name: dependencies 37 run: | 38 sudo apt -q update 39 sudo apt install -q -y libcbor-dev libudev-dev libz-dev \ 40 original-awk mandoc libpcsclite-dev 41 - name: compiler 42 env: 43 CC: ${{ matrix.cc }} 44 run: | 45 if [ "${CC%-*}" == "clang" ]; then 46 sudo ./.actions/setup_clang "${CC}" 47 elif [ "${CC%-*}" == "i686-w64-mingw32-gcc" ]; then 48 sudo apt install -q -y binutils-mingw-w64-i686 gcc-mingw-w64 \ 49 g++-mingw-w64 mingw-w64-i686-dev 50 else 51 sudo apt install -q -y "${CC}" 52 fi 53 - name: build 54 env: 55 CC: ${{ matrix.cc }} 56 run: ./.actions/build-linux-${CC%-*} 57