Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Ventura <[email protected]>
  • Loading branch information
feventura committed Mar 13, 2024
1 parent b7fe232 commit 8ffaeda
Show file tree
Hide file tree
Showing 74 changed files with 10,460 additions and 1,294 deletions.
12 changes: 12 additions & 0 deletions .CMake/toolchain_windows_amd64.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: MIT

set(CMAKE_SYSTEM_NAME Windows)

set(CMAKE_SYSTEM_PROCESSOR AMD64)

set(CMAKE_CROSSCOMPILING OFF)

set(CMAKE_GENERATOR_PLATFORM
x64
CACHE STRING "Platform" FORCE
)
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ jobs:
- when:
condition:
not:
equal: [ openssl@3.1, << parameters.OPENSSL_PREINSTALL >> ]
equal: [ openssl@3, << parameters.OPENSSL_PREINSTALL >> ]
steps:
- run:
name: Clone and build OpenSSL(3) master
Expand All @@ -186,7 +186,7 @@ jobs:
fi
- when:
condition:
equal: [ openssl@3.1, << parameters.OPENSSL_PREINSTALL >> ]
equal: [ openssl@3, << parameters.OPENSSL_PREINSTALL >> ]
steps:
- run:
name: Build OQS-OpenSSL provider
Expand Down Expand Up @@ -301,12 +301,12 @@ workflows:
- macOS:
name: macOS-shared
CMAKE_ARGS: -DBUILD_SHARED_LIBS=ON -DOQS_DIST_BUILD=OFF -DOQS_ENABLE_KEM_CLASSIC_MCELIECE=OFF
OPENSSL_PREINSTALL: openssl@3.1
OPENSSL_PREINSTALL: openssl@3
- macOS:
name: macOS-static
OQS_PROVIDER_BUILD_STATIC: true
CMAKE_ARGS: -DOQS_DIST_BUILD=OFF -DOQS_ENABLE_KEM_CLASSIC_MCELIECE=OFF
OPENSSL_PREINSTALL: openssl@3.1
OPENSSL_PREINSTALL: openssl@3
on-main-branch:
when:
or:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: 'bug'
assignees: ''

---
Expand Down
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Question, Feature, Documentation
labels: 'question'
about: Ask question, request feature or documentation update
---

### Thank you for taking the time to share your thoughts with us.

We welcome all suggestions for new features or documentation updates
helping others to make better use of this project.

As with any other topic you'd like to discuss with the community,
we'd primarily like to invite you to [open a discussion](https://github.com/open-quantum-safe/oqs-provider/discussions)
item with your concern.

If you have a bug to report please use the [Bug report template](https://github.com/open-quantum-safe/oqs-provider/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=).

If you have an issue with the project that does not qualify as a bug
and have already explored the code to the extent that you can make a
proposal how to handle the issue, please feel free to open a
"blank issue" providing all information you have already collected.

Please remember to tell us which code version/branch you are using and
then briefly describe the issue and proposal how to resolve it if
available.
23 changes: 22 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ on:

jobs:

linux_baseline:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cmake-params: [ "", "-DOQS_KEM_ENCODERS=ON" ]
container:
image: openquantumsafe/ci-ubuntu-jammy:latest
env:
MAKE_PARAMS: "-j 18"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Full build
run: OQSPROV_CMAKE_PARAMS=${{ matrix.cmake-params}} ./scripts/fullbuild.sh
- name: Enable sibling oqsprovider for testing
run: cd _build/lib && ln -s oqsprovider.so oqsprovider2.so
- name: Test
run: ./scripts/runtests.sh -V

linux_intel:
runs-on: ubuntu-latest
strategy:
Expand All @@ -30,7 +50,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Full build
run: OPENSSL_BRANCH=${{ matrix.ossl-branch }} ./scripts/fullbuild.sh
run: OPENSSL_BRANCH=${{ matrix.ossl-branch }} LIBOQS_BRANCH=main ./scripts/fullbuild.sh
- name: Enable sibling oqsprovider for testing
run: cd _build/lib && ln -s oqsprovider.so oqsprovider2.so
- name: Test
Expand All @@ -45,6 +65,7 @@ jobs:
! pip3 install -r oqs-template/requirements.txt 2>&1 | grep ERROR && \
python3 oqs-template/generate.py && \
find . -type f -and '(' -name '*.h' -or -name '*.c' -or -name '*.inc' ')' | xargs clang-format -i && \
git diff && \
! git status | grep modified
- name: Build .deb install package
run: cpack
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ jobs:
working-directory: _build
# Try brew install of head: If error message below appears, build and test passed successfully
- name: brew install test
run: brew install --HEAD --formula -s oqsprovider.rb 2>&1 | grep "Empty installation"
# try this only if brew'd liboqs knows about ML-KEM:
run: |
bash -c 'brew install liboqs && FIND_MLKEM=`brew info liboqs | grep files | awk "{print $1}"`
if [[ `echo $FIND_MLKEM | grep ML_KEM` ]]; then
brew install --HEAD --formula -s oqsprovider.rb 2>&1 | grep "Empty installation"
else
echo "ML-KEM not present in liboqs. Skipping test."
fi'
working-directory: scripts
- name: Retain oqsprovider.dylib
uses: actions/upload-artifact@v3
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release tests

on:
repository_dispatch:
types: [ "liboqs-release" ]

# To trigger this job, generate a GitHub personal access token and run the following command:
#
# curl --request POST \
# --header "Accept: application/vnd.github+json" \
# --header "Authorization: Bearer YOUR_TOKEN_HERE" \
# --header "X-GitHub-Api-Version: 2022-11-28" \
# --data '{
# "event_type": "liboqs-release",
# "client_payload": {
# "provider_ref": "PROVIDER_BRANCH_OR_TAG_HERE",
# "liboqs_ref": "LIBOQS_BRANCH_OR_TAG_HERE"
# }
# }' \
# https://api.github.com/repos/open-quantum-safe/oqs-provider/dispatches

jobs:
release-test:
runs-on: ubuntu-latest
container:
image: openquantumsafe/ci-ubuntu-jammy:latest

steps:
- name: Check if requested ref exists
env:
provider_ref: ${{ github.event.client_payload.provider_ref }}
run: |
# try both branch and tag
wget --quiet \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--header "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/open-quantum-safe/oqs-provider/branches/$provider_ref || \
wget --quiet \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--header "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/open-quantum-safe/oqs-provider/git/ref/tags/$provider_ref \
&& echo "provider_ref=$provider_ref" >> "$GITHUB_ENV" \
|| echo "provider_ref=main" >> "$GITHUB_ENV"
- name: Checkout oqs-provider on requested ref if it exists; otherwise, fall back to main
uses: actions/checkout@v4
with:
ref: ${{ env.provider_ref }}
# This is designed to be triggered automatically from liboqs CI, so don't bother validating the liboqs ref.
- name: Checkout liboqs at requested ref
uses: actions/checkout@v4
with:
repository: open-quantum-safe/liboqs
path: liboqs
ref: ${{ github.event.client_payload.liboqs_ref }}
- name: Run release tests
run: OPENSSL_BRANCH=master ./scripts/release-test-ci.sh
17 changes: 11 additions & 6 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:

macos_intel:
standalone_macos_intel:
runs-on: macos-13
strategy:
fail-fast: false
Expand All @@ -17,12 +17,17 @@ jobs:
run: brew install liboqs
- name: Checkout oqsprovider code
uses: actions/checkout@v2
- name: Build oqsprovider
run: cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 -S . -B _build && cmake --build _build
- name: Test oqsprovider
run: ctest --parallel 5 --test-dir _build
- name: Build and test oqsprovider
# try this only if brew'd liboqs knows about ML-KEM:
run: |
bash -c 'FIND_MLKEM=`brew info liboqs | grep files | awk "{print $1}"`
if [[ `echo $FIND_MLKEM | grep ML_KEM` ]]; then
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 -S . -B _build && cmake --build _build && ctest --parallel 5 --test-dir _build
else
echo "ML-KEM not present in liboqs. Skipping test."
fi'
linux_intel:
standalone_linux_intel:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ jobs:
strategy:
matrix:
os:
# liboqs doesn't check Windows 2019
- windows-2019
# - windows-2022
- windows-2022
platform:
- arch: win64
oqsconfig: -DOQS_ALGS_ENABLED=STD
osslconfig: no-shared no-fips VC-WIN64A-masm
osslconfig: no-shared no-fips VC-WIN64A
# - arch: win32
# oqsconfig: -DOQS_ALGS_ENABLED=STD
# osslconfig: --strict-warnings no-fips enable-quic
Expand All @@ -125,6 +126,7 @@ jobs:
with:
set-safe-directory: true
repository: open-quantum-safe/liboqs
ref: main
path: liboqs
- uses: ilammy/msvc-dev-cmd@v1
with:
Expand All @@ -148,7 +150,7 @@ jobs:
cmake --version
mkdir build
cd build
cmake -GNinja -DCMAKE_C_FLAGS="/wd5105" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX="c:\liboqs" ${{ matrix.platform.oqsconfig }} -DOQS_DIST_BUILD=ON ..
cmake -GNinja -DCMAKE_C_COMPILER="cl" -DCMAKE_C_FLAGS="/wd5105" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX="c:\liboqs" ${{ matrix.platform.oqsconfig }} -DOQS_DIST_BUILD=ON ..
ninja
ninja install
working-directory: liboqs
Expand Down Expand Up @@ -187,7 +189,7 @@ jobs:
key: ${{ runner.os }}-msvcopenssl32
- name: build oqs-provider
run: |
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="/wd5105" -DOPENSSL_ROOT_DIR="c:\openssl32" -Dliboqs_DIR="c:\liboqs\lib\cmake\liboqs" -S . -B _build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="cl" -DCMAKE_C_FLAGS="/wd5105" -DOPENSSL_ROOT_DIR="c:\openssl32" -Dliboqs_DIR="c:\liboqs\lib\cmake\liboqs" -S . -B _build
cd _build
ninja
- name: Run tests
Expand Down Expand Up @@ -237,6 +239,7 @@ jobs:
with:
set-safe-directory: true
repository: open-quantum-safe/liboqs
ref: main
path: liboqs
- uses: ilammy/msvc-dev-cmd@v1
with:
Expand Down Expand Up @@ -292,7 +295,7 @@ jobs:
key: ${{ runner.os }}-msvcopenssl32n
- name: build oqs-provider
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_FLAGS="/wd5105" -DOPENSSL_ROOT_DIR="c:\openssl32n" -Dliboqs_DIR="c:\liboqs\lib\cmake\liboqs" -S . -B _build
cmake --toolchain ${{ matrix.toolchain }} -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER="cl" -DCMAKE_C_FLAGS="/wd5105" -DOPENSSL_ROOT_DIR="c:\openssl32n" -Dliboqs_DIR="c:\liboqs\lib\cmake\liboqs" -S . -B _build
cmake --build _build --config=${{ matrix.type }}
- name: Run tests
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tmp
interop.log
# pycache
oqs-template/__pycache__
scripts/__pycache__

# Visual Studio Code
.vscode
Expand Down
Loading

0 comments on commit 8ffaeda

Please sign in to comment.