Skip to content

Fixed macOS Actions tests #17

Fixed macOS Actions tests

Fixed macOS Actions tests #17

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
version: 0.4.13_git
jobs:
unix:
strategy:
fail-fast: false
matrix:
include:
- id: ubuntu-24.04
triplet: x64-linux
compiler: gcc
os: ubuntu-24.04
generator: Unix Makefiles
vcpkg_root:
- id: ubuntu-22.04
triplet: x64-linux
compiler: gcc
os: ubuntu-22.04
generator: Unix Makefiles
vcpkg_root:
- id: ubuntu-20.04
triplet: x64-linux
compiler: gcc
os: ubuntu-20.04
generator: Unix Makefiles
vcpkg_root:
- id: macOS
triplet: x64-osx
compiler: clang
os: macOS-latest
generator: Unix Makefiles
vcpkg_root: /usr/local/share/vcpkg
cache: /Users/runner/.cache/vcpkg/archives
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install apt dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install -y libssl-dev opensc softhsm2
- name: Install brew dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install libtool automake softhsm
brew install --cask opensc
whereis softhsm2-util
whereis openssl
echo "/opt/homebrew/bin/" >> $GITHUB_PATH
- name: System information
run: |
openssl version -a
echo "PATH=$PATH"
- name: Bootstrap
run: autoreconf --verbose --install --force
- name: Configure
run: ./configure --enable-strict
- name: Build
run: make
- name: List files (Linux/macOS)
if: runner.os != 'Windows'
run: find .. -ls
- name: Test
timeout-minutes: 5
run: make check
- name: Upload the errors
uses: actions/upload-artifact@v4
if: failure()
with:
name: errors-${{matrix.id}}
path: |
${{github.workspace}}/tests/test-suite.log
- name: Results of failed tests
if: failure()
run: cat ${{github.workspace}}/tests/test-suite.log || true
windows:
strategy:
fail-fast: false
matrix:
include:
- arch: 'x86'
build_for: 'WIN32'
- arch: 'x64'
build_for: 'WIN64'
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.arch}}
- name: Configure Visual Studio
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
- name: Install OpenSSL with VCPKG
run: |
vcpkg install --triplet=${{matrix.arch}}-windows openssl
echo "C:\vcpkg\packages\openssl_${{matrix.arch}}-windows\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.arch}}-windows"
- name: Upload the DLLs
uses: actions/upload-artifact@v4
with:
name: libp11-${{env.version}}-${{matrix.arch}}
path: ${{github.workspace}}/src/*.dll