Skip to content

card-piv.c - PIV card type matching #541

card-piv.c - PIV card type matching

card-piv.c - PIV card type matching #541

Workflow file for this run

---
name: Linux
on:
pull_request:
paths:
- '**.c'
- '**.h'
- '**.sh'
- .github/workflows/linux.yml
- '**.am'
- doc/**
- configure.ac
push:
permissions:
contents: read # to fetch code (actions/checkout)
env:
BASE_DEPS: |
build-essential docbook-xsl xsltproc gengetopt help2man pcscd check
pcsc-tools libtool make autoconf autoconf-archive automake pkg-config
git xxd openssl valgrind socat gawk
libglib2.0-dev libnss3-dev gnutls-bin libusb-dev libudev-dev flex
libnss3-tools
libpcsclite-dev libcmocka-dev libssl-dev zlib1g-dev libreadline-dev softhsm2
JAVA_DEPS: |
ant openjdk-8-jdk maven cmake
JCARDSIM: https://github.com/Jakuje/jcardsim.git
LIBRESSL_VERSION: 4.0.0
jobs:
build:
name: build-${{ matrix.dist }}-${{ matrix.arch }}-${{ matrix.build }}
strategy:
fail-fast: false
matrix:
dist: ['22.04', '24.04']
arch: [amd64, arm64]
build: [dist, valgrind, piv-sm] # piv-sm will also include valgrind tests
exclude:
- build: dist
arch: arm64
runs-on: ubuntu-${{ matrix.dist }}${{ matrix.arch == 'arm64' && '-arm' || '' }}
steps:
- uses: actions/checkout@v5
- run: .github/setup-linux.sh ${{ matrix.build != 'dist' && 'debug' || '' }} # install debug with valgrind builds
- run: .github/build.sh ${{ matrix.build }} ${{ matrix.build == 'piv-sm' && 'valgrind' || '' }} # configure piv-sm with valgrind tests
- name: Upload test logs
uses: actions/upload-artifact@v5
if: failure()
with:
name: ubuntu-${{ matrix.dist }}-${{ matrix.arch }}-${{ matrix.build }}-test-logs
path: |
tests/*.log
src/tests/unittests/*.log
- &use_cache
uses: actions/cache@v4
id: cache-build
with:
path: ./*
key: ${{ runner.os }}-${{ matrix.dist }}-${{ matrix.arch }}-${{ matrix.build }}-${{ github.sha }}
- name: Upload build artifacts
if: matrix.build == 'dist'
uses: actions/upload-artifact@v5
with:
name: opensc-build-${{ matrix.dist }}-${{ matrix.arch }}
path:
opensc*.tar.gz
build-no-shared:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: awalsh128/[email protected]
with:
packages: ${{ env.BASE_DEPS }}
version: apt-latest-base
execute_install_scripts: true
- run: .github/setup-linux.sh
- run: .github/build.sh no-shared valgrind
build-no-openssl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: awalsh128/[email protected]
with:
packages: ${{ env.BASE_DEPS }}
version: apt-latest-base
execute_install_scripts: true
- run: .github/setup-linux.sh
- run: .github/build.sh no-openssl valgrind
build-ix86:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: awalsh128/[email protected]
with:
packages: ${{ env.BASE_DEPS }}
version: apt-24.04-amd64-base
execute_install_scripts: true
- run: .github/setup-linux.sh ix86
- run: .github/build.sh ix86
build-mingw:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: .github/setup-linux.sh mingw force-install
- run: .github/build.sh mingw
- name: Cache build artifacts
uses: actions/upload-artifact@v5
with:
name: opensc-build-mingw
path:
win32/Output/OpenSC*.exe
build-mingw32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: .github/setup-linux.sh mingw32
- run: .github/build.sh mingw32
- name: Cache build artifacts
uses: actions/upload-artifact@v5
with:
name: opensc-build-mingw32
path:
win32/Output/OpenSC*.exe
build-clang-tidy:
runs-on: ubuntu-24.04
needs: [build]
steps:
- uses: awalsh128/[email protected]
with:
packages: ${{ env.BASE_DEPS }}
version: apt-24.04-amd64-base
execute_install_scripts: true
- uses: actions/cache@v4
id: cache-build
with:
path: ./*
key: ${{ runner.os }}-24.04-amd64-valgrind-${{ github.sha }}
- run: .github/setup-linux.sh clang-tidy
- run: .github/build.sh clang-tidy
test-java:
name: test-${{ matrix.target }}${{ matrix.ver }}-${{ matrix.dist }}-${{ matrix.build }}
strategy:
fail-fast: false
matrix:
dist: ['24.04']
arch: [amd64]
build: [valgrind]
target: [piv, gidsapplet, openpgp]
ver: ['']
include: [
{ dist: '22.04', arch: amd64, build: 'piv-sm', target: 'piv' },
{ dist: '24.04', arch: amd64, build: 'piv-sm', target: 'piv' },
{ dist: '24.04', arch: amd64, build: 'valgrind', target: 'isoapplet', ver: 'v0' },
{ dist: '24.04', arch: amd64, build: 'valgrind', target: 'isoapplet', ver: 'v1' }
]
runs-on: ubuntu-${{ matrix.dist }}
needs: [build]
steps:
- *use_cache
- run: git clone $JCARDSIM
- uses: actions/setup-java@v4
with:
distribution: 'semeru'
java-version: '8'
cache: 'maven'
- run: .github/setup-linux.sh ${{ matrix.target }} debug
- run: .github/test-${{ matrix.target }}.sh ${{ matrix.ver }}
- run: .github/test-${{ matrix.target }}.sh ${{ matrix.ver }} valgrind
test:
name: test-${{ matrix.target }}-${{ matrix.dist }}
strategy:
fail-fast: false
matrix:
dist: ['22.04', '24.04']
arch: [amd64]
build: [valgrind]
target: [cac, oseid]
runs-on: ubuntu-${{ matrix.dist }}
needs: [build]
steps:
- *use_cache
- run: .github/setup-linux.sh ${{ matrix.target }} debug
- run: .github/test-${{ matrix.target }}.sh
- run: .github/test-${{ matrix.target }}.sh valgrind
#######################
## LibreSSL pipeline ##
#######################
build-libressl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: awalsh128/[email protected]
with:
packages: ${{ env.BASE_DEPS }}
version: apt-latest-base
execute_install_scripts: true
- name: Restore LibreSSL build
uses: actions/cache/restore@v4
id: libressl-cache
with:
path: |
libressl-${{ env.LIBRESSL_VERSION }}/
key: libressl-${{ env.LIBRESSL_VERSION }}
- run: .github/setup-linux.sh libressl
- run: .github/build.sh dist libressl valgrind
- uses: actions/upload-artifact@v5
if: failure()
with:
name: libressl-logs
path: |
config.log
tests/*.log
src/tests/unittests/*.log
- uses: actions/cache@v4
id: cache-build
if: ${{ success() }}
with:
path: ./*
key: ${{ runner.os }}-libressl-${{ github.sha }}
- if: ${{ steps.libressl-cache.outputs.cache-hit != 'true' }}
name: Cache LibreSSL build
uses: actions/cache/save@v4
with:
path: |
libressl-${{ env.LIBRESSL_VERSION }}/
key: libressl-${{ env.LIBRESSL_VERSION }}
test-libressl:
name: test-${{ matrix.target }}-libressl
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [cac, oseid]
needs: [build-libressl]
steps:
- uses: awalsh128/[email protected]
with:
packages: ${{ env.BASE_DEPS }}
version: apt-latest-base
execute_install_scripts: true
- uses: actions/cache@v4
id: cache-build
with:
path: ./*
key: ${{ runner.os }}-libressl-${{ github.sha }}
- run: .github/setup-linux.sh ${{ matrix.target }} libressl
- run: .github/test-${{ matrix.target }}.sh
- run: .github/test-${{ matrix.target }}.sh valgrind
####################
## Push artifacts ##
####################
push-artifacts:
runs-on: ubuntu-latest
needs: [build, build-mingw]
steps:
- uses: actions/cache@v4
id: cache-build
with:
path: ./*
key: ${{ runner.os }}-24.04-amd64-dist-${{ github.sha }}
- name: Pull mingw build artifacts
uses: actions/download-artifact@v4
with:
name: opensc-build-mingw
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Github Actions";
- run: .github/push_artifacts.sh "Github Actions ${GITHUB_REF}"
if: ${{ github.repository == 'OpenSC/OpenSC' }}