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