-
Notifications
You must be signed in to change notification settings - Fork 91
81 lines (78 loc) · 2.59 KB
/
macos.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
name: MacOS tests
on: [pull_request, push]
permissions:
contents: read
jobs:
macos:
# Run a job for each of the specified os configs:
strategy:
matrix:
os:
- macos-13
- macos-12
- macos-11
params:
- oqsconfig: -DOQS_ALGS_ENABLED=STD
runs-on: ${{matrix.os}}
env:
# Don't overwhelm github CI VMs:
MAKE_PARAMS: -j 4
steps:
- name: Checkout provider
uses: actions/checkout@v3
- name: Checkout openssl
uses: actions/checkout@v3
with:
set-safe-directory: true
repository: openssl/openssl
path: openssl
- name: checkout liboqs
uses: actions/checkout@v3
with:
set-safe-directory: true
repository: open-quantum-safe/liboqs
ref: main
path: liboqs
- name: Retrieve OpenSSL32 from cache
id: cache-openssl32
uses: actions/cache@v3
with:
path: .localopenssl32
key: ${{ runner.os }}-openssl32
- name: Build openssl3 if not cached
if: steps.cache-openssl32.outputs.cache-hit != 'true'
run: pwd && ./config --prefix=`pwd`/../.localopenssl32 && make $MAKE_PARAMS && make install_sw install_ssldirs
working-directory: openssl
- name: Check OpenSSL install3
run: ls -laR .localopenssl32
- name: Save OpenSSL
id: cache-openssl-save
if: steps.cache-openssl32.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: |
.localopenssl32
key: ${{ runner.os }}-openssl32
- name: build liboqs
run: |
mkdir _build
cd _build
cmake -DOPENSSL_ROOT_DIR=../.localopenssl32 -DCMAKE_INSTALL_PREFIX=../.localliboqs ${{ matrix.params.oqsconfig }} ..
make $MAKE_PARAMS
make install
working-directory: liboqs
- name: build oqs-provider
run: liboqs_DIR=.localliboqs cmake -DOPENSSL_ROOT_DIR=.localopenssl32 -S . -B _build && cmake --build _build
- name: Check resultant dylib
run: ls -l && pwd
working-directory: _build/lib
- name: Check Openssl providers
run: OPENSSL_MODULES=_build/bin .localopenssl32/bin/openssl list -providers -provider oqsprovider -provider default
- name: Run tests
run: PATH=.localopenssl32/bin:$PATH ctest -V
working-directory: _build
- name: Retain oqsprovider.dylib
uses: actions/upload-artifact@v3
with:
name: oqs-provider-${{matrix.os}}
path: _build/lib/oqsprovider.dylib