Add ML-KEM (FIPS 203) and ML-DSA (FIPS 204) support #322
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: Test Against Stable wolfSSL Releases | |
| on: | |
| pull_request: | |
| branches: [ 'master' ] | |
| jobs: | |
| # First job: dynamically fetch the last 3 stable wolfSSL release tags | |
| get-stable-releases: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| versions: ${{ steps.get-versions.outputs.versions }} | |
| steps: | |
| - name: Get last 5 stable wolfSSL releases | |
| id: get-versions | |
| run: | | |
| # Fetch tags from wolfSSL/wolfssl that end with "-stable" | |
| # Sort by version number and take the last 5 | |
| VERSIONS=$(curl -s "https://api.github.com/repos/wolfSSL/wolfssl/tags?per_page=100" | \ | |
| jq -r '.[].name | select(endswith("-stable"))' | \ | |
| sort -V | \ | |
| tail -n 5 | \ | |
| jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| echo "Found stable versions: $VERSIONS" | |
| echo "versions=$VERSIONS" >> $GITHUB_OUTPUT | |
| # Second job: build and test against each stable release | |
| test-stable-release: | |
| needs: get-stable-releases | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| wolfssl_version: ${{ fromJson(needs.get-stable-releases.outputs.versions) }} | |
| jdk_version: [ '21' ] | |
| wolfssl_configure: [ '--enable-jni', '--enable-jni --enable-all' ] | |
| name: wolfSSL ${{ matrix.wolfssl_version }} (JDK ${{ matrix.jdk_version }}, ${{ matrix.wolfssl_configure }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache JUnit dependencies | |
| uses: actions/cache@v4 | |
| id: cache-junit | |
| with: | |
| path: junit | |
| key: junit-jars-v1 | |
| - name: Download junit-4.13.2.jar | |
| if: steps.cache-junit.outputs.cache-hit != 'true' | |
| run: wget --directory-prefix=$GITHUB_WORKSPACE/junit https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar | |
| - name: Download hamcrest-all-1.3.jar | |
| if: steps.cache-junit.outputs.cache-hit != 'true' | |
| run: wget --directory-prefix=$GITHUB_WORKSPACE/junit https://repo1.maven.org/maven2/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar | |
| - name: Build native wolfSSL ${{ matrix.wolfssl_version }} | |
| uses: wolfSSL/actions-build-autotools-project@v1 | |
| with: | |
| repository: wolfSSL/wolfssl | |
| ref: ${{ matrix.wolfssl_version }} | |
| path: wolfssl | |
| configure: ${{ matrix.wolfssl_configure }} | |
| check: false | |
| install: true | |
| - name: Setup java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: ${{ matrix.jdk_version }} | |
| - name: Set JUNIT_HOME | |
| run: | | |
| echo "JUNIT_HOME=$GITHUB_WORKSPACE/junit" >> "$GITHUB_ENV" | |
| - name: Set LD_LIBRARY_PATH | |
| run: | | |
| echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib" >> "$GITHUB_ENV" | |
| - name: Build JNI library | |
| run: ./java.sh $GITHUB_WORKSPACE/build-dir | |
| - name: Build JAR (ant) | |
| run: ant | |
| - name: Run Java tests (ant test) | |
| run: ant test | |
| - name: Show logs on failure | |
| if: failure() || cancelled() | |
| run: | | |
| cat build/reports/*.txt |