Skip to content

Commit c2922d9

Browse files
committed
Update detailed and simplified pipelines to use restored XMSS and XMSS^MT keys.
- Restores the pre-generated keys. - Display what keys were restored. Signed-off-by: Guiliano99 <[email protected]>
1 parent a0d5796 commit c2922d9

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/python_detailed.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ env:
1616
LD_LIBRARY_PATH: /usr/local/lib
1717
WIN_LIBOQS_INSTALL_PATH: C:\liboqs
1818
VERSION: 0.14.0
19+
KEY_GEN_VERSION: 1
20+
KEY_DIR: data/xmss_xmssmt_keys
1921

2022
concurrency:
2123
group: test-python-detailed-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
@@ -44,6 +46,25 @@ jobs:
4446
- name: Install dependencies
4547
run: uv sync --extra dev
4648

49+
# Restore the XMSS/XMSSMT key cache.
50+
# Still allows the incomplete cache to be used to avoid regenerating keys.
51+
# But if the complete cache is present, all keys are already generated and used.
52+
- name: Restore XMSS/XMSSMT key cache
53+
uses: actions/cache/restore@v4
54+
with:
55+
path: ${{ env.KEY_DIR }}
56+
key: xmss-v${{ env.KEY_GEN_VERSION }}-complete
57+
restore-keys: |
58+
xmss-v${{ env.KEY_GEN_VERSION }}-progress-
59+
xmss-v${{ env.KEY_GEN_VERSION }}-
60+
enableCrossOsArchive: true
61+
62+
# Display the contents of the cache directory to verify what was restored.
63+
- name: Show tree of cache directory
64+
run: |
65+
echo "Listing cache directory:"
66+
ls -R data/xmss_xmssmt_keys
67+
4768
- name: Install liboqs POSIX
4869
if: matrix.os != 'windows-latest'
4970
run: |

.github/workflows/python_simplified.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ concurrency:
1515
group: test-python-simplified-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
1616
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1717

18+
env:
19+
KEY_GEN_VERSION: 1
20+
KEY_DIR: data/xmss_xmssmt_keys
1821

1922
jobs:
2023
build:
@@ -36,6 +39,25 @@ jobs:
3639
- name: Set up Python 3.9
3740
run: uv python install 3.9
3841

42+
# Restore the XMSS/XMSSMT key cache.
43+
# Still allows the incomplete cache to be used to avoid regenerating keys.
44+
# But if the complete cache is present, all keys are already generated and used.
45+
- name: Restore XMSS/XMSSMT key cache
46+
uses: actions/cache/restore@v4
47+
with:
48+
path: ${{ env.KEY_DIR }}
49+
key: xmss-v${{ env.KEY_GEN_VERSION }}-complete
50+
restore-keys: |
51+
xmss-v${{ env.KEY_GEN_VERSION }}-progress-
52+
xmss-v${{ env.KEY_GEN_VERSION }}-
53+
enableCrossOsArchive: true
54+
55+
# Display the contents of the cache directory to verify what was restored.
56+
- name: Show tree of cache directory
57+
run: |
58+
echo "Listing cache directory:"
59+
ls -R data/xmss_xmssmt_keys
60+
3961
- name: Run examples
4062
run: |
4163
uv sync --extra dev

0 commit comments

Comments
 (0)