Skip to content

Commit e12e725

Browse files
authored
Merge pull request #692 from ejohnstown/kyber-fancy-action
Kyber Testing
2 parents 5f3a72e + 8da722e commit e12e725

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

.github/workflows/kyber.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Kyber Tests
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
env:
10+
LIBOQS_REF: 0.10.0
11+
WOLFSSL_REF: v5.7.0-stable
12+
13+
jobs:
14+
build_liboqs:
15+
name: Build liboqs
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 4
18+
steps:
19+
- name: Checking cache for liboqs
20+
uses: actions/cache@v4
21+
id: cache-liboqs
22+
with:
23+
path: opt/liboqs/
24+
key: wolfssh-kyber-liboqs-${{ env.LIBOQS_REF }}-${{ runner.os }}
25+
lookup-only: true
26+
27+
- name: Checkout liboqs
28+
if: steps.cache-liboqs.outputs.cache-hit != 'true'
29+
uses: actions/checkout@v4
30+
with:
31+
repository: open-quantum-safe/liboqs
32+
ref: ${{ env.LIBOQS_REF }}
33+
path: liboqs
34+
35+
- name: Build and install liboqs
36+
if: steps.cache-liboqs.outputs.cache-hit != 'true'
37+
working-directory: liboqs
38+
run: |
39+
mkdir build
40+
cd build
41+
cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/opt/liboqs -DOQS_MINIMAL_BUILD=KEM_kyber_512 -DOQS_USE_OPENSSL=0 ..
42+
make
43+
make install
44+
45+
build_wolfssl:
46+
name: Build wolfssl
47+
runs-on: ubuntu-latest
48+
timeout-minutes: 4
49+
steps:
50+
- name: Checking cache for wolfssl
51+
uses: actions/cache@v4
52+
id: cache-wolfssl
53+
with:
54+
path: opt/wolfssl/
55+
key: wolfssh-kyber-wolfssl-${{ env.WOLFSSL_REF }}-${{ runner.os }}
56+
lookup-only: true
57+
58+
- name: Checkout, build, and install wolfssl
59+
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
60+
uses: wolfSSL/actions-build-autotools-project@v1
61+
with:
62+
repository: wolfssl/wolfssl
63+
ref: ${{ env.WOLFSSL_REF }}
64+
path: wolfssl
65+
configure: --enable-wolfssh --enable-cryptonly --disable-examples --disable-crypttests
66+
check: false
67+
install: true
68+
69+
- shell: bash
70+
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
71+
run: |
72+
mkdir -p opt
73+
mv build-dir opt/wolfssl
74+
75+
build_wolfssh:
76+
name: Build wolfssh
77+
runs-on: ubuntu-latest
78+
timeout-minutes: 4
79+
needs: [build_wolfssl, build_liboqs]
80+
steps:
81+
- name: Checking cache for liboqs
82+
uses: actions/cache@v4
83+
with:
84+
path: opt/liboqs/
85+
key: wolfssh-kyber-liboqs-${{ env.LIBOQS_REF }}-${{ runner.os }}
86+
fail-on-cache-miss: true
87+
88+
- name: Checking cache for wolfssl
89+
uses: actions/cache@v4
90+
with:
91+
path: opt/wolfssl/
92+
key: wolfssh-kyber-wolfssl-${{ env.WOLFSSL_REF }}-${{ runner.os }}
93+
fail-on-cache-miss: true
94+
95+
- name: Checkout, build, and test wolfssh
96+
uses: wolfSSL/actions-build-autotools-project@v1
97+
with:
98+
repository: wolfssl/wolfssh
99+
path: wolfssh
100+
configure: --with-liboqs LDFLAGS="-L${{ github.workspace }}/opt/liboqs/lib -L${{ github.workspace }}/opt/wolfssl/lib" CPPFLAGS="-I${{ github.workspace }}/opt/liboqs/include -I${{ github.workspace }}/opt/wolfssl/include"
101+
check: true

0 commit comments

Comments
 (0)