Add configure option to enable the static PKCS11 engine #207
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: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
env: | |
version: 0.4.14_git | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- id: ubuntu-24.04 | |
triplet: x64-linux | |
compiler: gcc | |
os: ubuntu-24.04 | |
generator: Unix Makefiles | |
- id: ubuntu-22.04 | |
triplet: x64-linux | |
compiler: gcc | |
os: ubuntu-22.04 | |
generator: Unix Makefiles | |
- id: ubuntu-20.04 | |
triplet: x64-linux | |
compiler: gcc | |
os: ubuntu-20.04 | |
generator: Unix Makefiles | |
- id: macOS-3 | |
openssl: 'openssl@3' | |
triplet: x64-osx | |
compiler: clang | |
os: macOS-latest | |
generator: Unix Makefiles | |
- id: macOS-1.1 | |
openssl: 'openssl@1.1' | |
triplet: x64-osx | |
compiler: clang | |
os: macOS-latest | |
generator: Unix Makefiles | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install apt dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libssl-dev opensc softhsm2 | |
- name: Install brew dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install libtool automake opensc softhsm | |
- name: Set environment variables (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
echo "/opt/homebrew/bin" >> $GITHUB_PATH | |
echo "/opt/homebrew/opt/${{matrix.openssl}}/bin" >> $GITHUB_PATH | |
echo "PKG_CONFIG_PATH=/opt/homebrew/opt/${{matrix.openssl}}/lib/pkgconfig" >> $GITHUB_ENV | |
- name: System information | |
run: | | |
which pkcs11-tool | |
which softhsm2-util | |
which openssl | |
openssl version -a | |
echo "PATH=$PATH" | |
- name: Bootstrap | |
run: autoreconf --verbose --install --force | |
- name: Configure | |
run: ./configure --enable-strict | |
- name: Build | |
run: make | |
- name: Test | |
timeout-minutes: 5 | |
run: make check | |
- name: Results of tests | |
run: cat ${{github.workspace}}/tests/test-suite.log || true | |
windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- id: windows-x86-vs | |
triplet: x86-windows | |
build_for: 'WIN32' | |
compiler: vs | |
arch: x86 | |
os: windows-latest | |
generator: Ninja | |
vcpkg_root: C:/vcpkg | |
- id: windows-x64-vs | |
triplet: x64-windows | |
build_for: 'WIN64' | |
compiler: vs | |
arch: x64 | |
os: windows-latest | |
generator: Ninja | |
vcpkg_root: C:/vcpkg | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache the vcpkg archives | |
uses: actions/cache@v4 | |
with: | |
path: C:/Users/runneradmin/AppData/Local/vcpkg/archives | |
key: ${{matrix.id}}-${{hashFiles('vcpkg.json')}} | |
restore-keys: | | |
${{matrix.id}}-${{hashFiles('vcpkg.json')}} | |
${{matrix.id}}- | |
- name: Configure Visual Studio | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{matrix.arch}} | |
- name: Install OpenSSL with VCPKG | |
run: | | |
vcpkg install --triplet=${{matrix.triplet}} openssl[tools] | |
echo "C:\vcpkg\packages\openssl_${{matrix.triplet}}\tools\openssl" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: System information | |
run: openssl version -a | |
- name: Build | |
run: nmake -f Makefile.mak | |
BUILD_FOR=${{matrix.build_for}} | |
OPENSSL_DIR="C:\vcpkg\packages\openssl_${{matrix.triplet}}" | |
- name: Upload the DLLs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libp11-${{env.version}}-${{matrix.arch}} | |
path: ${{github.workspace}}/src/*.dll |