Win #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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: 3.8.1 | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-20-base | |
execute_install_scripts: true | |
- run: .github/setup-linux.sh | |
- run: .github/build.sh dist | |
- name: Upload test logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ubuntu-test-logs | |
path: | | |
tests/*.log | |
src/tests/unittests/*.log | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: opensc-build | |
path: | |
opensc*.tar.gz | |
valgrind: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-latest-base | |
execute_install_scripts: true | |
- run: .github/setup-linux.sh debug | |
- run: .github/build.sh valgrind | |
- name: Upload test logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ubuntu-valgrind-logs | |
path: | | |
tests/*.log | |
src/tests/unittests/*.log | |
build-no-shared: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
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@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
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-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-20-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@v4 | |
- run: .github/setup-linux.sh mingw force-install | |
- run: .github/build.sh mingw | |
- name: Cache build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: opensc-build-mingw | |
path: | |
win32/Output/OpenSC*.exe | |
build-mingw32: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-latest-base | |
execute_install_scripts: true | |
- run: .github/setup-linux.sh mingw32 | |
- run: .github/build.sh mingw32 | |
- name: Cache build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: opensc-build-mingw32 | |
path: | |
win32/Output/OpenSC*.exe | |
build-piv-sm: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-20-java | |
execute_install_scripts: true | |
- run: .github/setup-linux.sh | |
- run: .github/build.sh piv-sm dist | |
- name: Upload test logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ubuntu-piv-sm-test-logs | |
path: | | |
tests/*.log | |
src/tests/unittests/*.log | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-piv-sm-${{ github.sha }} | |
test-piv: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-20-java | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- run: git clone $JCARDSIM | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'semeru' | |
java-version: '8' | |
cache: 'maven' | |
- run: .github/setup-linux.sh piv | |
- run: .github/test-piv.sh | |
- run: .github/test-piv.sh valgrind | |
test-piv-sm: | |
runs-on: ubuntu-20.04 | |
needs: [build-piv-sm] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-20-java | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-piv-sm-${{ github.sha }} | |
- run: git clone $JCARDSIM | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'semeru' | |
java-version: '8' | |
cache: 'maven' | |
- run: .github/setup-linux.sh piv | |
- run: .github/test-piv.sh | |
- run: .github/test-piv.sh valgrind | |
test-isoapplet-v0: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-20-java | |
execute_install_scripts: true | |
- run: git clone $JCARDSIM | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'semeru' | |
java-version: '8' | |
cache: 'maven' | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- run: .github/setup-linux.sh isoapplet | |
- run: .github/test-isoapplet.sh v0 | |
- run: .github/test-isoapplet.sh v0 valgrind | |
test-isoapplet-v1: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-20-java | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- run: git clone $JCARDSIM | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'semeru' | |
java-version: '8' | |
cache: 'maven' | |
- run: .github/setup-linux.sh isoapplet | |
- run: .github/test-isoapplet.sh v1 | |
- run: .github/test-isoapplet.sh v1 valgrind | |
test-gidsapplet: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-20-java | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- run: git clone $JCARDSIM | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'semeru' | |
java-version: '8' | |
cache: 'maven' | |
- run: .github/setup-linux.sh gidsapplet | |
- run: .github/test-gidsapplet.sh | |
- run: .github/test-gidsapplet.sh valgrind | |
test-openpgp: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} %{{ env.JAVA_DEPS }} | |
version: apt-20-base | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- run: git clone $JCARDSIM | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'semeru' | |
java-version: '8' | |
cache: 'maven' | |
- run: .github/setup-linux.sh openpgp | |
- run: .github/test-openpgp.sh | |
- run: .github/test-openpgp.sh valgrind | |
build-clang-tidy: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-20-base | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- run: .github/setup-linux.sh clang-tidy | |
- run: .github/build.sh clang-tidy | |
test-cac: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-20-base | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- run: .github/setup-linux.sh cac | |
- run: .github/test-cac.sh | |
- run: .github/test-cac.sh valgrind | |
test-oseid: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-20-base | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ github.sha }} | |
- run: .github/setup-linux.sh oseid | |
- run: .github/test-oseid.sh | |
- run: .github/test-oseid.sh valgrind | |
############################################ | |
## Ubuntu 22.04 with OpenSSL 3.0 pipeline ## | |
############################################ | |
build-ubuntu-22: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-22-base | |
execute_install_scripts: true | |
- run: .github/setup-linux.sh | |
- run: .github/build.sh dist valgrind | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ubuntu-22-test-logs | |
path: | | |
tests/*.log | |
src/tests/unittests/*.log | |
- uses: actions/cache@v4 | |
id: cache-build | |
if: ${{ success() }} | |
with: | |
path: ./* | |
key: ${{ runner.os }}-22-${{ github.sha }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ success() }} | |
with: | |
name: opensc-22-build | |
path: | |
opensc*.tar.gz | |
build-ubuntu-22-piv-sm: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-22-java | |
execute_install_scripts: true | |
- run: .github/setup-linux.sh | |
- run: .github/build.sh piv-sm dist valgrind | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ubuntu-22-piv-sm-test-logs | |
path: | | |
tests/*.log | |
src/tests/unittests/*.log | |
- uses: actions/cache@v4 | |
id: cache-build | |
if: ${{ success() }} | |
with: | |
path: ./* | |
key: ${{ runner.os }}-22-piv-sm-${{ github.sha }} | |
test-piv-sm-ubuntu-22: | |
runs-on: ubuntu-22.04 | |
needs: [build-ubuntu-22-piv-sm] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-22-java | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-22-piv-sm-${{ github.sha }} | |
- run: git clone $JCARDSIM | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'semeru' | |
java-version: '8' | |
cache: 'maven' | |
- run: .github/setup-linux.sh piv | |
- run: .github/test-piv.sh | |
- run: .github/test-piv.sh valgrind | |
test-cac-ubuntu-22: | |
runs-on: ubuntu-22.04 | |
needs: [build-ubuntu-22] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} ${{ env.JAVA_DEPS }} | |
version: apt-22-java | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-22-${{ github.sha }} | |
- run: .github/setup-linux.sh cac | |
- run: .github/test-cac.sh | |
- run: .github/test-cac.sh valgrind | |
test-oseid-ubuntu-22: | |
runs-on: ubuntu-22.04 | |
needs: [build-ubuntu-22] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.BASE_DEPS }} | |
version: apt-22-base | |
execute_install_scripts: true | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-22-${{ github.sha }} | |
- run: .github/setup-linux.sh oseid | |
- run: .github/test-oseid.sh | |
- run: .github/test-oseid.sh valgrind | |
####################### | |
## LibreSSL pipeline ## | |
####################### | |
build-libressl: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
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@v4 | |
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-cac-libressl: | |
runs-on: ubuntu-latest | |
needs: [build-libressl] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
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 cac libressl | |
- run: .github/test-cac.sh | |
- run: .github/test-cac.sh valgrind | |
test-oseid-libressl: | |
runs-on: ubuntu-latest | |
needs: [build-libressl] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
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 oseid libressl | |
- run: .github/test-oseid.sh | |
- run: .github/test-oseid.sh valgrind | |
#################### | |
## Push artifacts ## | |
#################### | |
push-artifacts: | |
runs-on: ubuntu-latest | |
needs: [build, build-mingw] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: ./* | |
key: ${{ runner.os }}-${{ 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' }} |