Skip to content

Add X25519 Diffie-Hellman and fe_mul121666 #126

Add X25519 Diffie-Hellman and fe_mul121666

Add X25519 Diffie-Hellman and fe_mul121666 #126

Workflow file for this run

name: CI Build Tests
on:
push:
pull_request:
release:
types: [published]
schedule:
- cron: '30 3 * * 0'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# ── Linux gcc-11 ──────────────────────────────────────────
- { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, name: gcc-11, config: portable, cmake_flags: "-DFORCE_PORTABLE=ON" }
- { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, name: gcc-11, config: x64-baseline, cmake_flags: "-DENABLE_AVX2=OFF -DENABLE_AVX512=OFF" }
- { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, name: gcc-11, config: x64-avx2, cmake_flags: "-DENABLE_AVX512=OFF" }
- { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, name: gcc-11, config: x64-full, cmake_flags: "" }
# ── Linux gcc-12 ──────────────────────────────────────────
- { os: ubuntu-latest, cc: gcc-12, cxx: g++-12, name: gcc-12, config: portable, cmake_flags: "-DFORCE_PORTABLE=ON" }
- { os: ubuntu-latest, cc: gcc-12, cxx: g++-12, name: gcc-12, config: x64-baseline, cmake_flags: "-DENABLE_AVX2=OFF -DENABLE_AVX512=OFF" }
- { os: ubuntu-latest, cc: gcc-12, cxx: g++-12, name: gcc-12, config: x64-avx2, cmake_flags: "-DENABLE_AVX512=OFF" }
- { os: ubuntu-latest, cc: gcc-12, cxx: g++-12, name: gcc-12, config: x64-full, cmake_flags: "" }
# ── Linux clang-14 ────────────────────────────────────────
- { os: ubuntu-latest, cc: clang-14, cxx: clang++-14, name: clang-14, config: portable, cmake_flags: "-DFORCE_PORTABLE=ON" }
- { os: ubuntu-latest, cc: clang-14, cxx: clang++-14, name: clang-14, config: x64-baseline, cmake_flags: "-DENABLE_AVX2=OFF -DENABLE_AVX512=OFF" }
- { os: ubuntu-latest, cc: clang-14, cxx: clang++-14, name: clang-14, config: x64-avx2, cmake_flags: "-DENABLE_AVX512=OFF" }
- { os: ubuntu-latest, cc: clang-14, cxx: clang++-14, name: clang-14, config: x64-full, cmake_flags: "" }
# ── Linux clang-15 ────────────────────────────────────────
- { os: ubuntu-latest, cc: clang-15, cxx: clang++-15, name: clang-15, config: portable, cmake_flags: "-DFORCE_PORTABLE=ON" }
- { os: ubuntu-latest, cc: clang-15, cxx: clang++-15, name: clang-15, config: x64-baseline, cmake_flags: "-DENABLE_AVX2=OFF -DENABLE_AVX512=OFF" }
- { os: ubuntu-latest, cc: clang-15, cxx: clang++-15, name: clang-15, config: x64-avx2, cmake_flags: "-DENABLE_AVX512=OFF" }
- { os: ubuntu-latest, cc: clang-15, cxx: clang++-15, name: clang-15, config: x64-full, cmake_flags: "" }
# ── macOS Homebrew clang (ARM64 — no x86 SIMD configs) ───
- { os: macos-latest, cc: /opt/homebrew/opt/llvm/bin/clang, cxx: /opt/homebrew/opt/llvm/bin/clang++, name: clang, config: portable, cmake_flags: "-DFORCE_PORTABLE=ON" }
- { os: macos-latest, cc: /opt/homebrew/opt/llvm/bin/clang, cxx: /opt/homebrew/opt/llvm/bin/clang++, name: clang, config: arm64, cmake_flags: "" }
# ── macOS AppleClang (ARM64 — no x86 SIMD configs) ───────
- { os: macos-latest, name: AppleClang, config: portable, cmake_flags: "-DFORCE_PORTABLE=ON" }
- { os: macos-latest, name: AppleClang, config: arm64, cmake_flags: "" }
# ── Windows MSVC ──────────────────────────────────────────
- { os: windows-latest, name: msvc, config: portable, cmake_flags: "-DFORCE_PORTABLE=ON" }
- { os: windows-latest, name: msvc, config: x64-baseline, cmake_flags: "-DENABLE_AVX2=OFF -DENABLE_AVX512=OFF" }
- { os: windows-latest, name: msvc, config: x64-avx2, cmake_flags: "-DENABLE_AVX512=OFF" }
- { os: windows-latest, name: msvc, config: x64-full, cmake_flags: "" }
# ── Windows MinGW GCC ─────────────────────────────────────
- { os: windows-latest, name: mingw-gcc, config: portable, cmake_flags: "-G \"MinGW Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DFORCE_PORTABLE=ON" }
- { os: windows-latest, name: mingw-gcc, config: x64-baseline, cmake_flags: "-G \"MinGW Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DENABLE_AVX2=OFF -DENABLE_AVX512=OFF" }
- { os: windows-latest, name: mingw-gcc, config: x64-avx2, cmake_flags: "-G \"MinGW Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DENABLE_AVX512=OFF" }
- { os: windows-latest, name: mingw-gcc, config: x64-full, cmake_flags: "-G \"MinGW Makefiles\" -DCMAKE_CXX_COMPILER=g++" }
name: ${{ matrix.os }} / ${{ matrix.name }} / ${{ matrix.config }}
steps:
- uses: actions/checkout@v4
- name: Install Compiler (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.cc }}
if [[ "${{ matrix.cxx }}" != *"clang"* ]]; then sudo apt-get install -y ${{ matrix.cxx }}; fi
- name: Install LLVM (macOS)
if: matrix.os == 'macos-latest' && matrix.name == 'clang'
run: brew install llvm || brew upgrade llvm
- name: Configure
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: cmake -S . -B build -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=ON ${{ matrix.cmake_flags }}
- name: Build
run: cmake --build build --config Release -j
- name: Resolve test executable path
id: exe
shell: bash
run: |
if [ "${{ matrix.os }}" = "windows-latest" ] && [ "${{ matrix.name }}" = "msvc" ]; then
echo "tests=./build/Release/ed25519-tests.exe" >> "$GITHUB_OUTPUT"
echo "bench=./build/Release/ed25519-benchmark.exe" >> "$GITHUB_OUTPUT"
else
echo "tests=./build/ed25519-tests" >> "$GITHUB_OUTPUT"
echo "bench=./build/ed25519-benchmark" >> "$GITHUB_OUTPUT"
fi
- name: Tests (baseline)
shell: bash
run: ${{ steps.exe.outputs.tests }}
- name: Tests (--init)
shell: bash
run: ${{ steps.exe.outputs.tests }} --init
- name: Tests (--autotune)
shell: bash
run: ${{ steps.exe.outputs.tests }} --autotune
- name: Benchmark
shell: bash
run: ${{ steps.exe.outputs.bench }}