Skip to content

Commit

Permalink
Kyber Testing
Browse files Browse the repository at this point in the history
1. Switch to using variables for the versions.
2. Updated cache use per recommondations.
3. Renamed the cached items with "kyber" in the name.
  • Loading branch information
ejohnstown committed May 16, 2024
1 parent 19e39d9 commit b7e10f8
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/kyber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,30 @@ on:
pull_request:
branches: [ '*' ]

env:
LIBOQS_REF: 0.10.0
WOLFSSL_REF: v5.7.0-stable

jobs:
build_liboqs:
name: Build liboqs
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Checking cache for liboqs
uses: actions/cache/restore@v4
uses: actions/cache@v4
id: cache-liboqs
with:
path: opt/liboqs/
key: wolfssh-liboqs-0.10.0-${{ runner.os }}
key: wolfssh-kyber-liboqs-${{ env.LIBOQS_REF }}-${{ runner.os }}
lookup-only: true

- name: Checkout liboqs
if: steps.cache-liboqs.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: open-quantum-safe/liboqs
ref: 0.10.0
ref: ${{ env.LIBOQS_REF }}
path: liboqs

- name: Build and install liboqs
Expand All @@ -38,43 +42,35 @@ jobs:
make
make install
- name: Stash liboqs in cache
if: steps.cache-liboqs.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: opt/liboqs/
key: wolfssh-liboqs-0.10.0-${{ runner.os }}

build_wolfssl:
name: Build wolfssl
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Checking cache for wolfssl
uses: actions/cache/restore@v4
uses: actions/cache@v4
id: cache-wolfssl
with:
path: opt/wolfssl/
key: wolfssh-wolfssl-v5.7.0-stable-${{ runner.os }}
key: wolfssh-kyber-wolfssl-${{ env.WOLFSSL_REF }}-${{ runner.os }}
lookup-only: true

- name: Checkout, build, and install wolfssl
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfssl/wolfssl
ref: v5.7.0-stable
ref: ${{ env.WOLFSSL_REF }}
path: wolfssl
configure: --prefix=${{ github.workspace }}/opt/wolfssl --enable-wolfssh --enable-cryptonly --disable-examples --disable-crypttests
configure: --enable-wolfssh --enable-cryptonly --disable-examples --disable-crypttests
check: false
install: true

- name: Stash wolfssl in cache
- shell: bash
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: opt/wolfssl/
key: wolfssh-wolfssl-v5.7.0-stable-${{ runner.os }}
run: |
mkdir -p opt
mv build-dir opt/wolfssl
build_wolfssh:
name: Build wolfssh
Expand All @@ -83,17 +79,17 @@ jobs:
needs: [build_wolfssl, build_liboqs]
steps:
- name: Checking cache for liboqs
uses: actions/cache/restore@v4
uses: actions/cache@v4
with:
path: opt/liboqs/
key: wolfssh-liboqs-0.10.0-${{ runner.os }}
key: wolfssh-kyber-liboqs-${{ env.LIBOQS_REF }}-${{ runner.os }}
fail-on-cache-miss: true

- name: Checking cache for wolfssl
uses: actions/cache/restore@v4
with:
path: opt/wolfssl/
key: wolfssh-wolfssl-v5.7.0-stable-${{ runner.os }}
key: wolfssh-kyber-wolfssl-${{ env.WOLFSSL_REF }}-${{ runner.os }}
fail-on-cache-miss: true

- name: Checkout, build, and test wolfssh
Expand Down

0 comments on commit b7e10f8

Please sign in to comment.