Skip to content

Commit

Permalink
Fixed macOS Actions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olszomal committed Dec 2, 2024
1 parent 7f6eba0 commit da770b5
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
43 changes: 38 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,32 @@ jobs:
fail-fast: false
matrix:
include:
- os: 'ubuntu-22.04'
- os: 'ubuntu-20.04'
- os: 'macOS-latest'
- 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
openssl: 'openssl@3'
- os: 'macOS-latest'
openssl: 'openssl@1.1'
generator: Unix Makefiles
vcpkg_root: /usr/local/share/vcpkg
cache: /Users/runner/.cache/vcpkg/archives

runs-on: ${{matrix.os}}

Expand All @@ -39,6 +59,8 @@ jobs:
brew install libtool automake ${{matrix.openssl}} softhsm
brew install --cask opensc
echo "/usr/local/opt/${{matrix.openssl}}/bin" >> $GITHUB_PATH
softhsm2-util -v
whereis softhsm2-util
- name: System information
run: |
Expand All @@ -54,6 +76,10 @@ jobs:
- name: Build
run: make

- name: List files (Linux/macOS)
if: runner.os != 'Windows'
run: find .. -ls

- name: Test
timeout-minutes: 5
run: make check
Expand All @@ -62,6 +88,13 @@ jobs:
if: failure()
run: cat tests/test-suite.log || true

- name: Upload the errors
uses: actions/upload-artifact@v4
with:
name: errors-${{matrix.id}}
path: |
${{github.workspace}}/tests/test-suite.log
windows:
strategy:
fail-fast: false
Expand Down
6 changes: 6 additions & 0 deletions tests/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ init_db () {
SLOT="--free "
fi

if [[ -x "/opt/homebrew/bin/softhsm2-util" ]]; then
export SOFTHSM2_CONF="$outdir/softhsm-testpkcs11.config"
SOFTHSM_TOOL="/opt/homebrew/bin/softhsm2-util"
SLOT="--free "
fi

if [[ -z ${SOFTHSM_TOOL} ]]; then
echo "Could not find softhsm(2) tool"
exit 77
Expand Down

0 comments on commit da770b5

Please sign in to comment.