forked from OpenSC/libp11
-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (85 loc) · 2.5 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
version: 0.4.13_git
jobs:
unix:
strategy:
fail-fast: false
matrix:
include:
- os: 'ubuntu-22.04'
- os: 'ubuntu-20.04'
- os: 'macOS-latest'
openssl: 'openssl@3'
- os: 'macOS-latest'
openssl: '[email protected]'
runs-on: ${{matrix.os}}
env:
PKG_CONFIG_PATH: /usr/local/opt/${{matrix.openssl}}/lib/pkgconfig
steps:
- uses: actions/checkout@v4
- name: Install apt dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install -y libssl-dev opensc softhsm
- name: Install brew dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install automake ${{matrix.openssl}} softhsm
brew install --cask opensc
echo "/usr/local/opt/${{matrix.openssl}}/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: Test
timeout-minutes: 5
run: make check
- name: Results of failed tests
if: failure()
run: cat 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