Update STFL pipeline #328
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| VERSION: 0.14.0 | |
| KEY_GEN_VERSION: 0 | |
| KEY_DIR: data/xmss_xmssmt_keys | |
| concurrency: | |
| group: test-python-detailed-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| cache-dependency-glob: "**/pyproject.toml" | |
| - name: Set up Python 3.9 | |
| run: uv python install 3.9 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| # Restore the XMSS/XMSSMT key cache. | |
| # Still allows the incomplete cache to be used to avoid regenerating keys. | |
| # But if the complete cache is present, all keys are already generated and used. | |
| - name: Restore XMSS/XMSSMT key cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.KEY_DIR }} | |
| key: xmss-v${{ env.KEY_GEN_VERSION }}-complete | |
| restore-keys: | | |
| xmss-v${{ env.KEY_GEN_VERSION }}-progress- | |
| xmss-v${{ env.KEY_GEN_VERSION }}- | |
| enableCrossOsArchive: true | |
| # Display the contents of the cache directory to verify what was restored. | |
| - name: Show tree of cache directory | |
| run: | | |
| echo "Listing cache directory:" | |
| ls -R data/xmss_xmssmt_keys | |
| - name: Install liboqs POSIX | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| git clone --branch ${{env.VERSION}} --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 -DOQS_BUILD_ONLY_LIB=ON -DOQS_ENABLE_SIG_STFL_LMS=ON \ | |
| -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_HAZARDOUS_EXPERIMENTAL_ENABLE_SIG_STFL_KEY_SIG_GEN=ON \ | |
| -DOQS_ALLOW_STFL_KEY_AND_SIG_GEN=ON | |
| cmake --build liboqs/build --parallel 4 | |
| sudo cmake --build liboqs/build --target install | |
| - name: Run examples POSIX | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| uv sync --extra dev | |
| uv run examples/kem.py | |
| echo | |
| uv run examples/sig.py | |
| echo | |
| uv run examples/rand.py | |
| echo | |
| uv run examples/stfl_sig.py | |
| - name: Run unit tests POSIX | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| # Ensure dev extras (nose2, pyasn1, etc.) are present | |
| uv sync --extra dev | |
| uv run nose2 --verbose | |
| - name: Install liboqs Windows | |
| if: matrix.os == 'windows-latest' | |
| shell: cmd | |
| run: | | |
| git clone --branch ${{env.VERSION}} --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 -DOQS_BUILD_ONLY_LIB=ON -DOQS_ENABLE_SIG_STFL_LMS=ON -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_HAZARDOUS_EXPERIMENTAL_ENABLE_SIG_STFL_KEY_SIG_GEN=ON ‑DOQS_ALLOW_STFL_KEY_AND_SIG_GEN=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 | |
| uv sync --extra dev | |
| uv run examples/kem.py | |
| echo. | |
| uv run examples/sig.py | |
| echo. | |
| uv run examples/rand.py | |
| echo. | |
| uv run examples/stfl_sig.py | |
| - name: Run unit tests Windows | |
| shell: cmd | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| set PATH=%PATH%;${{env.WIN_LIBOQS_INSTALL_PATH}}\bin | |
| rem Ensure dev extras (nose2, pyasn1, etc.) are present | |
| uv sync --extra dev | |
| uv run nose2 --verbose |