| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
name: Test liboqs integration |
| 6 |
permissions: |
| 7 |
contents: read |
| 8 |
on: |
| 9 |
workflow_call: |
| 10 |
workflow_dispatch: |
| 11 |
|
| 12 |
jobs: |
| 13 |
oqs_basic_build: |
| 14 |
strategy: |
| 15 |
fail-fast: false |
| 16 |
matrix: |
| 17 |
include: |
| 18 |
|
| 19 |
- system: ubuntu-latest |
| 20 |
name: Haswell |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
flags: -DOQS_DIST_BUILD=OFF -DOQS_OPT_TARGET=haswell -DCMAKE_BUILD_TYPE=Debug -DOQS_ENABLE_TEST_CONSTANT_TIME=ON |
| 25 |
- system: ubuntu-latest |
| 26 |
name: C |
| 27 |
flags: -DOQS_DIST_BUILD=OFF -DOQS_OPT_TARGET=generic -DCMAKE_BUILD_TYPE=Debug -DOQS_ENABLE_TEST_CONSTANT_TIME=ON |
| 28 |
|
| 29 |
- system: ubuntu-24.04-arm |
| 30 |
name: Auto |
| 31 |
flags: -DOQS_DIST_BUILD=OFF -DOQS_OPT_TARGET=auto -DCMAKE_BUILD_TYPE=Debug -DOQS_ENABLE_TEST_CONSTANT_TIME=ON |
| 32 |
- system: ubuntu-24.04-arm |
| 33 |
name: C |
| 34 |
flags: -DOQS_DIST_BUILD=OFF -DOQS_OPT_TARGET=generic -DCMAKE_BUILD_TYPE=Debug -DOQS_ENABLE_TEST_CONSTANT_TIME=ON |
| 35 |
name: Build (${{ matrix.name }}, ${{ matrix.system }}) |
| 36 |
runs-on: ${{ matrix.system }} |
| 37 |
steps: |
| 38 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 39 |
- uses: ./.github/actions/setup-os |
| 40 |
with: |
| 41 |
packages: 'cmake python3-jinja2 python3-tabulate python3-git python3-pytest valgrind' |
| 42 |
- uses: ./.github/actions/setup-oqs |
| 43 |
with: |
| 44 |
|
| 45 |
commit: 'e66470560d396ce32ec8ab0f2c953a7624fd70a8' |
| 46 |
repository: 'mkannwischer/liboqs' |
| 47 |
- name: Apply patch |
| 48 |
run: | |
| 49 |
cd $LIBOQS_DIR |
| 50 |
# Adjust commit in importer script |
| 51 |
sed -i "/name: mldsa-native/,/preserve_folder_structure/s%git_url: .*%git_url: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY%" scripts/copy_from_upstream/copy_from_upstream.yml |
| 52 |
sed -i "/name: mldsa-native/,/preserve_folder_structure/s/git_branch: .*/git_branch: $GITHUB_SHA/" scripts/copy_from_upstream/copy_from_upstream.yml |
| 53 |
sed -i "/name: mldsa-native/,/preserve_folder_structure/s/git_commit: .*/git_commit: $GITHUB_SHA/" scripts/copy_from_upstream/copy_from_upstream.yml |
| 54 |
|
| 55 |
# TODO: Remove one it has been removed upstream |
| 56 |
# Remove CT test suppressions |
| 57 |
echo "" > tests/constant_time/sig/passes/ml_dsa |
| 58 |
echo "" > tests/constant_time/sig/passes/ml_dsa-avx2 |
| 59 |
|
| 60 |
# Temporarily remove oldpqclean because of build failures in its SHA3 assembly |
| 61 |
yq e -i 'del(.kems[] | select(.name == "kyber"))' scripts/copy_from_upstream/copy_from_upstream.yml |
| 62 |
yq e -i 'del(.sigs[] | select(.name == "dilithium"))' scripts/copy_from_upstream/copy_from_upstream.yml |
| 63 |
git diff >> $GITHUB_STEP_SUMMARY; |
| 64 |
- name: Configure |
| 65 |
run: | |
| 66 |
cd $LIBOQS_DIR |
| 67 |
git config --global user.name "pqcp_ci" |
| 68 |
git config --global user.email "[email protected]" |
| 69 |
git config --global --add safe.directory "$LIBOQS_DIR" |
| 70 |
- name: Import mldsa-native |
| 71 |
run: | |
| 72 |
cd $LIBOQS_DIR/scripts/copy_from_upstream |
| 73 |
./copy_from_upstream.py copy |
| 74 |
- name: Build libOQS |
| 75 |
run: | |
| 76 |
cd $LIBOQS_DIR |
| 77 |
mkdir build |
| 78 |
cd build |
| 79 |
cmake ${{ matrix.flags }} .. |
| 80 |
make -j$(nproc) |
| 81 |
- name: Run ML-DSA test |
| 82 |
run: | |
| 83 |
cd $LIBOQS_DIR |
| 84 |
python3 -m pytest -k ML-DSA |