Skip to content

Commit

Permalink
Simplified GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoftco committed Mar 31, 2024
1 parent dce74bd commit 23f0a69
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ permissions:

env:
BUILD_TYPE: Debug
LD_LIBRARY_PATH: /usr/local/lib
WIN_LIBOQS_INSTALL_PATH: C:\liboqs

jobs:
build:
Expand All @@ -34,6 +36,14 @@ jobs:
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: |
Expand All @@ -49,10 +59,20 @@ jobs:
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.
Expand All @@ -64,4 +84,5 @@ jobs:
shell: cmd
if: matrix.os == 'windows-latest'
run: |
set PATH=%PATH%;${{env.WIN_LIBOQS_INSTALL_PATH}}\bin
nose2 --verbose
41 changes: 41 additions & 0 deletions .github/workflows/python_auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: GitHub actions

on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
repository_dispatch:
types: ["**"]

permissions:
contents: read

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: Run examples
run: |
python -m pip install --upgrade pip
pip install .
python examples/kem.py
echo
python examples/sig.py
echo
python examples/rand.py
- name: Run unit tests
run: |
nose2 --verbose

0 comments on commit 23f0a69

Please sign in to comment.