Skip to content

liboqs-upstream-trigger #95

liboqs-upstream-trigger

liboqs-upstream-trigger #95

name: GitHub actions detailed
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
repository_dispatch:
types: ["**"]
permissions:
contents: read
env:
BUILD_TYPE: Debug
LD_LIBRARY_PATH: /usr/local/lib
WIN_LIBOQS_INSTALL_PATH: C:\liboqs
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nose2
- name: Install liboqs POSIX
if: matrix.os != 'windows-latest'
run: |
git clone --branch main --single-branch --depth 1 https://github.com/open-quantum-safe/liboqs
cmake -S liboqs -B liboqs/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=ON -DOQS_BUILD_ONLY_LIB=ON
cmake --build liboqs/build --parallel 4
sudo cmake --build liboqs/build --target install
- name: Run examples POSIX
if: matrix.os != 'windows-latest'
run: |
pip install .
python examples/kem.py
echo
python examples/sig.py
echo
python examples/rand.py
- name: Run unit tests POSIX
if: matrix.os != 'windows-latest'
run: |
nose2 --verbose
- name: Install liboqs Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: |
git clone --branch main --single-branch --depth 1 https://github.com/open-quantum-safe/liboqs
cmake -S liboqs -B liboqs\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.WIN_LIBOQS_INSTALL_PATH}} -DBUILD_SHARED_LIBS=ON -DOQS_BUILD_ONLY_LIB=ON
cmake --build liboqs\build --parallel 4
cmake --build liboqs\build --target install
- name: Run examples Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: |
set PATH=%PATH%;${{env.WIN_LIBOQS_INSTALL_PATH}}\bin
pip install .
python examples/kem.py
echo.
python examples/sig.py
echo.
python examples/rand.py
- name: Run unit tests Windows
shell: cmd
if: matrix.os == 'windows-latest'
run: |
set PATH=%PATH%;${{env.WIN_LIBOQS_INSTALL_PATH}}\bin
nose2 --verbose